commit 92ec708e
Use the constants instead of hardcoded strings
Changed files
| M | source/code/MenuSystem.cpp before |
diff --git a/source/code/MenuSystem.cpp b/source/code/MenuSystem.cpp
index be3a5e3..4656f15 100644
--- a/source/code/MenuSystem.cpp
+++ b/source/code/MenuSystem.cpp
@@ -95,11 +95,12 @@ void Button::drawToScreen() {
//cout << "Painting button: " << label << " at: " << x << "," << y << "\n";
#endif
if (marked) {
- spriteHolder->GetSprite("menu_marked").Draw(screen, SDL_GetTicks(), x, y);
+ spriteHolder->GetSprite(menu_marked).Draw(screen, SDL_GetTicks(), x, y);
}
else {
- spriteHolder->GetSprite("menu_unmarked").Draw(screen, SDL_GetTicks(), x, y);
+ spriteHolder->GetSprite(menu_unmarked).Draw(screen, SDL_GetTicks(), x, y);
}
+
gfx->thefont->draw(screen, x+gfx->xsize/2,y+gfx->ysize/2-gfx->thefont->getHeight("%s", label.c_str())/2, NFont::CENTER, "%s", label.c_str());
}