bool CustomDeserialize( const TiXmlElement *pElement ) { const TiXmlElement *pPhrase = 0; while( pPhrase = pPhrase ? pPhrase->NextSiblingElement( "Phrase" ) : pElement->FirstChildElement( "Phrase" ) ) { std::string image, text; if ( pPhrase->QueryValueAttribute( "Image", &image ) != TIXML_SUCCESS ) continue; if ( pPhrase->QueryValueAttribute( "Text", &text ) != TIXML_SUCCESS ) continue; ImageHandle imgHandle = GetRender().LoadImage( image.c_str() ); TextHandle txtHandle = GetTextManager().LoadResource( text.c_str() ); m_levelDirector.m_briefing.push_back( STalkEntry( imgHandle, txtHandle ) ); } return true; }
void GetActualTextboxSize(GFX::FontData* fontData, float width, float size, const char* text, float& out_actualWidth, float& out_actualHeight) { GetTextManager().GetTextboxSize(fontData, width, size, text, out_actualWidth, out_actualHeight); }
void RenderTextbox(GFX::FontData* fontData, GFXVec4 rectangle, float offset, float size, GFXVec4 color, const char* text) { GetTextManager().AddTextbox(fontData, rectangle, offset, size, color, text); }
void RenderText(GFX::FontData* fontData, GFXVec2 position, float size, GFXVec4 color, const char* text) { GFX::Text t(position.x, position.y, size, size, fontData, color, text); GetTextManager().AddText(t); }