From 12478121f86ea50672f5e392bc2b1e29c7fac700 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Tue, 19 May 2015 22:17:53 +0300 Subject: Use fast draw way in drawing string in buttons. --- src/gui/widgets/button.h | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'src/gui/widgets/button.h') diff --git a/src/gui/widgets/button.h b/src/gui/widgets/button.h index e568f8131..c97741548 100644 --- a/src/gui/widgets/button.h +++ b/src/gui/widgets/button.h @@ -66,6 +66,8 @@ #ifndef GUI_WIDGETS_BUTTON_H #define GUI_WIDGETS_BUTTON_H +#include "gui/fonts/textchunk.h" + #include "gui/widgets/widget.h" #include "listeners/focuslistener.h" @@ -204,7 +206,7 @@ class Button final : public Widget, * @see getCaption, adjustSize */ void setCaption(const std::string& caption) - { mCaption = caption; } + { mCaption = caption; mTextChanged = true;} /** * Gets the caption of the button. @@ -273,6 +275,9 @@ class Button final : public Widget, std::string mCaption; std::string mDescription; + + TextChunk mTextChunk; + ImageCollection *mVertexes2; Color mEnabledColor; Color mEnabledColor2; @@ -320,6 +325,7 @@ class Button final : public Widget, bool mStick; bool mPressed; + bool mTextChanged; }; #endif // GUI_WIDGETS_BUTTON_H -- cgit v1.2.3-60-g2f50