bool cRandom_Sound::Editor_Delay_Max_Text_Changed(const CEGUI::EventArgs& event) { const CEGUI::WindowEventArgs& windowEventArgs = static_cast<const CEGUI::WindowEventArgs&>(event); std::string str_text = static_cast<CEGUI::Editbox*>(windowEventArgs.window)->getText().c_str(); Set_Delay_Max(string_to_int(str_text)); return 1; }
void cRandom_Sound :: Create_From_Stream( CEGUI::XMLAttributes &attributes ) { // filename Set_Filename( attributes.getValueAsString( "file" ).c_str() ); // position Set_Pos( static_cast<float>(attributes.getValueAsInteger( "pos_x" )), static_cast<float>(attributes.getValueAsInteger( "pos_y" )), 1 ); // Set_Continuous( attributes.getValueAsBool( "continuous", m_continuous ) ); // delay Set_Delay_Min( attributes.getValueAsInteger( "delay_min", m_delay_min ) ); Set_Delay_Max( attributes.getValueAsInteger( "delay_max", m_delay_max ) ); // volume Set_Volume_Min( attributes.getValueAsFloat( "volume_min", m_volume_min ) ); Set_Volume_Max( attributes.getValueAsFloat( "volume_max", m_volume_max ) ); // volume reduction Set_Volume_Reduction_Begin( attributes.getValueAsFloat( "volume_reduction_begin", m_volume_reduction_begin ) ); Set_Volume_Reduction_End( attributes.getValueAsFloat( "volume_reduction_end", m_volume_reduction_end ) ); }