summaryrefslogtreecommitdiff
path: root/src/gui/widgets/tabs
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2016-12-15 20:27:11 +0300
committerAndrei Karas <akaras@inbox.ru>2016-12-15 20:34:56 +0300
commitdb3b43538aae3ce9762de81295bc24f8eb53f016 (patch)
tree66908cfca7ae32305f6bcbe879c03161d83a8910 /src/gui/widgets/tabs
parent12429b0c526195fca2f9e99e49f94821271b76e8 (diff)
downloadmanaverse-db3b43538aae3ce9762de81295bc24f8eb53f016.tar.gz
manaverse-db3b43538aae3ce9762de81295bc24f8eb53f016.tar.bz2
manaverse-db3b43538aae3ce9762de81295bc24f8eb53f016.tar.xz
manaverse-db3b43538aae3ce9762de81295bc24f8eb53f016.zip
Add support for rectangular skills tabs.
Diffstat (limited to 'src/gui/widgets/tabs')
-rw-r--r--src/gui/widgets/tabs/skilltab.h18
1 files changed, 17 insertions, 1 deletions
diff --git a/src/gui/widgets/tabs/skilltab.h b/src/gui/widgets/tabs/skilltab.h
index 8aa8a2bf0..99f8491bb 100644
--- a/src/gui/widgets/tabs/skilltab.h
+++ b/src/gui/widgets/tabs/skilltab.h
@@ -26,6 +26,7 @@
#include "gui/windows/skilldialog.h"
#include "gui/widgets/skilllistbox.h"
+#include "gui/widgets/skillrectanglelistbox.h"
#include "gui/widgets/tabs/tab.h"
@@ -38,7 +39,18 @@ class SkillTab final : public Tab
const std::string &name,
SkillListBox *const listBox) :
Tab(widget),
- mListBox(listBox)
+ mListBox(listBox),
+ mRectangleListBox(nullptr)
+ {
+ setCaption(name);
+ }
+
+ SkillTab(const Widget2 *const widget,
+ const std::string &name,
+ SkillRectangleListBox *const listBox) :
+ Tab(widget),
+ mListBox(nullptr),
+ mRectangleListBox(listBox)
{
setCaption(name);
}
@@ -48,12 +60,15 @@ class SkillTab final : public Tab
~SkillTab()
{
delete2(mListBox)
+ delete2(mRectangleListBox)
}
SkillInfo *getSelectedInfo() const
{
if (mListBox)
return mListBox->getSelectedInfo();
+ else if (mRectangleListBox)
+ return mRectangleListBox->getSelectedInfo();
else
return nullptr;
}
@@ -67,6 +82,7 @@ class SkillTab final : public Tab
private:
SkillListBox *mListBox;
+ SkillRectangleListBox *mRectangleListBox;
};
#endif // GUI_WIDGETS_TABS_SKILLTAB_H