diff options
Diffstat (limited to 'src/gui')
-rw-r--r-- | src/gui/gui.cpp | 67 | ||||
-rw-r--r-- | src/gui/gui.h | 11 | ||||
-rw-r--r-- | src/gui/ministatus.cpp | 8 |
3 files changed, 6 insertions, 80 deletions
diff --git a/src/gui/gui.cpp b/src/gui/gui.cpp index 99883151..5314b9ba 100644 --- a/src/gui/gui.cpp +++ b/src/gui/gui.cpp @@ -42,14 +42,14 @@ #include "../resources/resourcemanager.h" // Guichan stuff -Gui *gui; -Viewport *viewport; /**< Viewport on the map. */ -SDLInput *guiInput; +Gui *gui = 0; +Viewport *viewport = 0; /**< Viewport on the map. */ +SDLInput *guiInput = 0; // Fonts used in showing hits -gcn::Font *hitRedFont; -gcn::Font *hitBlueFont; -gcn::Font *hitYellowFont; +gcn::Font *hitRedFont = 0; +gcn::Font *hitBlueFont = 0; +gcn::Font *hitYellowFont = 0; // Font used to display speech and player names gcn::Font *speechFont; @@ -122,60 +122,6 @@ Gui::Gui(Graphics *graphics): + e.getMessage()); } - // Set speech font - try { - speechFont = new gcn::ImageFont("graphics/gui/rpgfont_wider.png", - " abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ" - "0123456789.,!?-+/():;%&`'*#=[]\"<>{}^~|_@$\\" - "αΑιΙνΝσΣϊΪηλ₯£’‘ΏΰγυκρΡφόδΦάΔίψθΘεΕ" - ); - } - catch (gcn::Exception e) - { - logger->error(std::string("Unable to load rpgfont_wider.png: ") - + e.getMessage()); - } - - // Set npc name font - try { - npcNameFont = new gcn::ImageFont("graphics/gui/rpgfont_wider-blue.png", - " abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ" - "0123456789.,!?-+/():;%&`'*#=[]\"<>{}^~|_@$\\" - "αΑιΙνΝσΣϊΪηλ₯£’‘ΏΰγυκρΡφόδΦάΔίψθΘεΕ" - ); - } - catch (gcn::Exception e) - { - logger->error("Unable to load rpgfont_wider-blue.png!"); - } - - // Set monster name font - try { - mobNameFont = new gcn::ImageFont("graphics/gui/rpgfont_wider-orange.png", - " abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ" - "0123456789.,!?-+/():;%&`'*#=[]\"<>{}^~|_@$\\" - "αΑιΙνΝσΣϊΪηλ₯£’‘ΏΰγυκρΡφόδΦάΔίψθΘεΕ" - ); - } - catch (gcn::Exception e) - { - logger->error("Unable to load rpgfont_wider-orange.png!"); - } - - // Set GM name font - try { - gmNameFont = new gcn::ImageFont("graphics/gui/rpgfont_wider-green.png", - " abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ" - "0123456789.,!?-+/():;%&`'*#=[]\"<>{}^~|_@$\\" - "αΑιΙνΝσΣϊΪηλ₯£’‘ΏΰγυκρΡφόδΦάΔίψθΘεΕ" - ); - } - catch (gcn::Exception e) - { - logger->error("Unable to load rpgfont_wider-green.png!"); - } - - gcn::Widget::setGlobalFont(mGuiFont); // Load hits' colourful fonts @@ -219,7 +165,6 @@ Gui::~Gui() mMouseCursors->decRef(); delete mGuiFont; - delete speechFont; delete viewport; delete getTop(); diff --git a/src/gui/gui.h b/src/gui/gui.h index 2289ae0b..bb14d4dc 100644 --- a/src/gui/gui.h +++ b/src/gui/gui.h @@ -124,17 +124,6 @@ extern SDLInput *guiInput; /**< GUI input */ extern gcn::Font *hitRedFont; extern gcn::Font *hitBlueFont; extern gcn::Font *hitYellowFont; -/** - * Font used to display speech and player names - */ -extern gcn::Font *speechFont; - -/** - * being name fonts - */ -extern gcn::Font *npcNameFont; -extern gcn::Font *mobNameFont; -extern gcn::Font *gmNameFont; #endif diff --git a/src/gui/ministatus.cpp b/src/gui/ministatus.cpp index 04901379..f2e466f4 100644 --- a/src/gui/ministatus.cpp +++ b/src/gui/ministatus.cpp @@ -54,14 +54,6 @@ MiniStatusWindow::MiniStatusWindow(): mMpLabel->setDimension(mMpBar->getDimension()); mXpLabel->setDimension(mXpBar->getDimension()); - mHpLabel->setForegroundColor(gcn::Color(255, 255, 255)); - mMpLabel->setForegroundColor(gcn::Color(255, 255, 255)); - mXpLabel->setForegroundColor(gcn::Color(255, 255, 255)); - - mHpLabel->setFont(speechFont); - mMpLabel->setFont(speechFont); - mXpLabel->setFont(speechFont); - mHpLabel->setAlignment(gcn::Graphics::CENTER); mMpLabel->setAlignment(gcn::Graphics::CENTER); mXpLabel->setAlignment(gcn::Graphics::CENTER); |