X-Git-Url: https://mograsim.net/gitweb/?a=blobdiff_plain;f=era.mi%2Fsrc%2Fera%2Fmi%2Flogic%2Ftests%2FGUITest.java;h=36a4886a8f4e996b04a7c8f3ae699e58fe1bfc20;hb=c18c04011cab0040c2287608eeefc9c3cc4536c2;hp=8630772b62dd07ffb54e8abeeb1d60ba4402acb2;hpb=4712d3e6ee08461b7754dbfba1c9e82372bb474d;p=Mograsim.git diff --git a/era.mi/src/era/mi/logic/tests/GUITest.java b/era.mi/src/era/mi/logic/tests/GUITest.java index 8630772b..36a4886a 100644 --- a/era.mi/src/era/mi/logic/tests/GUITest.java +++ b/era.mi/src/era/mi/logic/tests/GUITest.java @@ -170,7 +170,7 @@ public class GUITest extends JPanel g.setFont(g.getFont().deriveFont(Math.min(height, width) / 40f)); } - private void drawString(Graphics g, String s, int x, int y, double anchorX, double anchorY) + private static void drawString(Graphics g, String s, int x, int y, double anchorX, double anchorY) { int h = g.getFontMetrics().getAscent(); int w = g.getFontMetrics().stringWidth(s); @@ -240,6 +240,9 @@ public class GUITest extends JPanel case ZERO: g.setColor(Color.BLACK); break; + case U: + g.setColor(Color.MAGENTA); + break; default: throw new IllegalArgumentException(); } @@ -279,7 +282,7 @@ public class GUITest extends JPanel gt.repaint(12); try { - Thread.sleep(Math.max(16 - System.currentTimeMillis() + lastFrame, 0)); + Thread.sleep(Math.max(updateT - System.currentTimeMillis() + lastFrame, 0)); } catch (Exception e) {