Beispiel #1
0
int OSDRegion::Osd_PutS(DWORD x, DWORD y, DWORD maxX, const char * str, WORD fcolor, WORD bcolor, BYTE fntType, BYTE fntSize, BYTE bDot, BYTE align)
{
	CRect rect(CPoint(x,y), CSize(maxX-x, 1000));
	rect.OffsetRect(CPoint(GetXOffs(), GetYOffs()));
	DWORD dwFlags = DT_TOP;
	switch(align)
	{
	case ALIGN_LEFT:
		dwFlags |= DT_LEFT;
		break;
	case ALIGN_CENTER:
		dwFlags |= DT_CENTER;
		break;
	case ALIGN_RIGHT:
		dwFlags |= DT_RIGHT;
		break;
	default:
		dwFlags |= DT_LEFT;
	}

	DrawSomeText(rect, str, fcolor, bcolor, fntType, fntSize, dwFlags, 0);
	return 1;
}
void DrawingManager::DrawStatBoard(int health, int score)
{
	DrawSomeText("Health: " + std::to_string(health), -1.3f, .97f, 0.1f, 0.0f, 1.0f, 1.0f, 1.0f, 1.0f);
	DrawSomeText("Score: " + std::to_string(score), 0.4f, .97f, 0.1f, 0.0f, 1.0f, 1.0f, 1.0f, 1.0f);
}