summaryrefslogtreecommitdiff
path: root/src/gui/widgets
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/widgets')
-rw-r--r--src/gui/widgets/label.cpp1
-rw-r--r--src/gui/widgets/tabbedarea.h6
-rw-r--r--src/gui/widgets/tabs/debugwindowtabs.h2
-rw-r--r--src/gui/widgets/widget.cpp3
-rw-r--r--src/gui/widgets/widget.h8
5 files changed, 18 insertions, 2 deletions
diff --git a/src/gui/widgets/label.cpp b/src/gui/widgets/label.cpp
index af6fa973d..6df442229 100644
--- a/src/gui/widgets/label.cpp
+++ b/src/gui/widgets/label.cpp
@@ -139,6 +139,7 @@ void Label::init()
mPadding = mSkin->getPadding();
else
mPadding = 0;
+ setSelectable(false);
}
void Label::draw(Graphics *const graphics)
diff --git a/src/gui/widgets/tabbedarea.h b/src/gui/widgets/tabbedarea.h
index 3a34fc6a6..840dd84c6 100644
--- a/src/gui/widgets/tabbedarea.h
+++ b/src/gui/widgets/tabbedarea.h
@@ -237,6 +237,12 @@ class TabbedArea final : public ActionListener,
void selectPrevTab();
+ Widget *getTabContainer() const
+ { return mTabContainer; }
+
+ Widget *getWidgetContainer() const
+ { return mWidgetContainer; }
+
private:
typedef std::vector <std::pair<Tab*, Widget*> > TabContainer;
diff --git a/src/gui/widgets/tabs/debugwindowtabs.h b/src/gui/widgets/tabs/debugwindowtabs.h
index 43292bcd5..044a2884c 100644
--- a/src/gui/widgets/tabs/debugwindowtabs.h
+++ b/src/gui/widgets/tabs/debugwindowtabs.h
@@ -44,7 +44,7 @@ class DebugTab notfinal : public Container
protected:
explicit DebugTab(const Widget2 *const widget) :
Container(widget)
- { }
+ { setSelectable(false); }
};
class MapDebugTab final : public DebugTab
diff --git a/src/gui/widgets/widget.cpp b/src/gui/widgets/widget.cpp
index 986d97d99..4b4600dd6 100644
--- a/src/gui/widgets/widget.cpp
+++ b/src/gui/widgets/widget.cpp
@@ -105,7 +105,8 @@ Widget::Widget(const Widget2 *const widget) :
mEnabled(true),
mAllowLogic(true),
mMouseConsume(true),
- mRedraw(true)
+ mRedraw(true),
+ mSelectable(true)
{
mAllWidgets.push_back(this);
mAllWidgetsSet.insert(this);
diff --git a/src/gui/widgets/widget.h b/src/gui/widgets/widget.h
index 6556cc385..4cae7369e 100644
--- a/src/gui/widgets/widget.h
+++ b/src/gui/widgets/widget.h
@@ -1023,6 +1023,12 @@ class Widget notfinal : public Widget2
void setRedraw(const bool b) noexcept2
{ mRedraw = b; }
+ bool isSelectable() const noexcept2 A_WARN_UNUSED
+ { return mSelectable; }
+
+ void setSelectable(const bool selectable)
+ { mSelectable = selectable; }
+
static void distributeWindowResizeEvent();
void windowResized();
@@ -1246,6 +1252,8 @@ class Widget notfinal : public Widget2
bool mRedraw;
+ bool mSelectable;
+
/**
* Holds the global font used by the widget.
*/