1
0
Fork 0
mirror of https://github.com/AquariaOSE/Aquaria.git synced 2025-01-24 01:06:41 +00:00

Move key config strings into stringbank.txt

This commit is contained in:
fgenesis 2012-07-14 16:54:28 +02:00
parent de69273229
commit 927928167b
5 changed files with 67 additions and 35 deletions

View file

@ -200,7 +200,7 @@ public:
StringBank();
void load();
std::string get(int idx);
const std::string& get(int idx);
protected:
void _load(const std::string &file);

View file

@ -3577,48 +3577,49 @@ void Game::createInGameMenu()
group_keyConfig->addChild(kcb, PM_POINTER);
int offy = -20;
#define SB(x) dsq->continuity.stringBank.get(x)
TTFText *header_action = new TTFText(&dsq->fontArialSmall);
header_action->setText("Action");
header_action->setText(SB(2101));
header_action->position = Vector(140, 80+offy);
group_keyConfig->addChild(header_action, PM_POINTER);
TTFText *header_key1 = new TTFText(&dsq->fontArialSmall);
header_key1->setText("Key 1");
header_key1->setText(SB(2102));
header_key1->position = Vector(350, 80+offy);
header_key1->setAlign(ALIGN_CENTER);
group_keyConfig->addChild(header_key1, PM_POINTER);
TTFText *header_key2 = new TTFText(&dsq->fontArialSmall);
header_key2->setText("Key 2");
header_key2->setText(SB(2103));
header_key2->position = Vector(475, 80+offy);
header_key2->setAlign(ALIGN_CENTER);
group_keyConfig->addChild(header_key2, PM_POINTER);
TTFText *header_joy = new TTFText(&dsq->fontArialSmall);
header_joy->setText("Joystick");
header_joy->setText(SB(2104));
header_joy->position = Vector(600, 80+offy);
header_joy->setAlign(ALIGN_CENTER);
group_keyConfig->addChild(header_joy, PM_POINTER);
addKeyConfigLine(group_keyConfig, "Left Mouse Equiv.", "lmb", 100+offy, 0, 0, 0);
addKeyConfigLine(group_keyConfig, "Right Mouse Equiv.", "rmb", 120+offy, 0, 0, 0);
addKeyConfigLine(group_keyConfig, "Action 1: Swim", "PrimaryAction", 140+offy);
addKeyConfigLine(group_keyConfig, "Action 2: Sing/Ability", "SecondaryAction", 160+offy);
addKeyConfigLine(group_keyConfig, "Swim Up", "SwimUp", 180+offy);
addKeyConfigLine(group_keyConfig, "Swim Down", "SwimDown", 200+offy);
addKeyConfigLine(group_keyConfig, "Swim Left", "SwimLeft", 220+offy);
addKeyConfigLine(group_keyConfig, "Swim Right", "SwimRight", 240+offy);
addKeyConfigLine(group_keyConfig, "Roll", "Roll", 260+offy);
addKeyConfigLine(group_keyConfig, "Revert", "Revert", 280+offy);
addKeyConfigLine(group_keyConfig, "WorldMap/Recipes", "WorldMap", 300+offy);
addKeyConfigLine(group_keyConfig, "Menu/Escape", "Escape", 320+offy, 1, 0, 0);
AquariaKeyConfig* s1x = addAxesConfigLine(group_keyConfig, "Stick 1 X", "s1ax", 340+offy, 0);
AquariaKeyConfig* s1y = addAxesConfigLine(group_keyConfig, "Stick 1 Y", "s1ay", 340+offy, 130);
AquariaKeyConfig* s2x = addAxesConfigLine(group_keyConfig, "Stick 2 X", "s2ax", 340+offy, 260);
AquariaKeyConfig* s2y = addAxesConfigLine(group_keyConfig, "Stick 2 Y", "s2ay", 340+offy, 380);
addKeyConfigLine(group_keyConfig, SB(2105), "lmb", 100+offy, 0, 0, 0);
addKeyConfigLine(group_keyConfig, SB(2106), "rmb", 120+offy, 0, 0, 0);
addKeyConfigLine(group_keyConfig, SB(2107), "PrimaryAction", 140+offy);
addKeyConfigLine(group_keyConfig, SB(2108), "SecondaryAction", 160+offy);
addKeyConfigLine(group_keyConfig, SB(2109), "SwimUp", 180+offy);
addKeyConfigLine(group_keyConfig, SB(2110), "SwimDown", 200+offy);
addKeyConfigLine(group_keyConfig, SB(2111), "SwimLeft", 220+offy);
addKeyConfigLine(group_keyConfig, SB(2112), "SwimRight", 240+offy);
addKeyConfigLine(group_keyConfig, SB(2113), "Roll", 260+offy);
addKeyConfigLine(group_keyConfig, SB(2114), "Revert", 280+offy);
addKeyConfigLine(group_keyConfig, SB(2115), "WorldMap", 300+offy);
addKeyConfigLine(group_keyConfig, SB(2116), "Escape", 320+offy, 1, 0, 0);
AquariaKeyConfig* s1x = addAxesConfigLine(group_keyConfig, SB(2117), "s1ax", 340+offy, 0);
AquariaKeyConfig* s1y = addAxesConfigLine(group_keyConfig, SB(2118), "s1ay", 340+offy, 130);
AquariaKeyConfig* s2x = addAxesConfigLine(group_keyConfig, SB(2119), "s2ax", 340+offy, 260);
AquariaKeyConfig* s2y = addAxesConfigLine(group_keyConfig, SB(2120), "s2ay", 340+offy, 380);
s1x->setDirMove(DIR_LEFT, s1x);
s1x->setDirMove(DIR_RIGHT, s1y);
@ -3634,18 +3635,18 @@ void Game::createInGameMenu()
offy += 20;
addKeyConfigLine(group_keyConfig, "Prev Page", "PrevPage", 340+offy);
addKeyConfigLine(group_keyConfig, "Next Page", "NextPage", 360+offy);
addKeyConfigLine(group_keyConfig, "Food Menu Cook", "CookFood", 380+offy);
addKeyConfigLine(group_keyConfig, "Food Left", "FoodLeft", 400+offy);
addKeyConfigLine(group_keyConfig, "Food Right", "FoodRight", 420+offy);
addKeyConfigLine(group_keyConfig, "Food Drop", "FoodDrop", 440+offy);
addKeyConfigLine(group_keyConfig, "Look", "Look", 460+offy);
addKeyConfigLine(group_keyConfig, SB(2121), "PrevPage", 340+offy);
addKeyConfigLine(group_keyConfig, SB(2122), "NextPage", 360+offy);
addKeyConfigLine(group_keyConfig, SB(2123), "CookFood", 380+offy);
addKeyConfigLine(group_keyConfig, SB(2124), "FoodLeft", 400+offy);
addKeyConfigLine(group_keyConfig, SB(2125), "FoodRight", 420+offy);
addKeyConfigLine(group_keyConfig, SB(2126), "FoodDrop", 440+offy);
addKeyConfigLine(group_keyConfig, SB(2127), "Look", 460+offy);
addKeyConfigLine(group_keyConfig, "Help", "ToggleHelp", 480+offy);
addKeyConfigLine(group_keyConfig, SB(2128), "ToggleHelp", 480+offy);
#undef SB
group_keyConfig->shareAlphaWithChildren = 1;
group_keyConfig->followCamera = 1;

View file

@ -71,7 +71,7 @@ void StringBank::_load(const std::string &file)
}
}
std::string StringBank::get(int idx)
const std::string& StringBank::get(int idx)
{
return stringMap[idx];
}

View file

@ -138,6 +138,8 @@ std::string getInputCodeToString(int key)
return "";
}
// FIXME: Move stringbank to BBGE and move these strings into it. -- fg
std::string getInputCodeToUserString(int key)
{
for (InputCodeMap::iterator i = inputCodeMap.begin(); i != inputCodeMap.end(); i++)

View file

@ -205,4 +205,33 @@
2029 |Browse mods online
2030 |Return to title
2031 Any
2032 [Achievements]
2032 [Achievements]
2100 === for options menu ===
2101 Action
2102 Key 1
2103 Key 2
2104 Joystick
2105 Left Mouse Equiv.
2106 Right Mouse Equiv.
2107 Action 1: Swim
2108 Action 2: Sing/Ability
2109 Swim Up
2110 Swim Down
2111 Swim Left
2112 Swim Right
2113 Roll
2114 Revert
2115 WorldMap/Recipes
2116 Menu/Escape
2117 Stick 1 X
2118 Stick 1 Y
2119 Stick 2 X
2120 Stick 2 Y
2121 Prev Page
2122 Next Page
2123 Food Menu Cook
2124 Food Left
2125 Food Right
2126 Food Drop
2127 Look
2128 Help