diff options
author | Andrei Karas <akaras@inbox.ru> | 2012-10-20 01:21:22 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2012-10-20 13:55:43 +0300 |
commit | 312118f5a7a1a7537cfb20f61d9b408dfcf03e8c (patch) | |
tree | 5339e8d288dd5db148e1d55493ac2f86fdfa617a /src/gui | |
parent | 230e3d909340a3fb501ab1e67ae95a86eb58e2aa (diff) | |
download | manaplus-312118f5a7a1a7537cfb20f61d9b408dfcf03e8c.tar.gz manaplus-312118f5a7a1a7537cfb20f61d9b408dfcf03e8c.tar.bz2 manaplus-312118f5a7a1a7537cfb20f61d9b408dfcf03e8c.tar.xz manaplus-312118f5a7a1a7537cfb20f61d9b408dfcf03e8c.zip |
Add palette inheritance to guitable class.
Diffstat (limited to 'src/gui')
-rw-r--r-- | src/gui/botcheckerwindow.cpp | 4 | ||||
-rw-r--r-- | src/gui/setup_relations.cpp | 2 | ||||
-rw-r--r-- | src/gui/widgets/guitable.cpp | 5 | ||||
-rw-r--r-- | src/gui/widgets/guitable.h | 3 |
4 files changed, 8 insertions, 6 deletions
diff --git a/src/gui/botcheckerwindow.cpp b/src/gui/botcheckerwindow.cpp index 272a172b2..6430a9d37 100644 --- a/src/gui/botcheckerwindow.cpp +++ b/src/gui/botcheckerwindow.cpp @@ -268,11 +268,11 @@ BotCheckerWindow::BotCheckerWindow(): Window(_("Bot Checker"), false, nullptr, "botchecker.xml"), gcn::ActionListener(), mTableModel(new UsersTableModel()), - mTable(new GuiTable(mTableModel)), + mTable(new GuiTable(this, mTableModel)), playersScrollArea(new ScrollArea(mTable, true, "bochecker_background.xml")), mPlayerTableTitleModel(new StaticTableModel(1, COLUMNS_NR)), - mPlayerTitleTable(new GuiTable(mPlayerTableTitleModel)), + mPlayerTitleTable(new GuiTable(this, mPlayerTableTitleModel)), mIncButton(new Button(this, _("Reset"), "reset", this)), mLastUpdateTime(0), mNeedUpdate(false), diff --git a/src/gui/setup_relations.cpp b/src/gui/setup_relations.cpp index 74a440434..97d962f2a 100644 --- a/src/gui/setup_relations.cpp +++ b/src/gui/setup_relations.cpp @@ -241,7 +241,7 @@ Setup_Relations::Setup_Relations(const Widget2 *const widget) : mPlayerTableTitleModel(new StaticTableModel(1, COLUMNS_NR)), mPlayerTableModel(new PlayerTableModel(this)), mPlayerTable(new GuiTable(mPlayerTableModel)), - mPlayerTitleTable(new GuiTable(mPlayerTableTitleModel)), + mPlayerTitleTable(new GuiTable(this, mPlayerTableTitleModel)), mPlayerScrollArea(new ScrollArea(mPlayerTable)), mDefaultTrading(new CheckBox(this, _("Allow trading"), player_relations.getDefault() & PlayerRelation::TRADE)), diff --git a/src/gui/widgets/guitable.cpp b/src/gui/widgets/guitable.cpp index 9f0dc47e3..d661e23df 100644 --- a/src/gui/widgets/guitable.cpp +++ b/src/gui/widgets/guitable.cpp @@ -92,9 +92,10 @@ void GuiTableActionListener::action(const gcn::ActionEvent } -GuiTable::GuiTable(TableModel *const initial_model, const bool opacity) : +GuiTable::GuiTable(const Widget2 *const widget, + TableModel *const initial_model, const bool opacity) : gcn::Widget(), - Widget2(), + Widget2(widget), gcn::MouseListener(), gcn::KeyListener(), mLinewiseMode(false), diff --git a/src/gui/widgets/guitable.h b/src/gui/widgets/guitable.h index f7d5addb5..704276026 100644 --- a/src/gui/widgets/guitable.h +++ b/src/gui/widgets/guitable.h @@ -55,7 +55,8 @@ class GuiTable final : public gcn::Widget, friend class GuiTableActionListener; public: - GuiTable(TableModel *const initial_model = nullptr, + GuiTable(const Widget2 *const widget, + TableModel *const initial_model = nullptr, const bool opacity = true); A_DELETE_COPY(GuiTable) |