diff options
-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); } - */ + } |