Remove update option, more work at custom control

This commit is contained in:
khanhduytran0
2020-04-21 09:34:32 +07:00
parent da136c0011
commit 325835ddaa
20 changed files with 271 additions and 412 deletions

View File

@@ -203,7 +203,22 @@ public class AndroidLWJGLKeycode {
}
public static void execKeyIndex(MainActivity mainActivity, int index) {
mainActivity.sendKeyPress(androidToLwjglMap.valueAt(index));
mainActivity.sendKeyPress(getKeyIndex(index));
}
public static int getKeyIndex(int index) {
return androidToLwjglMap.valueAt(index);
}
public static int getIndexByLWJGLKey(int lwjglKey) {
for (int i = 0; i < androidToLwjglMap.size(); i++) {
int currKey = androidToLwjglMap.valueAt(i);
if (currKey == lwjglKey) {
return i;
}
}
return 0;
}
}