mirror of
https://github.com/AquariaOSE/Aquaria.git
synced 2024-11-25 09:44:02 +00:00
Remove support for input key config locking.
Wasn't useful, isn't useful, and confused me to no end. Better to have this gone.
This commit is contained in:
parent
4b0f45df73
commit
798e4c6619
4 changed files with 12 additions and 33 deletions
|
@ -481,9 +481,6 @@ AquariaKeyConfig::AquariaKeyConfig(const std::string &actionInputName, InputSetT
|
|||
|
||||
keyDown = false;
|
||||
|
||||
locked = 0;
|
||||
|
||||
|
||||
toggleEnterKey(false);
|
||||
}
|
||||
|
||||
|
@ -526,11 +523,6 @@ void AquariaKeyConfig::toggleEnterKey(int on)
|
|||
|
||||
}
|
||||
|
||||
void AquariaKeyConfig::setLock(int lock)
|
||||
{
|
||||
locked = lock;
|
||||
}
|
||||
|
||||
void AquariaKeyConfig::onUpdate(float dt)
|
||||
{
|
||||
static bool inLoop = false;
|
||||
|
@ -735,24 +727,17 @@ void AquariaKeyConfig::onUpdate(float dt)
|
|||
{
|
||||
keyDown = false;
|
||||
|
||||
if (!locked)
|
||||
if (waitingForInput == this)
|
||||
{
|
||||
if (waitingForInput == this)
|
||||
{
|
||||
waitingForInput = 0;
|
||||
toggleEnterKey(0);
|
||||
AquariaGuiElement::canDirMoveGlobal = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
waitingForInput = this;
|
||||
toggleEnterKey(1);
|
||||
AquariaGuiElement::canDirMoveGlobal = false;
|
||||
}
|
||||
waitingForInput = 0;
|
||||
toggleEnterKey(0);
|
||||
AquariaGuiElement::canDirMoveGlobal = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
dsq->sound->playSfx("denied");
|
||||
waitingForInput = this;
|
||||
toggleEnterKey(1);
|
||||
AquariaGuiElement::canDirMoveGlobal = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -170,10 +170,7 @@ public:
|
|||
|
||||
static AquariaKeyConfig *waitingForInput;
|
||||
|
||||
void setLock(int lock);
|
||||
|
||||
protected:
|
||||
int locked;
|
||||
void toggleEnterKey(int on);
|
||||
|
||||
void onUpdate(float dt);
|
||||
|
|
|
@ -1490,7 +1490,7 @@ void InGameMenu::hide(bool effects, bool cancel)
|
|||
}
|
||||
|
||||
|
||||
void InGameMenu::addKeyConfigLine(RenderObject *group, const std::string &label, const std::string &actionInputName, int y, int l1, int l2, int l3)
|
||||
void InGameMenu::addKeyConfigLine(RenderObject *group, const std::string &label, const std::string &actionInputName, int y)
|
||||
{
|
||||
TTFText *lb = new TTFText(&dsq->fontArialSmallest);
|
||||
lb->setText(label);
|
||||
|
@ -1499,17 +1499,14 @@ void InGameMenu::addKeyConfigLine(RenderObject *group, const std::string &label,
|
|||
|
||||
AquariaKeyConfig *k1 = new AquariaKeyConfig(actionInputName, INPUTSET_KEY, 0);
|
||||
k1->position = Vector(350,y);
|
||||
k1->setLock(l1);
|
||||
group->addChild(k1, PM_POINTER);
|
||||
|
||||
AquariaKeyConfig *k2 = new AquariaKeyConfig(actionInputName, INPUTSET_KEY, 1);
|
||||
k2->position = Vector(475,y);
|
||||
k2->setLock(l2);
|
||||
group->addChild(k2, PM_POINTER);
|
||||
|
||||
AquariaKeyConfig *j1 = new AquariaKeyConfig(actionInputName, INPUTSET_JOY, 0);
|
||||
j1->position = Vector(600,y);
|
||||
j1->setLock(l3);
|
||||
group->addChild(j1, PM_POINTER);
|
||||
|
||||
k1->setDirMove(DIR_RIGHT, k2);
|
||||
|
@ -1957,8 +1954,8 @@ void InGameMenu::create()
|
|||
header_joy->setAlign(ALIGN_CENTER);
|
||||
group_keyConfig->addChild(header_joy, PM_POINTER);
|
||||
|
||||
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(2105), "lmb", 100+offy);
|
||||
addKeyConfigLine(group_keyConfig, SB(2106), "rmb", 120+offy);
|
||||
addKeyConfigLine(group_keyConfig, SB(2107), "PrimaryAction", 140+offy);
|
||||
addKeyConfigLine(group_keyConfig, SB(2108), "SecondaryAction", 160+offy);
|
||||
addKeyConfigLine(group_keyConfig, SB(2109), "SwimUp", 180+offy);
|
||||
|
@ -1968,7 +1965,7 @@ void InGameMenu::create()
|
|||
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);
|
||||
addKeyConfigLine(group_keyConfig, SB(2116), "Escape", 320+offy);
|
||||
|
||||
AquariaKeyConfig* s1x = addAxesConfigLine(group_keyConfig, SB(2117), "s1ax", 340+offy, 0);
|
||||
AquariaKeyConfig* s1y = addAxesConfigLine(group_keyConfig, SB(2118), "s1ay", 340+offy, 130);
|
||||
|
|
|
@ -188,7 +188,7 @@ private:
|
|||
|
||||
void onKeyConfig();
|
||||
|
||||
void addKeyConfigLine(RenderObject *group, const std::string &label, const std::string &actionInputName, int y, int l1=0, int l2=0, int l3=0);
|
||||
void addKeyConfigLine(RenderObject *group, const std::string &label, const std::string &actionInputName, int y);
|
||||
|
||||
AquariaKeyConfig *addAxesConfigLine(RenderObject *group, const std::string &label, const std::string &actionInputName, int y, int offx);
|
||||
|
||||
|
|
Loading…
Reference in a new issue