commit 21b195c1
Removed FontWrapper
Changed files
| D | source/code/FontWrapper.hpp before |
| M | source/code/MenuSystem.h before |
| M | source/code/global.hpp before |
diff --git a/source/code/FontWrapper.hpp b/source/code/FontWrapper.hpp
deleted file mode 100644
index 1eb6b55..0000000
--- a/source/code/FontWrapper.hpp
+++ /dev/null
@@ -1,65 +0,0 @@
-/*
-===========================================================================
-blockattack - Block Attack - Rise of the Blocks
-Copyright (C) 2005-2017 Poul Sander
-
-This program is free software: you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation, either version 2 of the License, or
-(at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program. If not, see http://www.gnu.org/licenses/
-
-Source information and contacts persons can be found at
-http://www.blockattack.net
-===========================================================================
-*/
-
-
-#ifndef FONTWRAPPER_HPP
-#define FONTWRAPPER_HPP
-
-#include "Libs/NFont.h"
-#include "sago/SagoDataHolder.hpp"
-
-class FontWrapper {
- NFont theFont;
-
-public:
- void draw(SDL_Renderer* target, int x, int y, const std::string& text) {
- theFont.draw(target, x, y, "%s", text.c_str());
- }
-
- void drawCenter(SDL_Renderer* target, int x, int y, const std::string& text) {
- theFont.draw(target, x, y, NFont::CENTER, "%s", text.c_str());
- }
-
- void drawCenterAlsoHeight(SDL_Renderer* target, int x, int y, const std::string& text) {
- theFont.draw(target, x, y-theFont.getHeight()/2, NFont::CENTER, "%s", text.c_str());
- }
-
- void drawRight(SDL_Renderer* target, int x, int y, const std::string& text) {
- theFont.draw(target, x, y, NFont::RIGHT, "%s", text.c_str());
- }
-
- NFont::Rectf drawBox(SDL_Renderer* dest, const NFont::Rectf& box, const std::string& formatted_text) {
- return theFont.drawBox(dest, box, "%s", formatted_text.c_str());
- }
-
- size_t getWidth(const std::string& text) {
- return theFont.getWidth("%s", text.c_str());
- }
-
- bool load(SDL_Renderer* target, TTF_Font* font, const NFont::Color& color) {
- return theFont.load(target, font, color);
- }
-};
-
-#endif /* FONTWRAPPER_HPP */
-
diff --git a/source/code/MenuSystem.h b/source/code/MenuSystem.h
index a394e11..dd12896 100644
--- a/source/code/MenuSystem.h
+++ b/source/code/MenuSystem.h
@@ -33,7 +33,6 @@ http://blockattack.net
#include "sago/SagoSprite.hpp"
#include "sago/GameStateInterface.hpp"
#include <memory>
-#include "FontWrapper.hpp"
#include "sago/SagoTextField.hpp"
//The ButtonGfx object hold common media for all buttons, so we can reskin them by only changeing one pointer
diff --git a/source/code/global.hpp b/source/code/global.hpp
index 61869b8..a7b7a67 100644
--- a/source/code/global.hpp
+++ b/source/code/global.hpp
@@ -29,7 +29,6 @@ http://www.blockattack.net
#include "sago/SagoSpriteHolder.hpp"
#include "highscore.h"
#include "sago/GameStateInterface.hpp"
-#include "FontWrapper.hpp"
#include "TextManager.hpp"
#include "ExplosionManager.hpp"
#include "sago/SagoTextField.hpp"