Skip to content

Commit

Permalink
Extra methods in Display, to support Heroes Lore 2
Browse files Browse the repository at this point in the history
  • Loading branch information
usernameak committed Nov 15, 2024
1 parent 8839bbc commit a3281f0
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/main/java/javax/microedition/lcdui/Display.java
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,14 @@ public static Display getDisplay(MIDlet midlet) {
return appInstance.getDisplay();
}

public boolean isColor() {
return true;
}

public int numColors() {
return 1 << 24;
}

public Displayable getCurrent() {
return current;
}
Expand All @@ -35,6 +43,10 @@ public void setCurrent(Displayable current) {
_ui_doRepaint();
}

public void callSerially(Runnable r) {
AppInstance.appInstance.runOnAppThread(r);
}

public void _ui_doRepaint() {
if (current instanceof Canvas) {
((Canvas) current).repaint();
Expand Down

0 comments on commit a3281f0

Please sign in to comment.