- static Console.Command video() {
- return command(new String[] {"v", "video"}, (console, args) -> {
- console.getCakelight().setMode(new VideoMode());
- return true;
+ static Console.Command push() {
+ return command(new String[] {"push"}, (console, args) -> {
+ Object obj = console.internalHandleInput(String.join(" ", args));
+ if (obj instanceof Mode) { // obj could be anything, which should be fixed
+ console.out("pushing mode " + obj.getClass().getSimpleName());
+ console.getCakelight().pushMode((Mode) obj);
+ }
+ return true;
+ });
+ }
+
+ static Console.Command pop() {
+ return command(new String[] {"pop"}, (console, args) -> {
+ console.out("popping mode " + console.getCakelight().popMode().getClass().getSimpleName());
+ return true;