예제 #1
0
void abstract_panel::OnSpinCtrlDoubleChange(wxSpinDoubleEvent& event)
{
	if (event.GetId() == ID_W4_BumpWaterAnisotropy) {
		wxSpinCtrlDouble* aniso = (wxSpinCtrlDouble*)event.GetEventObject();
		(floatSettings)[W4_CONTROLS[6].key] = aniso->GetValue();
		settingsChanged = true;
	}
}
void BattleroomMMOptionsTab::OnSpinCtrlDoubleChange(wxSpinDoubleEvent& event)
{
	if (!m_battle)
		return;
	wxSpinCtrlDouble* box = (wxSpinCtrlDouble*)event.GetEventObject();
	const auto key = STD_STRING((box->GetName()).AfterFirst(sep));
	long gameoption;
	box->GetName().BeforeFirst(sep).ToLong(&gameoption);
	if (m_battle->CustomBattleOptions().setSingleOption(key, stdprintf("%f", box->GetValue()),
							    (LSL::Enum::GameOption)gameoption)) {
		if (m_battle->IsFounderMe()) {
			m_battle->SendHostInfo(STD_STRING((wxString() << gameoption) + wxsep + TowxString(key)));
		}
	}
}