Fixed app callback events
This commit is contained in:
parent
9fda57b191
commit
76f3da5da7
4 changed files with 14 additions and 0 deletions
|
|
@ -23,4 +23,8 @@ abstract public class AbstractDeskApp implements DeskApp {
|
|||
@Override
|
||||
public void hide() {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void exit() {
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -12,4 +12,6 @@ public interface DeskApp {
|
|||
void show();
|
||||
|
||||
void hide();
|
||||
|
||||
void exit();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -65,6 +65,7 @@ public class DeskTopScreenMenu {
|
|||
if (ImGui.menuItem(FontAwesomeIcons.WindowClose + " Exit", "", fileCloseSelected, deskApp != null)) {
|
||||
fileCloseSelected.set(false);
|
||||
if (deskApp != null) {
|
||||
deskApp.exit();
|
||||
appScreen.getDeskAppController().removeDeskApp(deskApp);
|
||||
appScreen.getDeskAppController().setCurrentDeskApp(null);
|
||||
}
|
||||
|
|
@ -155,6 +156,7 @@ public class DeskTopScreenMenu {
|
|||
private void renderTOS4Menu(DeskTopScreen appScreen) {
|
||||
if (ImGui.beginMenu("仙" + " TOS⁴")) {
|
||||
if (ImGui.menuItem(FontAwesomeIcons.Camera + " Main reality", "", tosSelfSelected, appScreen.getDeskAppController().getCurrentDeskApp() != null)) {
|
||||
appScreen.getDeskAppController().getCurrentDeskApp().hide();
|
||||
appScreen.getDeskAppController().setCurrentDeskApp(null);
|
||||
tosSelfSelected.set(false);
|
||||
}
|
||||
|
|
@ -164,6 +166,7 @@ public class DeskTopScreenMenu {
|
|||
enabled = false;
|
||||
}
|
||||
if (ImGui.menuItem(app.getContours().getTitle(), "", tosSelfSelected, enabled)) {
|
||||
app.show();
|
||||
appScreen.getDeskAppController().setCurrentDeskApp(app);
|
||||
tosSelfSelected.set(false);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue