summaryrefslogtreecommitdiff
path: root/src/gui/widgets/button.h
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2015-05-23 23:55:26 +0300
committerAndrei Karas <akaras@inbox.ru>2015-05-23 23:57:25 +0300
commitef1767851f3b5509066b0106324c6619102de046 (patch)
tree4cd86ffba145dc686f33b3c195897312158f575b /src/gui/widgets/button.h
parent7e64832ec06e48711742329816f23c3429903a7a (diff)
downloadmv-ef1767851f3b5509066b0106324c6619102de046.tar.gz
mv-ef1767851f3b5509066b0106324c6619102de046.tar.bz2
mv-ef1767851f3b5509066b0106324c6619102de046.tar.xz
mv-ef1767851f3b5509066b0106324c6619102de046.zip
If window with button is hidden then release text image and vertexes.
This will reduce memory usage and not affect performance.
Diffstat (limited to 'src/gui/widgets/button.h')
-rw-r--r--src/gui/widgets/button.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/gui/widgets/button.h b/src/gui/widgets/button.h
index 153195454..d8c5e66b8 100644
--- a/src/gui/widgets/button.h
+++ b/src/gui/widgets/button.h
@@ -185,6 +185,8 @@ class Button final : public Widget,
void widgetMoved(const Event &event) override final;
+ void widgetHidden(const Event &event) override final;
+
void loadImage(const std::string &imageName);
void loadImageSet(const std::string &imageName);
@@ -245,6 +247,8 @@ class Button final : public Widget,
void mouseDragged(MouseEvent& event) override final;
+ void setParent(Widget *widget) override final;
+
enum
{
BUTTON_STANDARD = 0, // 0