summaryrefslogtreecommitdiff
path: root/src/game.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/game.cpp')
-rw-r--r--src/game.cpp44
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)