Added option for PC/RASP

This commit is contained in:
2015-05-21 21:21:23 +02:00
parent f7175aa70a
commit 36cbc2b012
3 changed files with 23 additions and 5 deletions
+12 -3
View File
@@ -13,6 +13,9 @@ import control.button.ButtonHandler;
import control.joystick.JoystickHandler;
public class Window extends JFrame {
public static boolean ON_RASP = false;
public Window()
{
//Create window
@@ -32,9 +35,15 @@ public class Window extends JFrame {
setUndecorated(true);
//Create Events
LedHandler led = new LedHandler();
LedHandler led = null;
if(Window.ON_RASP) //TODO REMOVE
{
led = new LedHandler();
}
ButtonHandler bth = new ButtonHandler(led);
JoystickHandler jsh = new JoystickHandler(led);
JoystickHandler jsh = new JoystickHandler();
//Create Instances
GameView view = new GameView(led);
@@ -46,7 +55,7 @@ public class Window extends JFrame {
addKeyListener(bth);
addKeyListener(jsh);
bth.addButtonListener(control);
jsh.addJoyStickListener(control);
jsh.addJoystickListener(control);
//Display
pack();