summaryrefslogtreecommitdiff
path: root/src/gui/widgets/label.h
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2015-05-23 23:42:32 +0300
committerAndrei Karas <akaras@inbox.ru>2015-05-23 23:42:32 +0300
commit7e64832ec06e48711742329816f23c3429903a7a (patch)
treed06ffbb85a71174661c7f9c7944d05ecca30c0e7 /src/gui/widgets/label.h
parent89694323abffb1c73c85d49460991b3e6f20f098 (diff)
downloadmanaverse-7e64832ec06e48711742329816f23c3429903a7a.tar.gz
manaverse-7e64832ec06e48711742329816f23c3429903a7a.tar.bz2
manaverse-7e64832ec06e48711742329816f23c3429903a7a.tar.xz
manaverse-7e64832ec06e48711742329816f23c3429903a7a.zip
If window with label is hidden then release text image.
This will reduce memore usage and not affect performance.
Diffstat (limited to 'src/gui/widgets/label.h')
-rw-r--r--src/gui/widgets/label.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/gui/widgets/label.h b/src/gui/widgets/label.h
index 9e82f0a5d..813248da8 100644
--- a/src/gui/widgets/label.h
+++ b/src/gui/widgets/label.h
@@ -70,6 +70,7 @@
#include "gui/widgets/widget.h"
#include "listeners/tooltiplistener.h"
+#include "listeners/widgetlistener.h"
#include "localconsts.h"
@@ -82,6 +83,7 @@ class Skin;
* \ingroup GUI
*/
class Label final : public Widget,
+ public WidgetListener,
public ToolTipListener
{
public:
@@ -156,6 +158,10 @@ class Label final : public Widget,
Graphics::Alignment getAlignment() const
{ return mAlignment; }
+ void setParent(Widget *widget) override final;
+
+ void widgetHidden(const Event &event) override final;
+
static Skin *mSkin;
static int mInstances;