Exemplo n.º 1
0
void abstract_panel::OnSpinCtrlDoubleChange(SlSpinDoubleEvent& event)
{
	if (event.GetId()==ID_W4_BumpWaterAnisotropy)
	{
		SlSpinCtrlDouble<abstract_panel>* aniso = (SlSpinCtrlDouble<abstract_panel>*) event.GetEventObject();
		(floatSettings)[W4_CONTROLS[6].key] = aniso->GetValue();
		settingsChanged = true;
	}
}
void BattleroomMMOptionsTab<BattleType>::OnSpinCtrlDoubleChange(SlSpinDoubleEvent& event)
{
	if ( !m_battle ) return;
	SlSpinCtrlDouble<ThisType>* box = (SlSpinCtrlDouble<ThisType>*) event.GetEventObject();
	wxString key = (box->GetName()).AfterFirst(sep);
	long gameoption;
	box->GetName().BeforeFirst(sep).ToLong(&gameoption);
	if(m_battle->CustomBattleOptions().setSingleOption( key,wxFormat( _T("%f") ) % box->GetValue(), (OptionsWrapper::GameOption)gameoption ) )
	{
		if (m_battle->IsFounderMe())
		{
		  m_battle->SendHostInfo(  (wxString()<< gameoption) + wxsep + key );
		}
	}
}