mirror of
https://github.com/badvision/jace.git
synced 2026-04-19 19:16:49 +00:00
#45: Cleaned up floating menu, Fixed reset button
This commit is contained in:
@@ -197,11 +197,11 @@ public class InvokableActionRegistryImpl extends InvokableActionRegistry {
|
||||
logger.log(Level.SEVERE, "Error invoking jace.core.Computer.pause", ex);
|
||||
return false;
|
||||
}
|
||||
});
|
||||
});
|
||||
annotation = createInvokableAction("Reset", "general", "Process user-initatiated reboot (ctrl+apple+reset)", "reboot;reset;three-finger-salute;restart", true, false, new String[]{"Ctrl+Ignore Alt+Ignore Meta+Backspace", "Ctrl+Ignore Alt+Ignore Meta+Delete"});
|
||||
putInstanceAction(annotation.name(), jace.core.Computer.class, annotation, (o, b) -> {
|
||||
putStaticAction(annotation.name(), jace.core.Computer.class, annotation, (b) -> {
|
||||
try {
|
||||
((jace.core.Computer) o).invokeReset();
|
||||
jace.core.Computer.invokeReset();
|
||||
} catch (Exception ex) {
|
||||
logger.log(Level.SEVERE, "Error invoking jace.core.Computer.invokeWarmStart", ex);
|
||||
}
|
||||
|
||||
@@ -20,8 +20,8 @@ import java.io.IOException;
|
||||
import java.util.Optional;
|
||||
import java.util.concurrent.CompletableFuture;
|
||||
|
||||
import jace.Emulator;
|
||||
import jace.JaceApplication;
|
||||
import jace.apple2e.SoftSwitches;
|
||||
import jace.config.ConfigurableField;
|
||||
import jace.config.Configuration;
|
||||
import jace.config.InvokableAction;
|
||||
@@ -182,12 +182,9 @@ public abstract class Computer implements Reconfigurable {
|
||||
category = "general",
|
||||
alternatives = "reboot;reset;three-finger-salute;restart",
|
||||
defaultKeyMapping = {"Ctrl+Ignore Alt+Ignore Meta+Backspace", "Ctrl+Ignore Alt+Ignore Meta+Delete"})
|
||||
public void invokeReset() {
|
||||
if (SoftSwitches.PDL0.isOn()) {
|
||||
coldStart();
|
||||
} else {
|
||||
warmStart();
|
||||
}
|
||||
public static void invokeReset() {
|
||||
System.out.println("Resetting computer");
|
||||
Emulator.withComputer(Computer::coldStart);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user