Esempio n. 1
0
		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;
		}
Esempio n. 2
0
	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);
	}
Esempio n. 3
0
	void RenderTextbox(GFX::FontData* fontData, GFXVec4 rectangle, float offset, float size, GFXVec4 color, const char* text)
	{
		GetTextManager().AddTextbox(fontData, rectangle, offset, size, color, text);
	}
Esempio n. 4
0
	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);
	}