summaryrefslogtreecommitdiff
path: root/src/gui/widgets/button.h
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2015-05-19 22:17:53 +0300
committerAndrei Karas <akaras@inbox.ru>2015-05-20 00:02:36 +0300
commit12478121f86ea50672f5e392bc2b1e29c7fac700 (patch)
treeaa328efcc7dc8444e4b412518f6187ce41d69855 /src/gui/widgets/button.h
parente224a077737739a895fe533c9cce93783621d8e9 (diff)
downloadmv-12478121f86ea50672f5e392bc2b1e29c7fac700.tar.gz
mv-12478121f86ea50672f5e392bc2b1e29c7fac700.tar.bz2
mv-12478121f86ea50672f5e392bc2b1e29c7fac700.tar.xz
mv-12478121f86ea50672f5e392bc2b1e29c7fac700.zip
Use fast draw way in drawing string in buttons.
Diffstat (limited to 'src/gui/widgets/button.h')
-rw-r--r--src/gui/widgets/button.h8
1 files changed, 7 insertions, 1 deletions
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