mirror of
https://github.com/AquariaOSE/Aquaria.git
synced 2025-01-24 17:26:41 +00:00
Unstick highlight in input config
This commit is contained in:
parent
08a884b375
commit
acb515b738
2 changed files with 9 additions and 1 deletions
|
@ -594,6 +594,8 @@ void AquariaKeyConfig::onUpdate(float dt)
|
|||
|
||||
ActionInput *ai = 0;
|
||||
|
||||
bool used = false;
|
||||
|
||||
if (inputSetType != INPUTSET_OTHER)
|
||||
{
|
||||
ai = as.getActionInputByName(actionInputName);
|
||||
|
@ -618,8 +620,10 @@ void AquariaKeyConfig::onUpdate(float dt)
|
|||
k = 0;
|
||||
break;
|
||||
}
|
||||
used = k && *k;
|
||||
}
|
||||
|
||||
|
||||
if (inputSetType == INPUTSET_OTHER)
|
||||
{
|
||||
if (actionInputName == "s1ax")
|
||||
|
@ -630,10 +634,13 @@ void AquariaKeyConfig::onUpdate(float dt)
|
|||
k = &as.joycfg.s2ax;
|
||||
else if (actionInputName == "s2ay")
|
||||
k = &as.joycfg.s2ay;
|
||||
used = k && int(*k) >= 0;
|
||||
}
|
||||
|
||||
if(k && *k)
|
||||
if(used)
|
||||
bg2->alphaMod = 0.3f;
|
||||
else
|
||||
bg2->alphaMod = 0;
|
||||
|
||||
if (waitingForInput == this)
|
||||
{
|
||||
|
|
|
@ -771,6 +771,7 @@ bool Core::getMouseButtonState(int m)
|
|||
|
||||
bool Core::getKeyState(int k)
|
||||
{
|
||||
assert(k < KEY_MAXARRAY);
|
||||
return k > 0 && k < KEY_MAXARRAY ? keys[k] : 0;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue