Commit 4423a82c authored by Chen Bill's avatar Chen Bill Committed by GitHub

Game: add static function DrawShadowText (#2614)

* add static function DrawShadowText

* add static function DrawShadowText

* reorder
parent ca304499
...@@ -412,8 +412,8 @@ void Game::DrawCard(ClientCard* pcard) { ...@@ -412,8 +412,8 @@ void Game::DrawCard(ClientCard* pcard) {
} }
} }
template<typename T> template<typename T>
inline void DrawShadowText(irr::gui::CGUITTFont* font, const T& text, const core::rect<s32>& position, const core::rect<s32>& padding, void Game::DrawShadowText(irr::gui::CGUITTFont* font, const T& text, const core::rect<s32>& position, const core::rect<s32>& padding,
video::SColor color = 0xffffffff, video::SColor shadowcolor = 0xff000000, bool hcenter = false, bool vcenter = false, const core::rect<s32>* clip = nullptr) { video::SColor color, video::SColor shadowcolor, bool hcenter, bool vcenter, const core::rect<s32>* clip) {
core::rect<s32> shadowposition = recti(position.UpperLeftCorner.X - padding.UpperLeftCorner.X, position.UpperLeftCorner.Y - padding.UpperLeftCorner.Y, core::rect<s32> shadowposition = recti(position.UpperLeftCorner.X - padding.UpperLeftCorner.X, position.UpperLeftCorner.Y - padding.UpperLeftCorner.Y,
position.LowerRightCorner.X - padding.LowerRightCorner.X, position.LowerRightCorner.Y - padding.LowerRightCorner.Y); position.LowerRightCorner.X - padding.LowerRightCorner.X, position.LowerRightCorner.Y - padding.LowerRightCorner.Y);
font->drawUstring(text, shadowposition, shadowcolor, hcenter, vcenter, clip); font->drawUstring(text, shadowposition, shadowcolor, hcenter, vcenter, clip);
......
...@@ -219,6 +219,9 @@ public: ...@@ -219,6 +219,9 @@ public:
void SetWindowsScale(float scale); void SetWindowsScale(float scale);
void FlashWindow(); void FlashWindow();
void SetCursor(ECURSOR_ICON icon); void SetCursor(ECURSOR_ICON icon);
template<typename T>
static void DrawShadowText(irr::gui::CGUITTFont* font, const T& text, const core::rect<s32>& position, const core::rect<s32>& padding,
video::SColor color = 0xffffffff, video::SColor shadowcolor = 0xff000000, bool hcenter = false, bool vcenter = false, const core::rect<s32>* clip = nullptr);
std::mutex gMutex; std::mutex gMutex;
Signal frameSignal; Signal frameSignal;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment