diff options
author | Mateusz Kaduk <mateusz.kaduk@gmail.com> | 2005-06-18 12:06:24 +0000 |
---|---|---|
committer | Mateusz Kaduk <mateusz.kaduk@gmail.com> | 2005-06-18 12:06:24 +0000 |
commit | 275b80eca0ecc71262b4ca8aeba6e7501f711d43 (patch) | |
tree | f9d6e1d320056b90d22906a4e4dca045b388890b /src/game.cpp | |
parent | 80b43a59d63c3632cf9499f46f5224ec20ec6ff8 (diff) | |
download | mana-275b80eca0ecc71262b4ca8aeba6e7501f711d43.tar.gz mana-275b80eca0ecc71262b4ca8aeba6e7501f711d43.tar.bz2 mana-275b80eca0ecc71262b4ca8aeba6e7501f711d43.tar.xz mana-275b80eca0ecc71262b4ca8aeba6e7501f711d43.zip |
Removed old menu/menuitem and replaced by JAvila one
Diffstat (limited to 'src/game.cpp')
-rw-r--r-- | src/game.cpp | 44 |
1 files changed, 1 insertions, 43 deletions
diff --git a/src/game.cpp b/src/game.cpp index 1023be99..2ccb49f5 100644 --- a/src/game.cpp +++ b/src/game.cpp @@ -391,51 +391,9 @@ void do_input() int mx = event.button.x / 32 + camera_x; int my = event.button.y / 32 + camera_y; -//================================ By Javila ===============================// - /** - * NOTES: - * - added here just for testing purposes. I think it's better - * add to right mouse button, and put the actual right mouse - * button function as "default" actions in left mouse button. - * - the popup menu can't handle keyboard action/navigation. For - * keyboard input I think we can add slash (/) commands. - */ - if (event.button.button == 2) - { - popupMenu->showPopup(mx, my); - } -//==========================================================================// - if (event.button.button == 3) { - Being *target = findNode(mx, my); - if (target) { - if (target->isNpc()) { - // Check if no conflicting NPC window is open - if (current_npc == 0) - { - WFIFOW(0) = net_w_value(0x0090); - WFIFOL(2) = net_l_value(target->id); - WFIFOB(6) = 0; - WFIFOSET(7); - current_npc = target->id; - } - } - else if (target->isMonster()) { - if (keys[SDLK_LSHIFT]) { - if (target->action != MONSTER_DEAD) { - autoTarget = target; - } - } - attack(target); - } - else if (target->isPlayer()) { - // Show menu - menu->setVisible(!menu->isVisible()); - // Pass target to menu - menu->setBeing(target); - } - } + popupMenu->showPopup(mx, my); } } else if (event.type == SDL_QUIT) |