1
0
Fork 0
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:
fgenesis 2017-04-04 19:27:53 +02:00
parent 08a884b375
commit acb515b738
2 changed files with 9 additions and 1 deletions

View file

@ -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)
{

View file

@ -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;
}