void NumericSlider::OnScrollChange(wxScrollEvent &event) { wxCommandEvent evt(wxEVT_COMMAND_SPINCTRL_UPDATED); evt.SetId(this->GetId()); evt.SetEventObject(this); mSpinner->SetValue(event.GetInt() + mSpinner->GetMin()); evt.SetInt(event.GetInt() + mSpinner->GetMin()); wxPostEvent(this, evt); }
void ModelControl::OnSlider(wxScrollEvent &event) { if (!init || !model) return; int id = event.GetId(); if (id == ID_MODEL_ALPHA) { model->alpha = event.GetInt() / 100.0f; } else if (id == ID_MODEL_SCALE) { att->scale = event.GetInt() / 100.0f; txtsize->SetValue(wxString::Format(wxT("%.2f"), att->scale)); } }
void MiscControlPage::OnSpeedChange(wxScrollEvent& event) { auto speedText = wxString::Format(wxT("%d"), event.GetInt()); m_speedIndicator->SetValue(speedText); m_controller.WriteCommand(wxT("set speed ") + speedText); m_controller.WriteCommand(wxT("set throttle on")); }
void TAdjuster::OnSlide(wxScrollEvent& event) { int value = event.GetInt(); TUniform* uniform = sliders[event.GetId()].first; int component = sliders[event.GetId()].second; uniform->SetSlider((float) value / MaxSliderValue, component); uniform->UpdateSlider(); event.Skip(); }
void CColorTempPanel::mColorTempNightSliderOnScroll(wxScrollEvent& event) { int value = event.GetInt(); mColorTempNightSlider->SetValue(value); mColorTempNight->SetValue(wxString::Format(wxT("%d"), value*mColorTempStep)); if (value > mColorTempDaySlider->GetValue()) { mColorTempDay->SetValue(wxString::Format(wxT("%d"), value*mColorTempStep)); mColorTempDaySlider->SetValue(value); } Stop(); mEnable->SetValue(false); }
void MiscControlPage::OnChangeRenShaTurbo(wxScrollEvent& event) { m_controller.WriteCommand(wxString::Format( wxT("set renshaturbo %d"), event.GetInt())); }
void MiscControlPage::OnMinFrameSkipChange(wxScrollEvent& event) { auto skipText = wxString::Format(wxT("%d"), event.GetInt()); m_minFrameSkipIndicator->SetValue(skipText); m_controller.WriteCommand(wxT("set minframeskip ") + skipText); }
void mainFrameImp::volumeChanged( wxScrollEvent& event ){ gameManager::gm->setVolume(event.GetInt()); }
void OnScroll(wxScrollEvent& evt) { m_Var = m_Min + (m_Max - m_Min)*(evt.GetInt() / (float)range); g_EnvironmentSettings.NotifyObserversExcept(m_Conn); }
void CColorTempPanel::mTransitionSliderOnScroll(wxScrollEvent& event) { int value = event.GetInt(); mTransition->SetValue(wxString::Format(wxT("%dmin"), value)); }