From 275b80eca0ecc71262b4ca8aeba6e7501f711d43 Mon Sep 17 00:00:00 2001 From: Mateusz Kaduk Date: Sat, 18 Jun 2005 12:06:24 +0000 Subject: Removed old menu/menuitem and replaced by JAvila one --- src/game.cpp | 44 +------------------------------------------- 1 file changed, 1 insertion(+), 43 deletions(-) (limited to 'src/game.cpp') 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) -- cgit v1.2.3-70-g09d2