コード例 #1
0
ファイル: ui.cpp プロジェクト: open-develop/unrealspeccyp
void DrawText(const eRect& r, const char* s)
{
	//	strupr(const_cast<char*>(s));
	ePoint p = r.Beg();
	for(int i = 0; s[i]; ++i)
	{
		if(p.x + font.w > r.right)
			break;
		char c = s[i];
		if(c >= 96)
			c -= 32;
		font.Draw(c, p);
		p.x += font.w;
	}
}
コード例 #2
0
ファイル: ui.cpp プロジェクト: djdron/UnrealSpeccyP
void DrawText(const eRect& r, const char* s)
{
	//	strupr(const_cast<char*>(s));
	ePoint p = r.Beg();
	for(int i = 0; s[i]; ++i)
	{
		if(p.x + font.w > r.right)
			break;
		char c = toupper(s[i]);
		if(byte(c) >= 128) // non-ASCII
			c = '?';
		font.Draw(c, p);
		p.x += font.w;
	}
}