support for n buttons
This commit is contained in:
parent
fc7c0fa846
commit
54e06e4026
|
@ -152,13 +152,6 @@ public class Controller {
|
||||||
Sys.initialize();
|
Sys.initialize();
|
||||||
initIDs();
|
initIDs();
|
||||||
|
|
||||||
// Assign names to all the buttons
|
|
||||||
buttonName = new String[8];
|
|
||||||
for (int i = 0; i < 8; i ++) {
|
|
||||||
buttonName[i] = "BUTTON" + i;
|
|
||||||
buttonMap.put(buttonName[i], new Integer(i));
|
|
||||||
}
|
|
||||||
|
|
||||||
initialized = true;
|
initialized = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -177,6 +170,13 @@ public class Controller {
|
||||||
|
|
||||||
nCreate();
|
nCreate();
|
||||||
|
|
||||||
|
// Assign names to all the buttons
|
||||||
|
buttonName = new String[buttons.length];
|
||||||
|
for (int i = 0; i < buttons.length; i ++) {
|
||||||
|
buttonName[i] = "BUTTON" + i;
|
||||||
|
buttonMap.put(buttonName[i], new Integer(i));
|
||||||
|
}
|
||||||
|
|
||||||
created = true;
|
created = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue