diff options
author | Bjørn Lindeijer <bjorn@lindeijer.nl> | 2008-05-19 10:48:18 +0000 |
---|---|---|
committer | Bjørn Lindeijer <bjorn@lindeijer.nl> | 2008-05-19 10:48:18 +0000 |
commit | 0c869fc47a30616967cb8b69af9ec772566d7076 (patch) | |
tree | 7202c51c95648dd3862a57f21eb82fc9cc0b7b69 /src/gui/setup_players.cpp | |
parent | 8d3028707f0c5b65c3a78178f63a0cccc9a0c9a8 (diff) | |
download | mana-0c869fc47a30616967cb8b69af9ec772566d7076.tar.gz mana-0c869fc47a30616967cb8b69af9ec772566d7076.tar.bz2 mana-0c869fc47a30616967cb8b69af9ec772566d7076.tar.xz mana-0c869fc47a30616967cb8b69af9ec772566d7076.zip |
Removed the PopupBox class and used gcn::DropDown instead. It has clipping
issues, but it would be better to fix those instead of using this complicated
workaround.
Diffstat (limited to 'src/gui/setup_players.cpp')
-rw-r--r-- | src/gui/setup_players.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/gui/setup_players.cpp b/src/gui/setup_players.cpp index 16c916b4..ae0e7271 100644 --- a/src/gui/setup_players.cpp +++ b/src/gui/setup_players.cpp @@ -24,10 +24,10 @@ #include "setup_players.h" #include <vector> +#include <guichan/widgets/dropdown.hpp> #include <guichan/widgets/label.hpp> -#include "popup_box.h" -#include "button.h" +#include "button.h" #include "checkbox.h" #include "ok_dialog.h" @@ -127,7 +127,7 @@ public: gcn::Widget *widget = new gcn::Label(name); mWidgets.push_back(widget); - PopupBox *choicebox = new PopupBox(new PlayerRelationListModel()); + gcn::DropDown *choicebox = new gcn::DropDown(new PlayerRelationListModel()); choicebox->setSelected(player_relations.getRelation(name)); mWidgets.push_back(choicebox); } @@ -137,7 +137,7 @@ public: virtual void updateModelInRow(int row) { - PopupBox *choicebox = dynamic_cast<PopupBox *>(getElementAt(row, RELATION_CHOICE_COLUMN)); + gcn::DropDown *choicebox = dynamic_cast<gcn::DropDown *>(getElementAt(row, RELATION_CHOICE_COLUMN)); player_relations.setRelation(getPlayerAt(row), static_cast<PlayerRelation::relation>(choicebox->getSelected())); } @@ -207,7 +207,7 @@ Setup_Players::Setup_Players(): mDefaultTrading(new CheckBox("allow trading", player_relations.getDefault() & PlayerRelation::TRADE)), mDefaultWhisper(new CheckBox("allow whispers", player_relations.getDefault() & PlayerRelation:: WHISPER)), mDeleteButton(new Button("Delete", ACTION_DELETE, this)), - mIgnoreActionChoicesBox(new PopupBox(new IgnoreChoicesListModel())) + mIgnoreActionChoicesBox(new gcn::DropDown(new IgnoreChoicesListModel())) { setOpaque(false); |