commit 3a23aa5e
Now the fonts are visible again
Changed files
| M | source/code/MenuSystem.cpp before |
| M | source/code/MenuSystem.h before |
| M | source/code/main.cpp before |
| M | source/code/mainVars.hpp before |
| M | source/code/menudef.cpp before |
diff --git a/source/code/MenuSystem.cpp b/source/code/MenuSystem.cpp
index 5c2a26b..09bfcf1 100644
--- a/source/code/MenuSystem.cpp
+++ b/source/code/MenuSystem.cpp
@@ -97,7 +97,7 @@ void Button::drawToScreen() {
else {
gfx->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());
+ 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());
}
void Button::setPopOnRun(bool popOnRun) {
@@ -123,7 +123,7 @@ void Menu::drawSelf() {
(*it)->drawToScreen();
}
exit.drawToScreen();
- standardButton.thefont.draw(screen, 50, 50, "%s", title.c_str());
+ standardButton.thefont->draw(screen, 50, 50, "%s", title.c_str());
mouse.Draw(screen, SDL_GetTicks(), mousex, mousey);
}
diff --git a/source/code/MenuSystem.h b/source/code/MenuSystem.h
index 6212cf2..a443e23 100644
--- a/source/code/MenuSystem.h
+++ b/source/code/MenuSystem.h
@@ -44,7 +44,7 @@ struct ButtonGfx
int xsize;
int ysize;
//A TTFont used for writing the label on the buttons
- NFont thefont;
+ NFont* thefont;
void setSurfaces(sago::SagoSprite& marked, sago::SagoSprite& unmarked);
};
diff --git a/source/code/main.cpp b/source/code/main.cpp
index e587f68..58126d9 100644
--- a/source/code/main.cpp
+++ b/source/code/main.cpp
@@ -301,12 +301,15 @@ static int InitImages(sago::SagoSpriteHolder& holder) {
nf_button_color.b = 255;
nf_button_color.g = 255;
nf_button_color.r = 255;
+ nf_button_color.a = 255;
nf_standard_blue_color.b = 255;
nf_standard_blue_color.g = 0;
nf_standard_blue_color.r = 0;
+ nf_standard_blue_color.a = 255;
nf_standard_small_color.b = 0;
nf_standard_small_color.g = 0;
nf_standard_small_color.r = 200;
+ nf_standard_small_color.a = 255;
nf_button_font.load(screen, holder.GetDataHolder().getFontPtr("freeserif", 24), nf_button_color);
nf_standard_blue_font.load(screen, holder.GetDataHolder().getFontPtr("freeserif", 30), nf_standard_blue_color);
nf_standard_small_font.load(screen, holder.GetDataHolder().getFontPtr("freeserif", 16), nf_standard_small_color);
diff --git a/source/code/mainVars.hpp b/source/code/mainVars.hpp
index 4f66632..8d4756b 100644
--- a/source/code/mainVars.hpp
+++ b/source/code/mainVars.hpp
@@ -149,7 +149,6 @@ static bool bNearDeathPrev; //Near death status last time che
bool bFullscreen; //true if game is running fullscreen
static bool puzzleLoaded; //true if the puzzle levels have been loaded
static bool drawBalls; //if true balls are drawed to the screen, this might lower framerate too much
-static bool standardBackground;
bool highPriority;
static bool editorMode = false;
diff --git a/source/code/menudef.cpp b/source/code/menudef.cpp
index 5b26cad..f5e4b22 100644
--- a/source/code/menudef.cpp
+++ b/source/code/menudef.cpp
@@ -93,7 +93,7 @@ void Button_changekey::doAction() {
void InitMenues() {
standardButton.setSurfaces(menuMarked,menuUnmarked);
- standardButton.thefont = nf_scoreboard_font;
+ standardButton.thefont = &nf_scoreboard_font;
}
void runGame(int gametype,int level);