diff options
author | Mateusz Kaduk <mateusz.kaduk@gmail.com> | 2005-06-18 18:16:55 +0000 |
---|---|---|
committer | Mateusz Kaduk <mateusz.kaduk@gmail.com> | 2005-06-18 18:16:55 +0000 |
commit | 9c58f82dc6baddadecec2db477bb67a61894f7c2 (patch) | |
tree | 66646eea939936ba1457df8e9d465a32a80393b5 | |
parent | 764f91c56a867efb081b233eedca3abe9a199127 (diff) | |
download | mana-client-9c58f82dc6baddadecec2db477bb67a61894f7c2.tar.gz mana-client-9c58f82dc6baddadecec2db477bb67a61894f7c2.tar.bz2 mana-client-9c58f82dc6baddadecec2db477bb67a61894f7c2.tar.xz mana-client-9c58f82dc6baddadecec2db477bb67a61894f7c2.zip |
Small fix to buddywindow buttons
-rw-r--r-- | src/game.cpp | 8 | ||||
-rw-r--r-- | src/gui/buddywindow.cpp | 18 |
2 files changed, 13 insertions, 13 deletions
diff --git a/src/game.cpp b/src/game.cpp index 2ccb49f5..c64cd69e 100644 --- a/src/game.cpp +++ b/src/game.cpp @@ -321,10 +321,10 @@ void do_input() equipmentWindow->setVisible(!equipmentWindow->isVisible()); used = true; } - //else if (keysym.sym == SDLK_b) { - // buddyWindow->setVisible(!buddyWindow->isVisible()); - // used = true; - //} + else if (keysym.sym == SDLK_b) { + buddyWindow->setVisible(!buddyWindow->isVisible()); + used = true; + } } if (event.key.keysym.sym == SDLK_ESCAPE) diff --git a/src/gui/buddywindow.cpp b/src/gui/buddywindow.cpp index d5e9e7a0..5ca1b361 100644 --- a/src/gui/buddywindow.cpp +++ b/src/gui/buddywindow.cpp @@ -24,7 +24,7 @@ #include "buddywindow.h" BuddyWindow::BuddyWindow(): - Window("Buddys") + Window("Buddy") { setContentSize(120, 200); @@ -71,17 +71,17 @@ void BuddyWindow::draw(gcn::Graphics *graphics) void BuddyWindow::action(const std::string& eventId) { - if(eventId.compare("Cancel")) { - setVisible(false); + if(eventId == "Talk") { + // TODO } - /* - else if(eventId.compare("Remove")) { + else if(eventId == "Remove") { int selected = listbox->getSelected(); - std::string who = this->getElementAt(selected); + std::string who = getElementAt(selected); removeBuddy(who); - } else if(eventId.compare("Talk")) { - // TODO + } + else if(eventId == "Cancel") { + setVisible(false); } - */ + } |