Ejemplo n.º 1
0
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);
}
Ejemplo n.º 2
0
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));
	}
}
Ejemplo n.º 3
0
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"));
}
Ejemplo n.º 4
0
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);
}
Ejemplo n.º 6
0
void MiscControlPage::OnChangeRenShaTurbo(wxScrollEvent& event)
{
	m_controller.WriteCommand(wxString::Format(
		wxT("set renshaturbo %d"), event.GetInt()));
}
Ejemplo n.º 7
0
void MiscControlPage::OnMinFrameSkipChange(wxScrollEvent& event)
{
	auto skipText = wxString::Format(wxT("%d"), event.GetInt());
	m_minFrameSkipIndicator->SetValue(skipText);
	m_controller.WriteCommand(wxT("set minframeskip ") + skipText);
}
Ejemplo n.º 8
0
void mainFrameImp::volumeChanged( wxScrollEvent& event ){
    gameManager::gm->setVolume(event.GetInt());
}
Ejemplo n.º 9
0
	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));    
}