Esempio n. 1
0
void Map::RenderGlyphAtLocation(char glyph, const IntVector2& loc, const RGBA& col) {

	IntVector2 numTilesOnScreen = GetSize();
	Vector2 cellSize = Vector2(SCREEN_SIZE.x / (float)numTilesOnScreen.x, SCREEN_SIZE.y / (float)numTilesOnScreen.y);

	Vector2 positionToDrawFrom = loc.ToVector2() * cellSize;
	Vector2 positionToDrawTo = positionToDrawFrom + cellSize;

	String glyphStr = "";
	glyphStr.push_back(glyph);
	float lineHeight = abs((positionToDrawFrom.y - positionToDrawTo.y) * 0.75f);

	g_theUI->m_squirrelFont->DrawText2D(positionToDrawFrom, glyphStr, lineHeight, col);
}
Esempio n. 2
0
bool XMLElement::SetIntVector2(const ea::string& name, const IntVector2& value)
{
    return SetAttribute(name, value.ToString());
}
Esempio n. 3
0
IntVector2 Deserializer::ReadIntVector2()
{
    IntVector2 ret;
    Read((void*)ret.Data(), sizeof ret);
    return ret;
}
Esempio n. 4
0
void JSONValue::AddIntVector2(const IntVector2& value)
{
    AddString(value.ToString());
}
Esempio n. 5
0
void JSONValue::SetIntVector2(const String& name, const IntVector2& value)
{
    SetString(name, value.ToString());
}