diff options
Diffstat (limited to 'src/graphics.h')
-rw-r--r-- | src/graphics.h | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/src/graphics.h b/src/graphics.h index 9d8a9215..b6508753 100644 --- a/src/graphics.h +++ b/src/graphics.h @@ -29,6 +29,9 @@ #include <guichan/graphics.hpp> #include <memory> +#include <optional> + +struct TextFormat; enum class FillMode { @@ -187,6 +190,25 @@ class Graphics : public gcn::Graphics drawImageRect(imgRect, area.x, area.y, area.width, area.height); } + using gcn::Graphics::drawText; + + void drawText(const std::string &text, + int x, int y, + gcn::Graphics::Alignment alignment, + const gcn::Color &color, + gcn::Font *font, + bool outline = false, + bool shadow = false, + const std::optional<gcn::Color> &outlineColor = {}, + const std::optional<gcn::Color> &shadowColor = {}); + + void drawText(const std::string &text, + int x, + int y, + gcn::Graphics::Alignment align, + gcn::Font *font, + const TextFormat &format); + /** * Updates the screen. This is done by either copying the buffer to the * screen or swapping pages. |