From b7b2a60eff4638989b00491d648be3f4a5f516a4 Mon Sep 17 00:00:00 2001 From: Alayan Date: Fri, 5 Oct 2018 20:21:57 +0200 Subject: [PATCH] Allow to set custom colored border through ScalableFonts --- src/guiengine/scalable_font.cpp | 13 ++++++++++++- src/guiengine/scalable_font.hpp | 4 ++++ 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/src/guiengine/scalable_font.cpp b/src/guiengine/scalable_font.cpp index e00edc9ba..58f7049f6 100644 --- a/src/guiengine/scalable_font.cpp +++ b/src/guiengine/scalable_font.cpp @@ -56,11 +56,22 @@ void ScalableFont::setShadow(const irr::video::SColor &col) void ScalableFont::disableShadow() { m_font_settings->setShadow(false); -} // setShadow +} // disableShadow // ---------------------------------------------------------------------------- void ScalableFont::setBlackBorder(bool enabled) { m_font_settings->setBlackBorder(enabled); +} // setBlackBorder +// ---------------------------------------------------------------------------- +void ScalableFont::setColoredBorder(const irr::video::SColor &col) +{ + m_font_settings->setColoredBorder(true); + m_font_settings->setBorderColor(col); +} // setColoredBorder +// ---------------------------------------------------------------------------- +void ScalableFont::disableColoredBorder() +{ + m_font_settings->setColoredBorder(false); } // setShadow // ---------------------------------------------------------------------------- diff --git a/src/guiengine/scalable_font.hpp b/src/guiengine/scalable_font.hpp index d96164c2a..1e76a849b 100644 --- a/src/guiengine/scalable_font.hpp +++ b/src/guiengine/scalable_font.hpp @@ -59,6 +59,10 @@ public: // ------------------------------------------------------------------------ void setBlackBorder(bool enabled); // ------------------------------------------------------------------------ + void setColoredBorder(const irr::video::SColor &col); + // ------------------------------------------------------------------------ + void disableColoredBorder(); + // ------------------------------------------------------------------------ void updateRTL(); // ------------------------------------------------------------------------ void draw(const core::stringw& text, const core::rect& position,