From 17b9069dfd2c5b20c181ec653109921e508bfc8c Mon Sep 17 00:00:00 2001
From: Aaron <rudkowsk@uni-bremen.de>
Date: Wed, 27 May 2020 16:26:45 +0100
Subject: [PATCH] buttons integrated so that they can do stuff

---
 .../Buttons/InGameButtons/AutofireButton.java | 10 ++++--
 .../Buttons/InGameButtons/ContinueButton.java |  9 ++++-
 .../InGameButtons/CrewDismissButton.java      |  3 +-
 .../InGameButtons/EventPageButton.java        | 11 +++++-
 .../InGameButtons/InventoryCloseButton.java   | 18 +++++++++-
 .../Buttons/InGameButtons/MainMenuButton.java |  4 ++-
 .../Buttons/InGameButtons/MoveButton.java     |  9 ++++-
 .../Buttons/InGameButtons/ShipButton.java     | 11 ++++--
 .../Buttons/InGameButtons/ShopBuyButton.java  | 16 +++++++--
 .../Buttons/InGameButtons/SystemButton.java   | 12 ++++---
 .../InGameButtons/WeaponActivateButton.java   |  9 +++--
 .../Buttons/MenuButtons/DifficultyButton.java | 22 ++++++++----
 .../View/Buttons/MenuButtons/LoginButton.java | 32 +++++++++++++++--
 .../Buttons/MenuButtons/NewGameButton.java    |  9 ++++-
 .../View/Buttons/MenuButtons/QuitButton.java  |  9 ++++-
 .../Buttons/MenuButtons/ShipSelectButton.java | 32 +++++++++++++++--
 .../MenuButtons/SinglePlayerButton.java       | 31 +++++++++++++++-
 .../View/Buttons/MenuButtons/StartButton.java |  9 ++++-
 .../View/Screen/LoginScreen.java              |  7 ++++
 .../View/Screen/MainMenu.java                 | 24 +++++++++++++
 .../View/Screen/ShipSelector.java             | 26 +++++++++++++-
 .../View/UI/Events/EventGUI.java              |  2 ++
 .../View/UI/Events/ShopUI.java                | 10 ++++++
 .../UI/Inventory/InventoryCrewSlotUI.java     |  3 ++
 .../View/UI/Ship/ShipView.java                | 36 +++++++++++++++----
 .../View/UI/ShipInformation/CrewUI.java       |  9 +++++
 .../View/UI/ShipInformation/SubsystemUI.java  | 17 +++++++++
 .../View/UI/ShipInformation/WeaponUI.java     |  9 +++++
 28 files changed, 357 insertions(+), 42 deletions(-)

diff --git a/core/src/com/galaxytrucker/galaxytruckerreloaded/View/Buttons/InGameButtons/AutofireButton.java b/core/src/com/galaxytrucker/galaxytruckerreloaded/View/Buttons/InGameButtons/AutofireButton.java
index 37cc003b..9fed8d88 100644
--- a/core/src/com/galaxytrucker/galaxytruckerreloaded/View/Buttons/InGameButtons/AutofireButton.java
+++ b/core/src/com/galaxytrucker/galaxytruckerreloaded/View/Buttons/InGameButtons/AutofireButton.java
@@ -9,6 +9,7 @@ import com.badlogic.gdx.graphics.g2d.SpriteBatch;
 import com.galaxytrucker.galaxytruckerreloaded.Main;
 import com.galaxytrucker.galaxytruckerreloaded.Model.Weapons.Weapon;
 import com.galaxytrucker.galaxytruckerreloaded.View.Buttons.Button;
+import com.galaxytrucker.galaxytruckerreloaded.View.UI.Ship.ShipView;
 
 /**
  * Button to activate Autofire-Function during fights
@@ -33,14 +34,19 @@ public class AutofireButton extends Button
     private Sound clickSound;
 
     boolean down = false;
-    Weapon weapon;
+
+    /**
+     * the ui this button is on
+     */
+    private ShipView ui;
 
     /**
      * Constructor
      *
      * @param main - main class
+     * @param ui the ui this button is on
      */
-    public AutofireButton(Main main, Weapon weapon) {
+    public AutofireButton(Main main, ShipView ui) {
 
 //    /**
 //     * Send data to server
diff --git a/core/src/com/galaxytrucker/galaxytruckerreloaded/View/Buttons/InGameButtons/ContinueButton.java b/core/src/com/galaxytrucker/galaxytruckerreloaded/View/Buttons/InGameButtons/ContinueButton.java
index af97b87a..9cd99f2b 100644
--- a/core/src/com/galaxytrucker/galaxytruckerreloaded/View/Buttons/InGameButtons/ContinueButton.java
+++ b/core/src/com/galaxytrucker/galaxytruckerreloaded/View/Buttons/InGameButtons/ContinueButton.java
@@ -6,6 +6,7 @@ import com.badlogic.gdx.graphics.Texture;
 import com.badlogic.gdx.graphics.g2d.SpriteBatch;
 import com.galaxytrucker.galaxytruckerreloaded.Main;
 import com.galaxytrucker.galaxytruckerreloaded.View.Buttons.Button;
+import com.galaxytrucker.galaxytruckerreloaded.View.UI.Options.OptionsUI;
 
 /**
  * continue button for ingame options
@@ -31,6 +32,11 @@ public class ContinueButton extends Button {
 
     boolean down = false;
 
+    /**
+     * the options ui this button is on
+     */
+    private OptionsUI ui;
+
     /**
      * Left-Click action of the Button.
      */
@@ -42,8 +48,9 @@ public class ContinueButton extends Button {
     /**
      * constructor
      * @param main the main class
+     * @param ui the ui this is on
      */
-    public ContinueButton(Main main) {
+    public ContinueButton(Main main, OptionsUI ui) {
 
     }
 }
diff --git a/core/src/com/galaxytrucker/galaxytruckerreloaded/View/Buttons/InGameButtons/CrewDismissButton.java b/core/src/com/galaxytrucker/galaxytruckerreloaded/View/Buttons/InGameButtons/CrewDismissButton.java
index cd086712..a139d6e0 100644
--- a/core/src/com/galaxytrucker/galaxytruckerreloaded/View/Buttons/InGameButtons/CrewDismissButton.java
+++ b/core/src/com/galaxytrucker/galaxytruckerreloaded/View/Buttons/InGameButtons/CrewDismissButton.java
@@ -37,8 +37,9 @@ public class CrewDismissButton extends Button
      * Constructor
      *
      * @param main - main class
+     * @param crew the crew member
      */
-    public CrewDismissButton(Main main, Crew crew) {
+    public CrewDismissButton(Main main, int crew) {
     }
 
     public void leftClick()
diff --git a/core/src/com/galaxytrucker/galaxytruckerreloaded/View/Buttons/InGameButtons/EventPageButton.java b/core/src/com/galaxytrucker/galaxytruckerreloaded/View/Buttons/InGameButtons/EventPageButton.java
index dd3231be..26b091b1 100644
--- a/core/src/com/galaxytrucker/galaxytruckerreloaded/View/Buttons/InGameButtons/EventPageButton.java
+++ b/core/src/com/galaxytrucker/galaxytruckerreloaded/View/Buttons/InGameButtons/EventPageButton.java
@@ -6,6 +6,7 @@ import com.badlogic.gdx.graphics.Texture;
 import com.badlogic.gdx.graphics.g2d.SpriteBatch;
 import com.galaxytrucker.galaxytruckerreloaded.Main;
 import com.galaxytrucker.galaxytruckerreloaded.View.Buttons.Button;
+import com.galaxytrucker.galaxytruckerreloaded.View.UI.Events.EventGUI;
 
 public class EventPageButton extends Button {
 
@@ -28,6 +29,11 @@ public class EventPageButton extends Button {
 
     boolean down = false;
 
+    /**
+     * the ui the button is on
+     */
+    private EventGUI eventgui;
+
     /**
      * what happens when there is a left click on the button
      */
@@ -35,9 +41,12 @@ public class EventPageButton extends Button {
 
     /**
      * constructor
+     *
      * @param main the main class
+     *
+     * @param eventgui the ui the button is on
      */
-    public EventPageButton(Main main) {
+    public EventPageButton(Main main, EventGUI eventgui) {
 
     }
 }
diff --git a/core/src/com/galaxytrucker/galaxytruckerreloaded/View/Buttons/InGameButtons/InventoryCloseButton.java b/core/src/com/galaxytrucker/galaxytruckerreloaded/View/Buttons/InGameButtons/InventoryCloseButton.java
index 766d66ea..060093f9 100644
--- a/core/src/com/galaxytrucker/galaxytruckerreloaded/View/Buttons/InGameButtons/InventoryCloseButton.java
+++ b/core/src/com/galaxytrucker/galaxytruckerreloaded/View/Buttons/InGameButtons/InventoryCloseButton.java
@@ -6,6 +6,8 @@ import com.badlogic.gdx.graphics.Texture;
 import com.badlogic.gdx.graphics.g2d.SpriteBatch;
 import com.galaxytrucker.galaxytruckerreloaded.Main;
 import com.galaxytrucker.galaxytruckerreloaded.View.Buttons.Button;
+import com.galaxytrucker.galaxytruckerreloaded.View.UI.Events.ShopUI;
+import com.galaxytrucker.galaxytruckerreloaded.View.UI.Inventory.InventoryUI;
 
 /**
  * used to close the inventory
@@ -31,6 +33,18 @@ public class InventoryCloseButton extends Button {
 
     boolean down = false;
 
+    /**
+     * shop ui, if button on shop
+     * otherwise null
+     */
+    private ShopUI shop;
+
+    /**
+     * the inventory ui, if button on inventory
+     * otherwise null
+     */
+    private InventoryUI inventory;
+
     /**
      * Left-Click action of the Button.
      */
@@ -42,8 +56,10 @@ public class InventoryCloseButton extends Button {
     /**
      * constructor
      * @param main the main class
+     * @param ui the shop ui this is on, or null
+     * @param inventory the inventory ui this is on, or null
      */
-    public InventoryCloseButton(Main main) {
+    public InventoryCloseButton(Main main, ShopUI ui, InventoryUI inventory) {
 
     }
 }
diff --git a/core/src/com/galaxytrucker/galaxytruckerreloaded/View/Buttons/InGameButtons/MainMenuButton.java b/core/src/com/galaxytrucker/galaxytruckerreloaded/View/Buttons/InGameButtons/MainMenuButton.java
index f2df4a4b..862c0eec 100644
--- a/core/src/com/galaxytrucker/galaxytruckerreloaded/View/Buttons/InGameButtons/MainMenuButton.java
+++ b/core/src/com/galaxytrucker/galaxytruckerreloaded/View/Buttons/InGameButtons/MainMenuButton.java
@@ -6,6 +6,7 @@ import com.badlogic.gdx.graphics.Texture;
 import com.badlogic.gdx.graphics.g2d.SpriteBatch;
 import com.galaxytrucker.galaxytruckerreloaded.Main;
 import com.galaxytrucker.galaxytruckerreloaded.View.Buttons.Button;
+import com.galaxytrucker.galaxytruckerreloaded.View.UI.Events.GameOver;
 
 /***
  * button used to return to the main menu
@@ -31,8 +32,9 @@ public class MainMenuButton extends Button {
 
     boolean down = false;
 
+
     /**
-     * Left-Click action of the Button.
+     * Left-Click action of the Button. opens the main menu screen
      */
     @Override
     public void leftClick() {
diff --git a/core/src/com/galaxytrucker/galaxytruckerreloaded/View/Buttons/InGameButtons/MoveButton.java b/core/src/com/galaxytrucker/galaxytruckerreloaded/View/Buttons/InGameButtons/MoveButton.java
index 9e45c77d..3b62e99e 100644
--- a/core/src/com/galaxytrucker/galaxytruckerreloaded/View/Buttons/InGameButtons/MoveButton.java
+++ b/core/src/com/galaxytrucker/galaxytruckerreloaded/View/Buttons/InGameButtons/MoveButton.java
@@ -6,6 +6,7 @@ import com.badlogic.gdx.graphics.Texture;
 import com.badlogic.gdx.graphics.g2d.SpriteBatch;
 import com.galaxytrucker.galaxytruckerreloaded.Main;
 import com.galaxytrucker.galaxytruckerreloaded.View.Buttons.Button;
+import com.galaxytrucker.galaxytruckerreloaded.View.UI.Ship.ShipView;
 
 /**
  * button used to move the ship. upper middle corner, opens the map
@@ -31,6 +32,11 @@ public class MoveButton extends Button {
 
     boolean down = false;
 
+    /**
+     * the ui this button is on
+     */
+    private ShipView ui;
+
     /**
      * Left-Click action of the Button.
      */
@@ -42,8 +48,9 @@ public class MoveButton extends Button {
     /**
      * constructor
      * @param main the main class
+     * @param ui the ui this button is on
      */
-    public MoveButton(Main main) {
+    public MoveButton(Main main, ShipView ui) {
 
     }
 }
diff --git a/core/src/com/galaxytrucker/galaxytruckerreloaded/View/Buttons/InGameButtons/ShipButton.java b/core/src/com/galaxytrucker/galaxytruckerreloaded/View/Buttons/InGameButtons/ShipButton.java
index e68ae8c4..eb6cc83e 100644
--- a/core/src/com/galaxytrucker/galaxytruckerreloaded/View/Buttons/InGameButtons/ShipButton.java
+++ b/core/src/com/galaxytrucker/galaxytruckerreloaded/View/Buttons/InGameButtons/ShipButton.java
@@ -7,6 +7,7 @@ import com.badlogic.gdx.graphics.g2d.SpriteBatch;
 import com.galaxytrucker.galaxytruckerreloaded.Main;
 import com.galaxytrucker.galaxytruckerreloaded.Model.Ship;
 import com.galaxytrucker.galaxytruckerreloaded.View.Buttons.Button;
+import com.galaxytrucker.galaxytruckerreloaded.View.UI.Ship.ShipView;
 
 /**
  * Button for opening the Ship-Interface
@@ -30,14 +31,18 @@ public class ShipButton extends Button
      */
     private Sound clickSound;
 
-    private Ship ship;
+    /**
+     * the ui this button is on
+     */
+    private ShipView ui;
+
     /**
      * Constructor
      *
      * @param main - main class
-     * @param ship - the current Ship
+     * @param ui the ui this button is on
      */
-    public ShipButton(Main main, Ship ship) {
+    public ShipButton(Main main, ShipView ui) {
     }
 
 
diff --git a/core/src/com/galaxytrucker/galaxytruckerreloaded/View/Buttons/InGameButtons/ShopBuyButton.java b/core/src/com/galaxytrucker/galaxytruckerreloaded/View/Buttons/InGameButtons/ShopBuyButton.java
index cffacc18..93f732b3 100644
--- a/core/src/com/galaxytrucker/galaxytruckerreloaded/View/Buttons/InGameButtons/ShopBuyButton.java
+++ b/core/src/com/galaxytrucker/galaxytruckerreloaded/View/Buttons/InGameButtons/ShopBuyButton.java
@@ -6,6 +6,7 @@ import com.badlogic.gdx.graphics.Texture;
 import com.badlogic.gdx.graphics.g2d.SpriteBatch;
 import com.galaxytrucker.galaxytruckerreloaded.Main;
 import com.galaxytrucker.galaxytruckerreloaded.View.Buttons.Button;
+import com.galaxytrucker.galaxytruckerreloaded.View.UI.Events.ShopUI;
 
 /**
  * button used to buy something in the shop
@@ -31,14 +32,25 @@ public class ShopBuyButton extends Button {
 
     boolean down = false;
 
-    //Attribut um zu speichern zu welchem item dieser knopf gehört
+    /**
+     * the item this button belongs to
+     * index of list in shopui
+     */
+    private int item;
+
+    /**
+     * the ui this button is on
+     */
+    private ShopUI shop;
 
     /**
      * Constructor
      *
      * @param main - main class
+     * @param item the item
+     * @param ui the ui this button is on
      */
-    public ShopBuyButton(Main main) {
+    public ShopBuyButton(Main main, int item, ShopUI ui) {
 
     }
 
diff --git a/core/src/com/galaxytrucker/galaxytruckerreloaded/View/Buttons/InGameButtons/SystemButton.java b/core/src/com/galaxytrucker/galaxytruckerreloaded/View/Buttons/InGameButtons/SystemButton.java
index 8c4e42de..51029a3b 100644
--- a/core/src/com/galaxytrucker/galaxytruckerreloaded/View/Buttons/InGameButtons/SystemButton.java
+++ b/core/src/com/galaxytrucker/galaxytruckerreloaded/View/Buttons/InGameButtons/SystemButton.java
@@ -7,6 +7,7 @@ import com.badlogic.gdx.graphics.Texture;
 import com.badlogic.gdx.graphics.g2d.SpriteBatch;
 import com.galaxytrucker.galaxytruckerreloaded.Main;
 import com.galaxytrucker.galaxytruckerreloaded.View.Buttons.Button;
+import com.galaxytrucker.galaxytruckerreloaded.View.UI.ShipInformation.SubsystemUI;
 
 /**
  * Button for regulation of (Sub)-System energie supplyment
@@ -30,20 +31,23 @@ public class SystemButton extends Button
      */
     private Sound clickSound;
 
-
-    private System system;
-
     private Texture image_off;
     private Texture image_hover_off;
 
     Texture glow;
 
+    /**
+     * the ui this button belongs to
+     */
+    private SubsystemUI ui;
+
     /**
      * Constructor
      *
      * @param main - main class
+     * @param ui the ui this button belongs to
      */
-    public SystemButton(Main main) {
+    public SystemButton(Main main, SubsystemUI ui) {
     }
 
     public void setGlowTexture(Texture glow)
diff --git a/core/src/com/galaxytrucker/galaxytruckerreloaded/View/Buttons/InGameButtons/WeaponActivateButton.java b/core/src/com/galaxytrucker/galaxytruckerreloaded/View/Buttons/InGameButtons/WeaponActivateButton.java
index 6a48f9cc..40ea4db5 100644
--- a/core/src/com/galaxytrucker/galaxytruckerreloaded/View/Buttons/InGameButtons/WeaponActivateButton.java
+++ b/core/src/com/galaxytrucker/galaxytruckerreloaded/View/Buttons/InGameButtons/WeaponActivateButton.java
@@ -6,6 +6,7 @@ import com.badlogic.gdx.graphics.Texture;
 import com.badlogic.gdx.graphics.g2d.SpriteBatch;
 import com.galaxytrucker.galaxytruckerreloaded.Main;
 import com.galaxytrucker.galaxytruckerreloaded.View.Buttons.Button;
+import com.galaxytrucker.galaxytruckerreloaded.View.UI.ShipInformation.WeaponUI;
 
 import java.io.BufferedWriter;
 
@@ -33,7 +34,10 @@ public class WeaponActivateButton extends Button {
 
     boolean down = false;
 
-    //TODO attribut welches weapon dieser knopf ist
+    /**
+     * the ui this button belongs to
+     */
+    private WeaponUI ui;
 
     /**
      * Left-Click action of the Button.
@@ -46,8 +50,9 @@ public class WeaponActivateButton extends Button {
     /**
      * constructor
      * @param main the main class
+     * @param ui the ui this button belongs to
      */
-    public WeaponActivateButton(Main main) {
+    public WeaponActivateButton(Main main, WeaponUI ui) {
 
     }
 }
diff --git a/core/src/com/galaxytrucker/galaxytruckerreloaded/View/Buttons/MenuButtons/DifficultyButton.java b/core/src/com/galaxytrucker/galaxytruckerreloaded/View/Buttons/MenuButtons/DifficultyButton.java
index 3e666fcf..c1d9672a 100644
--- a/core/src/com/galaxytrucker/galaxytruckerreloaded/View/Buttons/MenuButtons/DifficultyButton.java
+++ b/core/src/com/galaxytrucker/galaxytruckerreloaded/View/Buttons/MenuButtons/DifficultyButton.java
@@ -6,6 +6,7 @@ import com.badlogic.gdx.graphics.Texture;
 import com.badlogic.gdx.graphics.g2d.SpriteBatch;
 import com.galaxytrucker.galaxytruckerreloaded.Main;
 import com.galaxytrucker.galaxytruckerreloaded.View.Buttons.Button;
+import com.galaxytrucker.galaxytruckerreloaded.View.Screen.ShipSelector;
 
 /**
  * Button for setting the degree of diffiulty
@@ -31,13 +32,20 @@ public class DifficultyButton extends Button
 
     private int difficulty;
 
-        /**
-         * Constructor
-         *
-         * @param main - main class
-         */
-        public DifficultyButton(Main main) {
-        }
+    /**
+     * the screen this button is on
+     */
+    private ShipSelector screen;
+
+    /**
+     * Constructor
+     *
+     * @param main - main class
+     * @param difficulty the difficulty this button represents
+     * @param screen the screen this button is on
+     */
+    public DifficultyButton(Main main, int difficulty, ShipSelector screen) {
+    }
 
     /**
      * Sets difficutly to a specific level
diff --git a/core/src/com/galaxytrucker/galaxytruckerreloaded/View/Buttons/MenuButtons/LoginButton.java b/core/src/com/galaxytrucker/galaxytruckerreloaded/View/Buttons/MenuButtons/LoginButton.java
index d2dfe0f4..4b971f27 100644
--- a/core/src/com/galaxytrucker/galaxytruckerreloaded/View/Buttons/MenuButtons/LoginButton.java
+++ b/core/src/com/galaxytrucker/galaxytruckerreloaded/View/Buttons/MenuButtons/LoginButton.java
@@ -1,17 +1,44 @@
 package com.galaxytrucker.galaxytruckerreloaded.View.Buttons.MenuButtons;
 
+import com.badlogic.gdx.audio.Sound;
+import com.badlogic.gdx.graphics.OrthographicCamera;
+import com.badlogic.gdx.graphics.Texture;
+import com.badlogic.gdx.graphics.g2d.SpriteBatch;
 import com.galaxytrucker.galaxytruckerreloaded.Main;
 import com.galaxytrucker.galaxytruckerreloaded.View.Buttons.Button;
+import com.galaxytrucker.galaxytruckerreloaded.View.Screen.LoginScreen;
+import sun.rmi.runtime.Log;
 
 /**
  * the login button for the login screen
  */
 public class LoginButton extends Button {
 
-    private String username;
+    /**
+     * Sprite batch
+     */
+    private SpriteBatch batch;
+    /**
+     * Orthographic camera
+     */
+    private OrthographicCamera camera;
+    /**
+     * Background
+     */
+    private Texture background;
+    /**
+     * Click sound effect
+     */
+    private Sound clickSound;
+
+    /**
+     * the screen from which this was called
+     */
+    private LoginScreen screen;
 
     /**
      * Left-Click action of the Button.
+     * calls method in the screen
      */
     @Override
     public void leftClick() {
@@ -21,8 +48,9 @@ public class LoginButton extends Button {
     /**
      * the constructor
      * @param main the main class
+     * @param screen the login screen this button belongs to
      */
-    public LoginButton(Main main) {
+    public LoginButton(Main main, LoginScreen screen) {
 
     }
 }
diff --git a/core/src/com/galaxytrucker/galaxytruckerreloaded/View/Buttons/MenuButtons/NewGameButton.java b/core/src/com/galaxytrucker/galaxytruckerreloaded/View/Buttons/MenuButtons/NewGameButton.java
index 6b7cb328..a2466e8b 100644
--- a/core/src/com/galaxytrucker/galaxytruckerreloaded/View/Buttons/MenuButtons/NewGameButton.java
+++ b/core/src/com/galaxytrucker/galaxytruckerreloaded/View/Buttons/MenuButtons/NewGameButton.java
@@ -6,6 +6,7 @@ import com.badlogic.gdx.graphics.Texture;
 import com.badlogic.gdx.graphics.g2d.SpriteBatch;
 import com.galaxytrucker.galaxytruckerreloaded.Main;
 import com.galaxytrucker.galaxytruckerreloaded.View.Buttons.Button;
+import com.galaxytrucker.galaxytruckerreloaded.View.Screen.MainMenu;
 
 /**
  * Starts a new Game
@@ -29,12 +30,18 @@ public class NewGameButton extends Button
      */
     private Sound clickSound;
 
+    /**
+     * the screen this button is on
+     */
+    private MainMenu screen;
+
     /**
      * Constructor
      *
      * @param main - main class
+     * @param screen the screen this button is on
      */
-    public NewGameButton(Main main) {
+    public NewGameButton(Main main, MainMenu screen) {
     }
 
 //    /**
diff --git a/core/src/com/galaxytrucker/galaxytruckerreloaded/View/Buttons/MenuButtons/QuitButton.java b/core/src/com/galaxytrucker/galaxytruckerreloaded/View/Buttons/MenuButtons/QuitButton.java
index 5fef1507..97604472 100644
--- a/core/src/com/galaxytrucker/galaxytruckerreloaded/View/Buttons/MenuButtons/QuitButton.java
+++ b/core/src/com/galaxytrucker/galaxytruckerreloaded/View/Buttons/MenuButtons/QuitButton.java
@@ -6,6 +6,7 @@ import com.badlogic.gdx.graphics.Texture;
 import com.badlogic.gdx.graphics.g2d.SpriteBatch;
 import com.galaxytrucker.galaxytruckerreloaded.Main;
 import com.galaxytrucker.galaxytruckerreloaded.View.Buttons.Button;
+import com.galaxytrucker.galaxytruckerreloaded.View.Screen.MainMenu;
 
 /**
  * Ends the Game
@@ -29,12 +30,18 @@ public class QuitButton extends Button
      */
     private Sound clickSound;
 
+    /**
+     * the screen this button is on
+     */
+    private MainMenu screen;
+
     /**
      * Constructor
      *
      * @param main - main class
+     * @param screen the screen this button is on
      */
-    public QuitButton(Main main) {
+    public QuitButton(Main main, MainMenu screen) {
     }
 
 //    /**
diff --git a/core/src/com/galaxytrucker/galaxytruckerreloaded/View/Buttons/MenuButtons/ShipSelectButton.java b/core/src/com/galaxytrucker/galaxytruckerreloaded/View/Buttons/MenuButtons/ShipSelectButton.java
index 9052fa78..8f8916bd 100644
--- a/core/src/com/galaxytrucker/galaxytruckerreloaded/View/Buttons/MenuButtons/ShipSelectButton.java
+++ b/core/src/com/galaxytrucker/galaxytruckerreloaded/View/Buttons/MenuButtons/ShipSelectButton.java
@@ -1,18 +1,45 @@
 package com.galaxytrucker.galaxytruckerreloaded.View.Buttons.MenuButtons;
 
+import com.badlogic.gdx.audio.Sound;
+import com.badlogic.gdx.graphics.OrthographicCamera;
+import com.badlogic.gdx.graphics.Texture;
+import com.badlogic.gdx.graphics.g2d.SpriteBatch;
 import com.galaxytrucker.galaxytruckerreloaded.Main;
 import com.galaxytrucker.galaxytruckerreloaded.View.Buttons.Button;
+import com.galaxytrucker.galaxytruckerreloaded.View.Screen.ShipSelector;
 
 /**
  * the button representing one ship in the ship selector
  */
 public class ShipSelectButton extends Button {
 
+    /**
+     * Sprite batch
+     */
+    private SpriteBatch batch;
+    /**
+     * Orthographic camera
+     */
+    private OrthographicCamera camera;
+    /**
+     * Background
+     */
+    private Texture background;
+    /**
+     * Click sound effect
+     */
+    private Sound clickSound;
+
     /**
      * the ship this button represents in the ship selector
      */
     private int ship;
 
+    /**
+     * the screen this button is on
+     */
+    private ShipSelector screen;
+
     /**
      * Left-Click action of the Button.
      */
@@ -24,9 +51,10 @@ public class ShipSelectButton extends Button {
     /**
      * constructor
      * @param main the main class
-     * @param ship the ship id TODO wie werden die unterschiedlichen schiffe aus denen ausgewählt wird dargestellt?
+     * @param ship the ship, (index of ship in list in shipselector)
+     * @param screen the screen this button is on
      */
-    public ShipSelectButton(Main main, int ship) {
+    public ShipSelectButton(Main main, int ship, ShipSelector screen) {
 
     }
 }
diff --git a/core/src/com/galaxytrucker/galaxytruckerreloaded/View/Buttons/MenuButtons/SinglePlayerButton.java b/core/src/com/galaxytrucker/galaxytruckerreloaded/View/Buttons/MenuButtons/SinglePlayerButton.java
index 4c2631c3..07408046 100644
--- a/core/src/com/galaxytrucker/galaxytruckerreloaded/View/Buttons/MenuButtons/SinglePlayerButton.java
+++ b/core/src/com/galaxytrucker/galaxytruckerreloaded/View/Buttons/MenuButtons/SinglePlayerButton.java
@@ -1,13 +1,40 @@
 package com.galaxytrucker.galaxytruckerreloaded.View.Buttons.MenuButtons;
 
+import com.badlogic.gdx.audio.Sound;
+import com.badlogic.gdx.graphics.OrthographicCamera;
+import com.badlogic.gdx.graphics.Texture;
+import com.badlogic.gdx.graphics.g2d.SpriteBatch;
 import com.galaxytrucker.galaxytruckerreloaded.Main;
 import com.galaxytrucker.galaxytruckerreloaded.View.Buttons.Button;
+import com.galaxytrucker.galaxytruckerreloaded.View.Screen.ShipSelector;
 
 /**
  * button to choose single player in the ship selector
  */
 public class SinglePlayerButton extends Button {
 
+    /**
+     * Sprite batch
+     */
+    private SpriteBatch batch;
+    /**
+     * Orthographic camera
+     */
+    private OrthographicCamera camera;
+    /**
+     * Background
+     */
+    private Texture background;
+    /**
+     * Click sound effect
+     */
+    private Sound clickSound;
+
+    /**
+     * the screen this button is on
+     */
+    private ShipSelector screen;
+
     /**
      * whether or not it is single player
      */
@@ -23,9 +50,11 @@ public class SinglePlayerButton extends Button {
 
     /**
      * constructor
+     *
+     * @param screen  the screen this button is on
      * @param main the main class
      */
-    public SinglePlayerButton(Main main) {
+    public SinglePlayerButton(Main main, ShipSelector screen) {
 
     }
 }
diff --git a/core/src/com/galaxytrucker/galaxytruckerreloaded/View/Buttons/MenuButtons/StartButton.java b/core/src/com/galaxytrucker/galaxytruckerreloaded/View/Buttons/MenuButtons/StartButton.java
index 2d0d8fe9..eb9e3328 100644
--- a/core/src/com/galaxytrucker/galaxytruckerreloaded/View/Buttons/MenuButtons/StartButton.java
+++ b/core/src/com/galaxytrucker/galaxytruckerreloaded/View/Buttons/MenuButtons/StartButton.java
@@ -6,6 +6,7 @@ import com.badlogic.gdx.graphics.Texture;
 import com.badlogic.gdx.graphics.g2d.SpriteBatch;
 import com.galaxytrucker.galaxytruckerreloaded.Main;
 import com.galaxytrucker.galaxytruckerreloaded.View.Buttons.Button;
+import com.galaxytrucker.galaxytruckerreloaded.View.Screen.MainMenu;
 
 /**
  * Starts a new Game
@@ -29,13 +30,19 @@ public class StartButton extends Button
      */
     private Sound clickSound;
 
+    /**
+     * the screen this button is on
+     */
+    private MainMenu screen;
+
 
     /**
      * Constructor
      *
      * @param main - main class
+     * @param screen the screen this button is on
      */
-    public StartButton(Main main) {
+    public StartButton(Main main, MainMenu screen) {
     }
 
 //    /**
diff --git a/core/src/com/galaxytrucker/galaxytruckerreloaded/View/Screen/LoginScreen.java b/core/src/com/galaxytrucker/galaxytruckerreloaded/View/Screen/LoginScreen.java
index b6493203..1c5fac76 100644
--- a/core/src/com/galaxytrucker/galaxytruckerreloaded/View/Screen/LoginScreen.java
+++ b/core/src/com/galaxytrucker/galaxytruckerreloaded/View/Screen/LoginScreen.java
@@ -86,6 +86,13 @@ public class LoginScreen implements Screen {
 
     }
 
+    /**
+     * login method, called by the button
+     */
+    public void login() {
+
+    }
+
     /**
      * Constructor
      *
diff --git a/core/src/com/galaxytrucker/galaxytruckerreloaded/View/Screen/MainMenu.java b/core/src/com/galaxytrucker/galaxytruckerreloaded/View/Screen/MainMenu.java
index f9d3c5cf..a1bfe551 100644
--- a/core/src/com/galaxytrucker/galaxytruckerreloaded/View/Screen/MainMenu.java
+++ b/core/src/com/galaxytrucker/galaxytruckerreloaded/View/Screen/MainMenu.java
@@ -90,6 +90,30 @@ public class MainMenu implements Screen {
 
     }
 
+    /**
+     * starts a new game.
+     * called by button
+     */
+    public void newGame() {
+
+    }
+
+    /**
+     * resumes the existing game.
+     * called by button
+     */
+    public void resumeGame() {
+
+    }
+
+    /**
+     * quits.
+     * called by button
+     */
+    public void quit()  {
+
+    }
+
     /** Constructor
      * @param main - main class */
     public MainMenu(Main main){}
diff --git a/core/src/com/galaxytrucker/galaxytruckerreloaded/View/Screen/ShipSelector.java b/core/src/com/galaxytrucker/galaxytruckerreloaded/View/Screen/ShipSelector.java
index 36d6222b..bd669dda 100644
--- a/core/src/com/galaxytrucker/galaxytruckerreloaded/View/Screen/ShipSelector.java
+++ b/core/src/com/galaxytrucker/galaxytruckerreloaded/View/Screen/ShipSelector.java
@@ -97,7 +97,31 @@ public class ShipSelector implements Screen {
 
     }
 
-    /** Constructor
+    /**
+     * to set the difficulty. called by button
+     * @param difficulty the difficulty
+     */
+    public void setDifficulty(int difficulty) {
+
+    }
+
+    /**
+     * the ship is selected
+     * @param ship the index of the ship in the list of possible ships
+     */
+    public void setShip(int ship) {
+
+    }
+
+    /**
+     * sets whether or not singleplayer. called by button
+     * @param single singleplayer = true
+     */
+    public void setSinglePlayer(boolean single) {
+
+    }
+
+    /** Constructor TODO wie werden die schiffe dargestellt
      * @param main - main class */
     public ShipSelector(Main main){}
 }
diff --git a/core/src/com/galaxytrucker/galaxytruckerreloaded/View/UI/Events/EventGUI.java b/core/src/com/galaxytrucker/galaxytruckerreloaded/View/UI/Events/EventGUI.java
index c6801cf6..c0dedb5e 100644
--- a/core/src/com/galaxytrucker/galaxytruckerreloaded/View/UI/Events/EventGUI.java
+++ b/core/src/com/galaxytrucker/galaxytruckerreloaded/View/UI/Events/EventGUI.java
@@ -82,6 +82,8 @@ public class EventGUI {
      * Switch event page
      * if there is no next page hide the event gui
      * possibly open Shop ui, if the event is a shop, or start fight
+     *
+     * called by button
      */
     private void nextPage() {
     }
diff --git a/core/src/com/galaxytrucker/galaxytruckerreloaded/View/UI/Events/ShopUI.java b/core/src/com/galaxytrucker/galaxytruckerreloaded/View/UI/Events/ShopUI.java
index 81100f9f..2e7ba7d9 100644
--- a/core/src/com/galaxytrucker/galaxytruckerreloaded/View/UI/Events/ShopUI.java
+++ b/core/src/com/galaxytrucker/galaxytruckerreloaded/View/UI/Events/ShopUI.java
@@ -67,6 +67,16 @@ public class ShopUI {
     public void disposeShopUI() {
     }
 
+    /**
+     * an item is bought
+     * called by button
+     * @param item the item (index in the list)
+     */
+    public void buy(int item) {
+
+    }
+
+
     /**
      * constructor
      * @param main the main class
diff --git a/core/src/com/galaxytrucker/galaxytruckerreloaded/View/UI/Inventory/InventoryCrewSlotUI.java b/core/src/com/galaxytrucker/galaxytruckerreloaded/View/UI/Inventory/InventoryCrewSlotUI.java
index 4b45530e..a01a97d9 100644
--- a/core/src/com/galaxytrucker/galaxytruckerreloaded/View/UI/Inventory/InventoryCrewSlotUI.java
+++ b/core/src/com/galaxytrucker/galaxytruckerreloaded/View/UI/Inventory/InventoryCrewSlotUI.java
@@ -5,6 +5,9 @@ import com.badlogic.gdx.scenes.scene2d.ui.List;
 import com.galaxytrucker.galaxytruckerreloaded.Main;
 import com.galaxytrucker.galaxytruckerreloaded.Model.Crew.Crew;
 
+/**
+ * to represent a crew member in the inventory
+ */
 public class InventoryCrewSlotUI extends InventorySlotUI {
 
     /**
diff --git a/core/src/com/galaxytrucker/galaxytruckerreloaded/View/UI/Ship/ShipView.java b/core/src/com/galaxytrucker/galaxytruckerreloaded/View/UI/Ship/ShipView.java
index fe90a332..3558c732 100644
--- a/core/src/com/galaxytrucker/galaxytruckerreloaded/View/UI/Ship/ShipView.java
+++ b/core/src/com/galaxytrucker/galaxytruckerreloaded/View/UI/Ship/ShipView.java
@@ -1,15 +1,12 @@
 package com.galaxytrucker.galaxytruckerreloaded.View.UI.Ship;
 
-import com.badlogic.gdx.graphics.OrthographicCamera;
 import com.badlogic.gdx.graphics.Texture;
-import com.badlogic.gdx.graphics.g2d.SpriteBatch;
 import com.badlogic.gdx.scenes.scene2d.ui.List;
 import com.galaxytrucker.galaxytruckerreloaded.Main;
 import com.galaxytrucker.galaxytruckerreloaded.Model.Ship;
 import com.galaxytrucker.galaxytruckerreloaded.View.Buttons.InGameButtons.AutofireButton;
 import com.galaxytrucker.galaxytruckerreloaded.View.Buttons.InGameButtons.MoveButton;
 import com.galaxytrucker.galaxytruckerreloaded.View.Buttons.InGameButtons.ShipButton;
-import com.galaxytrucker.galaxytruckerreloaded.View.UI.Inventory.InventoryUI;
 import com.galaxytrucker.galaxytruckerreloaded.View.UI.ShipInformation.*;
 
 public class ShipView extends AbstractShip {
@@ -46,14 +43,15 @@ public class ShipView extends AbstractShip {
     private MoveButton moveButton;
 
     /**
-     * the background texture of the ship
+     * the weapon autofire button
      */
-    private Texture shipBackground;
+    private AutofireButton weaponAutofire;
 
     /**
-     * the weapon autofire button
+     * the background texture of the ship
      */
-    private AutofireButton weaponAutofire;
+    private Texture shipBackground;
+
 
     /**
      * the general background for the weapon display in the bottom left corner next to the energy status display
@@ -109,6 +107,30 @@ public class ShipView extends AbstractShip {
 
     }
 
+    /**
+     * open the inventory of this ship
+     * called by ship button
+     */
+    public void openInventory() {
+
+    }
+
+    /**
+     * open the map
+     * called by move button
+     */
+    public void openMap() {
+
+    }
+
+    /**
+     * autofire
+     * called by autofire button
+     */
+    public void autofire() {
+
+    }
+
     /**
      * Ship hop animation
      */
diff --git a/core/src/com/galaxytrucker/galaxytruckerreloaded/View/UI/ShipInformation/CrewUI.java b/core/src/com/galaxytrucker/galaxytruckerreloaded/View/UI/ShipInformation/CrewUI.java
index 995ff211..aebfc402 100644
--- a/core/src/com/galaxytrucker/galaxytruckerreloaded/View/UI/ShipInformation/CrewUI.java
+++ b/core/src/com/galaxytrucker/galaxytruckerreloaded/View/UI/ShipInformation/CrewUI.java
@@ -66,6 +66,15 @@ public class CrewUI {
 
     }
 
+    /**
+     * the crew was chosen to be moved
+     * called by button crewdismiss
+     * not waiting for the user to choose a room on the ship
+     */
+    public void crewMoving() {
+
+    }
+
     /**
      * the crew member died
      */
diff --git a/core/src/com/galaxytrucker/galaxytruckerreloaded/View/UI/ShipInformation/SubsystemUI.java b/core/src/com/galaxytrucker/galaxytruckerreloaded/View/UI/ShipInformation/SubsystemUI.java
index 350bf4c2..fb9922f9 100644
--- a/core/src/com/galaxytrucker/galaxytruckerreloaded/View/UI/ShipInformation/SubsystemUI.java
+++ b/core/src/com/galaxytrucker/galaxytruckerreloaded/View/UI/ShipInformation/SubsystemUI.java
@@ -105,6 +105,23 @@ public class SubsystemUI {
 
     }
 
+    /**
+     * activates the energy supply for this system
+     * called by systembutton
+     * if energy supply already activated and not at maximum, then more energy to this system
+     */
+    public void activateEnergy() {
+
+    }
+
+    /**
+     * the energy supply for this system is lowered, unless there is no supply
+     * called by systembutton
+     */
+    public void lessEnergy() {
+
+    }
+
     /**
      * constructor
      * @param main the main class
diff --git a/core/src/com/galaxytrucker/galaxytruckerreloaded/View/UI/ShipInformation/WeaponUI.java b/core/src/com/galaxytrucker/galaxytruckerreloaded/View/UI/ShipInformation/WeaponUI.java
index 781fbcbb..9a6ba9a2 100644
--- a/core/src/com/galaxytrucker/galaxytruckerreloaded/View/UI/ShipInformation/WeaponUI.java
+++ b/core/src/com/galaxytrucker/galaxytruckerreloaded/View/UI/ShipInformation/WeaponUI.java
@@ -54,6 +54,15 @@ public class WeaponUI {
 
     }
 
+    /**
+     * the weapon is activated. now, a room needs to be selected
+     * if weapon is active, it is deactivated
+     * called by weaponactivatebutton
+     */
+    public void weaponactivated() {
+
+    }
+
     /**
      * constructor
      * @param main the main class
-- 
GitLab