diff --git a/GameEngine/src/main/java/gameEngine/GameEditor.java b/GameEngine/src/main/java/gameEngine/GameEditor.java index f18278a..3aa20bf 100644 --- a/GameEngine/src/main/java/gameEngine/GameEditor.java +++ b/GameEngine/src/main/java/gameEngine/GameEditor.java @@ -21,22 +21,14 @@ private Sprite[] EditorFrameSprite = new Sprite[4]; private Button dtramButton; - private Text dtramButtonText; - private Button playButton; - private Text playButtonText; private Button createMeshComponentViewButton; - private Text createMeshComponentViewButtonText; - private Button createMoveImageComponentViewButton; - private Text createMoveImageComponentViewButtonText; - private Button createMoveStraightComponentViewButton; - private Text createMoveStraightComponentViewButtonText; private Button createEntityViewButton; - private Text createEntityViewButtonText; + public InputField[][] inspectorInputFields; public GameEditor(Scene scene, float windowWidth, float windowHeight) { @@ -49,23 +41,14 @@ private void initializeEditorComponents() { createFrame(); - playButton = new Button(windowWidth/ 2 -16 , 3, 1, 0.4f); - playButtonText = new Text(windowWidth/ 2 - 10, 1, "Play", 24); + playButton = new Button(windowWidth/ 2 -16 , 3, 1, 0.4f,"Play"); + dtramButton = new Button(100 - 16 , 3, 2.5f, 0.4f,"Play DTRAM"); - 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, "Add Mesh"); + createMoveImageComponentViewButton = new Button(20, 73, 3.2f, 0.5f, "Add MoveImage"); + createMoveStraightComponentViewButton = new Button(20, 113, 3.2f, 0.5f, "Add MoveStraight"); - createMeshComponentViewButton = new Button(20, 33, 3.2f, 0.5f); - createMeshComponentViewButtonText = new Text(20 +5.25f, 30.4f, "Add Mesh", 24); - - createMoveImageComponentViewButton = new Button(20, 73, 3.2f, 0.5f); - createMoveImageComponentViewButtonText = new Text(20 +5.25f, 70.4f, "Add MoveImage", 24); - - createMoveStraightComponentViewButton = new Button(20, 113, 3.2f, 0.5f); - createMoveStraightComponentViewButtonText = new Text(20 +5.25f, 113.4f, "Add MoveStraight", 24); - - createEntityViewButton = new Button(240, 33, 3.2f, 0.5f); - createEntityViewButtonText = new Text(240 +5.25f, 30.4f, "Add Entity", 24); + createEntityViewButton = new Button(240, 33, 3.2f, 0.5f, "Add Entity"); setButtonListeners(); setInspector(); @@ -177,10 +160,7 @@ createEntityViewButton.clearListeners(); createEntityViewButton.addListener(scene::addNewEntity); - registerUpdatable(playButton, playButtonText, dtramButton, dtramButtonText, - createMeshComponentViewButton, createMeshComponentViewButtonText, - createMoveImageComponentViewButton, createMoveImageComponentViewButtonText, - createEntityViewButton, createEntityViewButtonText, createMoveStraightComponentViewButton, createMoveStraightComponentViewButtonText); + registerUpdatable(playButton, dtramButton, createMeshComponentViewButton, createMoveImageComponentViewButton, createEntityViewButton, createMoveStraightComponentViewButton); } public void setScene(Scene newScene) {