From db3b43538aae3ce9762de81295bc24f8eb53f016 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Thu, 15 Dec 2016 20:27:11 +0300 Subject: Add support for rectangular skills tabs. --- src/gui/widgets/tabs/skilltab.h | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) (limited to 'src/gui/widgets/tabs/skilltab.h') 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 -- cgit v1.2.3-70-g09d2