Added grey highlighting to the debug text
This commit is contained in:
@@ -114,13 +114,15 @@ void EditorScene::Render(SDL_Surface* const screen) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void EditorScene::DrawToDebugInfo(std::string str, int line) {
|
void EditorScene::DrawToDebugInfo(std::string str, int line) {
|
||||||
//draw the debug info on the right
|
//draw the debug info on the right, with a grey background
|
||||||
font.DrawStringTo(
|
SDL_Rect clip = {
|
||||||
str,
|
Sint16(debugInfo.GetClipW() - str.size() * font.GetCharW()),
|
||||||
debugInfo.GetSurface(),
|
Sint16(font.GetCharH() * line),
|
||||||
debugInfo.GetClipW() - str.size() * font.GetCharW(),
|
Uint16(str.size() * font.GetCharW()),
|
||||||
font.GetCharH() * line
|
Uint16(font.GetCharH())
|
||||||
);
|
};
|
||||||
|
SDL_FillRect(debugInfo.GetSurface(), &clip, SDL_MapRGB(debugInfo.GetSurface()->format, 64, 64, 64));
|
||||||
|
font.DrawStringTo(str, debugInfo.GetSurface(), clip.x, clip.y);
|
||||||
}
|
}
|
||||||
|
|
||||||
//-------------------------
|
//-------------------------
|
||||||
|
|||||||
Reference in New Issue
Block a user