void cText_Box :: Create_From_Stream( CEGUI::XMLAttributes &attributes ) { cBaseBox::Create_From_Stream( attributes ); // text Set_Text( xml_string_to_string( attributes.getValueAsString( "text" ).c_str() ) ); }
void cText_Box::Load_From_XML(XmlAttributes& attributes) { cBaseBox::Load_From_XML(attributes); // text Set_Text(xml_string_to_string(attributes["text"])); }
void cOverworld :: elementEnd( const CEGUI::String &element ) { if( element == "property" || element == "Property" ) { return; } if( element == "information" ) { m_engine_version = m_xml_attributes.getValueAsInteger( "engine_version" ); m_last_saved = string_to_int64( m_xml_attributes.getValueAsString( "save_time" ).c_str() ); } else if( element == "settings" ) { // Author //author = m_xml_attributes.getValueAsString( "author" ).c_str(); // Version //version = m_xml_attributes.getValueAsString( "version" ).c_str(); // Music m_musicfile = xml_string_to_string( m_xml_attributes.getValueAsString( "music" ).c_str() ); // Camera Limits //pOverworld_Manager->camera->Set_Limits( GL_rect( static_cast<float>(m_xml_attributes.getValueAsInteger( "cam_limit_x" )), static_cast<float>(m_xml_attributes.getValueAsInteger( "cam_limit_y" )), static_cast<float>(m_xml_attributes.getValueAsInteger( "cam_limit_w" )), static_cast<float>(m_xml_attributes.getValueAsInteger( "cam_limit_h" )) ) ); } else if( element == "player" ) { // Start Waypoint m_player_start_waypoint = m_xml_attributes.getValueAsInteger( "waypoint" ); // Moving State m_player_moving_state = static_cast<Moving_state>(m_xml_attributes.getValueAsInteger( "moving_state" )); } else if( element == "background" ) { m_background_color = Color( static_cast<Uint8>(m_xml_attributes.getValueAsInteger( "color_red" )), m_xml_attributes.getValueAsInteger( "color_green" ), m_xml_attributes.getValueAsInteger( "color_blue" ) ); } else { // get World object cSprite *object = Create_World_Object_From_XML( element, m_xml_attributes, m_engine_version, m_sprite_manager, this ); // valid if( object ) { m_sprite_manager->Add( object ); } else if( element == "overworld" ) { // ignore } else if( element.length() ) { printf( "Warning : Overworld Unknown element : %s\n", element.c_str() ); } } // clear m_xml_attributes = CEGUI::XMLAttributes(); }
void cOverworld_description :: handle_world( const CEGUI::XMLAttributes &attributes ) { m_name = xml_string_to_string( attributes.getValueAsString( "name", m_name.c_str() ).c_str() ); m_visible = attributes.getValueAsBool( "visible", 1 ); }