Ejemplo n.º 1
0
 public void frame__windowStateChanged(WindowEvent e) {
   if ((e.getNewState() & Frame.ICONIFIED) == Frame.ICONIFIED) {
     stateMachine.minimized = true;
     KeyHook.unblockWindowsKey();
   } else if ((e.getNewState() & Frame.NORMAL) == Frame.NORMAL) {
     stateMachine.minimized = false;
     KeyHook.blockWindowsKey();
   }
 }
Ejemplo n.º 2
0
 public void setup() {
   size((int) (displayWidth * SCALE), (int) (displayWidth * SCALE / ASPECT_RATIO), P2D);
   // size(1920,1080);
   frame.setTitle("Customer Simulator v0.0.1");
   KeyHook.blockWindowsKey();
   ui = new ControlP5(this);
   String dir = System.getProperty("user.dir");
   font = createFont(dir + "/src/Data/arialbd.ttf", 48);
   stateMachine = new StateMachine();
   stateMachine.Push(new States.State_1(this, ui, font));
 }