Control Window Update. Control Window may need a Recontruction.

This commit is contained in:
Noah
2021-10-04 21:00:10 +02:00
parent 3577889091
commit 054de595c3
4 changed files with 48 additions and 9 deletions
+15 -4
View File
@@ -1,5 +1,6 @@
package game;
import gui.ControlWindow;
import gui.GUI;
import java.util.concurrent.ThreadLocalRandom;
@@ -51,18 +52,20 @@ public class Control {
}
case Manuel -> {
buildManuelGame();
}
}
if (gui == null) {
gui = new GUI(this);
}
calcSize();
gui.createGameWindow(this.xSize, this.ySize, this.width, this.height);
if (startMode == StartMode.Manuel){
buildControlWindow();
}
startGame();
@@ -219,10 +222,18 @@ public class Control {
}
public void createControlWindow() {
public void buildControlWindow() {
gui.createControlWindow();
}
public ControlWindow getControlWindow(){
return gui.getControlWindow();
}
public void setVisibility(boolean value){
gui.setVisibility(value);
}
public void setCell(int mouseX, int mouseY, boolean value) {
int x = 0;
int y = 0;