forked from extern/Unexpected-Keyboard
Highlight activated keys label
Rendering change only.
This commit is contained in:
parent
2aa98de7aa
commit
c1751578ef
@ -301,15 +301,14 @@ public class Keyboard2View extends View
|
|||||||
|
|
||||||
private int labelColor(KeyValue k, boolean isKeyDown, boolean sublabel)
|
private int labelColor(KeyValue k, boolean isKeyDown, boolean sublabel)
|
||||||
{
|
{
|
||||||
if (isKeyDown && k.hasFlags(KeyValue.FLAG_LATCH))
|
if (isKeyDown)
|
||||||
{
|
{
|
||||||
int flags = _pointers.getKeyFlags(k);
|
int flags = _pointers.getKeyFlags(k);
|
||||||
if (flags != -1)
|
if (flags != -1)
|
||||||
{
|
{
|
||||||
if ((flags & KeyValue.FLAG_LOCKED) != 0)
|
if ((flags & KeyValue.FLAG_LOCKED) != 0)
|
||||||
return _theme.lockedColor;
|
return _theme.lockedColor;
|
||||||
if ((flags & KeyValue.FLAG_LATCH) == 0)
|
return _theme.activatedColor;
|
||||||
return _theme.activatedColor;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (k.hasFlags(KeyValue.FLAG_SECONDARY))
|
if (k.hasFlags(KeyValue.FLAG_SECONDARY))
|
||||||
|
Loading…
Reference in New Issue
Block a user