diff --git a/GameEngine/src/main/java/gameEngine/GameEditor.java b/GameEngine/src/main/java/gameEngine/GameEditor.java index 58ffd28..4447641 100644 --- a/GameEngine/src/main/java/gameEngine/GameEditor.java +++ b/GameEngine/src/main/java/gameEngine/GameEditor.java @@ -20,6 +20,9 @@ private Sprite[] EditorFrameSprite = new Sprite[4]; + private Button dtramButton; + private Text dtramButtonText; + private Button playButton; private Text playButtonText; @@ -44,7 +47,10 @@ createFrame(); playButton = new Button(windowWidth/ 2 -16 , 3, 1, 0.4f); - playButtonText = new Text(windowWidth/ 2 - 11.25f, 1, "Play", 24); + playButtonText = new Text(windowWidth/ 2 - 10, 1, "Play", 24); + + dtramButton = new Button(100 - 16 , 3, 2.5f, 0.4f); + dtramButtonText = new Text(100 - 10, 1, "Play DTRAM", 24); createMeshComponentViewButton = new Button(20, 33, 3.2f, 0.5f); createMeshComponentViewButtonText = new Text(20 +5.25f, 30.4f, "Add Mesh", 24); @@ -149,6 +155,10 @@ playButton.clearListeners(); playButton.addListener(scene::changeSceneStart); + dtramButton.clearListeners(); + GameEngineModelFileGenerator modelFileGenerator = new GameEngineModelFileGenerator(); + dtramButton.addListener(modelFileGenerator.generate()); + createMeshComponentViewButton.clearListeners(); createMeshComponentViewButton.addListener(scene::addNewMeshComponent); @@ -158,7 +168,7 @@ createEntityViewButton.clearListeners(); createEntityViewButton.addListener(scene::addNewEntity); - registerUpdatable(playButton, playButtonText, + registerUpdatable(playButton, playButtonText, dtramButton, dtramButtonText, createMeshComponentViewButton, createMeshComponentViewButtonText, createMoveImageComponentViewButton, createMoveImageComponentViewButtonText, createEntityViewButton, createEntityViewButtonText);