summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJared Adams <jaxad0127@gmail.com>2008-12-09 11:11:03 +0000
committerJared Adams <jaxad0127@gmail.com>2008-12-09 11:11:03 +0000
commit4f2749ab2782fdece3c098b1a52b69cb37eea9eb (patch)
tree0cf34d76971d3a70d89925674b6554a8bfd3f2b6 /src
parentf68e18efa64bdb9a67f7ce05b5868f450b9af2e0 (diff)
downloadmana-4f2749ab2782fdece3c098b1a52b69cb37eea9eb.tar.gz
mana-4f2749ab2782fdece3c098b1a52b69cb37eea9eb.tar.bz2
mana-4f2749ab2782fdece3c098b1a52b69cb37eea9eb.tar.xz
mana-4f2749ab2782fdece3c098b1a52b69cb37eea9eb.zip
Make the window shortcuts configurable
Diffstat (limited to 'src')
-rw-r--r--src/game.cpp18
-rw-r--r--src/keyboardconfig.cpp11
-rw-r--r--src/keyboardconfig.h9
3 files changed, 28 insertions, 10 deletions
diff --git a/src/game.cpp b/src/game.cpp
index e934736e..e2c4d2fc 100644
--- a/src/game.cpp
+++ b/src/game.cpp
@@ -592,15 +592,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_F11: requestedWindow = newSkillWindow; break;
case SDLK_RETURN:
@@ -716,6 +707,15 @@ 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;
}
}
diff --git a/src/keyboardconfig.cpp b/src/keyboardconfig.cpp
index 19cbb945..60b0c02a 100644
--- a/src/keyboardconfig.cpp
+++ b/src/keyboardconfig.cpp
@@ -57,7 +57,16 @@ static KeyData const keyData[KeyboardConfig::KEY_TOTAL] = {
{"keyShortcut6", SDLK_6, "Item Shortcut 6"},
{"keyShortcut7", SDLK_7, "Item Shortcut 7"},
{"keyShortcut8", SDLK_8, "Item Shortcut 8"},
- {"keyShortcut9", SDLK_9, "Item Shortcut 9"}
+ {"keyShortcut9", SDLK_9, "Item Shortcut 9"},
+ {"keyWindowStatus", SDLK_F2, "Status Window"},
+ {"keyWindowInventory", SDLK_F3, "Inventory Window"},
+ {"keyWindowEquipment", SDLK_F4, "Equipment WIndow"},
+ {"keyWindowSkill", SDLK_F5, "Skill Window"},
+ {"keyWindowMinimap", SDLK_F6, "Minimap Window"},
+ {"keyWindowChat", SDLK_F7, "Chat Window"},
+ {"keyWindowShortcut", SDLK_F8, "Item Shortcut Window"},
+ {"keyWindowSetup", SDLK_F9, "Setup Window"},
+ {"keyWindowDebug", SDLK_F10, "Debug Window"}
};
void KeyboardConfig::init()
diff --git a/src/keyboardconfig.h b/src/keyboardconfig.h
index 9c5fe943..c6769821 100644
--- a/src/keyboardconfig.h
+++ b/src/keyboardconfig.h
@@ -166,6 +166,15 @@ class KeyboardConfig
KEY_SHORTCUT_7,
KEY_SHORTCUT_8,
KEY_SHORTCUT_9,
+ KEY_WINDOW_STATUS,
+ KEY_WINDOW_INVENTORY,
+ KEY_WINDOW_EQUIPMENT,
+ KEY_WINDOW_SKILL,
+ KEY_WINDOW_MINIMAP,
+ KEY_WINDOW_CHAT,
+ KEY_WINDOW_SHORTCUT,
+ KEY_WINDOW_SETUP,
+ KEY_WINDOW_DEBUG,
KEY_TOTAL
};