summaryrefslogtreecommitdiff
path: root/src/game.cpp
diff options
context:
space:
mode:
authorJared Adams <jaxad0127@gmail.com>2008-12-09 11:11:03 +0000
committerIra Rice <irarice@gmail.com>2008-12-09 12:45:17 -0700
commit197b8ef1b728aca409a3a5bd2ac6d52142c6ce4c (patch)
tree9ea07dac6626adb9c0ef77ffebc0081e867391c3 /src/game.cpp
parentb06085f83ecf8e801aac26546498de73b02f90fa (diff)
downloadmana-197b8ef1b728aca409a3a5bd2ac6d52142c6ce4c.tar.gz
mana-197b8ef1b728aca409a3a5bd2ac6d52142c6ce4c.tar.bz2
mana-197b8ef1b728aca409a3a5bd2ac6d52142c6ce4c.tar.xz
mana-197b8ef1b728aca409a3a5bd2ac6d52142c6ce4c.zip
Make the window shortcuts configurable
Diffstat (limited to 'src/game.cpp')
-rw-r--r--src/game.cpp38
1 files changed, 27 insertions, 11 deletions
diff --git a/src/game.cpp b/src/game.cpp
index 85799588..91a58d43 100644
--- a/src/game.cpp
+++ b/src/game.cpp
@@ -594,16 +594,6 @@ void Game::handleInput()
used = true;
break;
- case SDLK_F2: requestedWindow = statusWindow; break;
- case SDLK_F3: requestedWindow = inventoryWindow; break;
- case SDLK_F4: requestedWindow = equipmentWindow; break;
- case SDLK_F5: requestedWindow = skillDialog; break;
- case SDLK_F6: requestedWindow = minimap; break;
- case SDLK_F7: requestedWindow = chatWindow; break;
- case SDLK_F8: requestedWindow = itemShortcutWindow; break;
- case SDLK_F9: requestedWindow = setupWindow; break;
- case SDLK_F10: requestedWindow = debugWindow; break;
-
case SDLK_RETURN:
// Input chat window
if (chatWindow->isInputFocused() ||
@@ -704,7 +694,6 @@ void Game::handleInput()
if (item)
player_node->pickUp(item);
-
used = true;
}
break;
@@ -726,6 +715,33 @@ void Game::handleInput()
debugWindow->setVisible(false);
}
break;
+ case KeyboardConfig::KEY_WINDOW_STATUS:
+ requestedWindow = statusWindow;
+ break;
+ case KeyboardConfig::KEY_WINDOW_INVENTORY:
+ requestedWindow = inventoryWindow;
+ break;
+ case KeyboardConfig::KEY_WINDOW_EQUIPMENT:
+ requestedWindow = equipmentWindow;
+ break;
+ case KeyboardConfig::KEY_WINDOW_SKILL:
+ requestedWindow = skillDialog;
+ break;
+ case KeyboardConfig::KEY_WINDOW_MINIMAP:
+ requestedWindow = minimap;
+ break;
+ case KeyboardConfig::KEY_WINDOW_CHAT:
+ requestedWindow = chatWindow;
+ break;
+ case KeyboardConfig::KEY_WINDOW_SHORTCUT:
+ requestedWindow = itemShortcutWindow;
+ break;
+ case KeyboardConfig::KEY_WINDOW_SETUP:
+ requestedWindow = setupWindow;
+ break;
+ case KeyboardConfig::KEY_WINDOW_DEBUG:
+ requestedWindow = debugWindow;
+ break;
}
}