From 16b5831a6640bcd1f6f7f23c7b282544bea2b47d Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Tue, 26 May 2015 13:12:21 +0300 Subject: Use local TextChunk in windows for draw caption text. --- src/gui/widgets/window.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src/gui/widgets/window.h') diff --git a/src/gui/widgets/window.h b/src/gui/widgets/window.h index 2c174aeae..102aedf73 100644 --- a/src/gui/widgets/window.h +++ b/src/gui/widgets/window.h @@ -71,6 +71,8 @@ #include "listeners/mouselistener.h" #include "listeners/widgetlistener.h" +#include "gui/fonts/textchunk.h" + #include "gui/widgets/basiccontainer2.h" #include "resources/imagerect.h" @@ -511,7 +513,7 @@ class Window notfinal : public BasicContainer2, * @see getCaption */ void setCaption(const std::string& caption) - { mCaption = caption; } + { mCaption = caption; mTextChanged = true; } /** * Gets the caption of the window. @@ -669,6 +671,7 @@ class Window notfinal : public BasicContainer2, Rect mCloseRect; /**< Close button rectangle */ Rect mStickyRect; /**< Sticky button rectangle */ Rect mGripRect; /**< Resize grip rectangle */ + TextChunk mTextChunk; std::string mWindowName; /**< Name of the window */ int mMinWinWidth; /**< Minimum window width */ int mMinWinHeight; /**< Minimum window height */ @@ -707,6 +710,7 @@ class Window notfinal : public BasicContainer2, bool mStickyButtonLock; /**< Window locked if sticky enabled*/ bool mPlayVisibleSound; bool mInit; + bool mTextChanged; }; #endif // GUI_WIDGETS_WINDOW_H -- cgit v1.2.3-60-g2f50