LS03-02-2 | MainMenue: Löschen des Label "Level:" und des Drop-Down-Menüs
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<form xmlns="http://www.intellij.com/uidesigner/form/" version="1" bind-to-class="de.oszimt.ls.aliendefence.view.menue.MainMenu">
|
||||
<grid id="27dc6" binding="main" layout-manager="GridLayoutManager" row-count="13" column-count="1" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1">
|
||||
<grid id="27dc6" binding="main" layout-manager="GridLayoutManager" row-count="11" column-count="1" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1">
|
||||
<margin top="0" left="0" bottom="0" right="0"/>
|
||||
<constraints>
|
||||
<xy x="20" y="20" width="326" height="715"/>
|
||||
@@ -66,25 +66,9 @@
|
||||
</constraints>
|
||||
<properties/>
|
||||
</component>
|
||||
<component id="4aca1" class="javax.swing.JLabel">
|
||||
<constraints>
|
||||
<grid row="6" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="8" fill="0" indent="0" use-parent-layout="false"/>
|
||||
</constraints>
|
||||
<properties>
|
||||
<font size="14" style="1"/>
|
||||
<foreground color="-256"/>
|
||||
<text value="Level:"/>
|
||||
</properties>
|
||||
</component>
|
||||
<component id="a16d0" class="javax.swing.JComboBox" binding="level">
|
||||
<constraints>
|
||||
<grid row="7" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="2" anchor="8" fill="1" indent="0" use-parent-layout="false"/>
|
||||
</constraints>
|
||||
<properties/>
|
||||
</component>
|
||||
<component id="39eaf" class="javax.swing.JButton" binding="playButton">
|
||||
<constraints>
|
||||
<grid row="8" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="3" anchor="0" fill="1" indent="0" use-parent-layout="false"/>
|
||||
<grid row="6" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="3" anchor="0" fill="1" indent="0" use-parent-layout="false"/>
|
||||
</constraints>
|
||||
<properties>
|
||||
<actionCommand value=""/>
|
||||
@@ -93,7 +77,7 @@
|
||||
</component>
|
||||
<component id="6cda2" class="javax.swing.JButton" binding="testButton">
|
||||
<constraints>
|
||||
<grid row="9" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="3" anchor="0" fill="1" indent="0" use-parent-layout="false"/>
|
||||
<grid row="7" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="3" anchor="0" fill="1" indent="0" use-parent-layout="false"/>
|
||||
</constraints>
|
||||
<properties>
|
||||
<text value="Testen"/>
|
||||
@@ -109,7 +93,7 @@
|
||||
</component>
|
||||
<component id="e66c9" class="javax.swing.JButton" binding="highscoreButton" default-binding="true">
|
||||
<constraints>
|
||||
<grid row="10" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="3" anchor="0" fill="1" indent="0" use-parent-layout="false"/>
|
||||
<grid row="8" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="3" anchor="0" fill="1" indent="0" use-parent-layout="false"/>
|
||||
</constraints>
|
||||
<properties>
|
||||
<text value="Highscore"/>
|
||||
@@ -117,7 +101,7 @@
|
||||
</component>
|
||||
<component id="7ae73" class="javax.swing.JButton" binding="levelEditorButton" default-binding="true">
|
||||
<constraints>
|
||||
<grid row="11" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="3" anchor="0" fill="1" indent="0" use-parent-layout="false"/>
|
||||
<grid row="9" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="3" anchor="0" fill="1" indent="0" use-parent-layout="false"/>
|
||||
</constraints>
|
||||
<properties>
|
||||
<background color="-256"/>
|
||||
@@ -127,7 +111,7 @@
|
||||
</component>
|
||||
<component id="ef1af" class="javax.swing.JButton" binding="exitButton">
|
||||
<constraints>
|
||||
<grid row="12" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="3" anchor="0" fill="1" indent="0" use-parent-layout="false"/>
|
||||
<grid row="10" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="3" anchor="0" fill="1" indent="0" use-parent-layout="false"/>
|
||||
</constraints>
|
||||
<properties>
|
||||
<background color="-3552823"/>
|
||||
|
||||
@@ -15,7 +15,6 @@ public class MainMenu {
|
||||
|
||||
private JPanel main;
|
||||
private JTextField loginTextField;
|
||||
private JComboBox level;
|
||||
private JButton playButton;
|
||||
private JButton testButton;
|
||||
private JButton highscoreButton;
|
||||
@@ -24,12 +23,10 @@ public class MainMenu {
|
||||
private JPasswordField passwordTextField;
|
||||
|
||||
public MainMenu(AlienDefenceController alienDefenceController) {
|
||||
|
||||
//fill level chooser
|
||||
// Levelliste für die ComboBox abrufen
|
||||
List<Level> arrLevel = alienDefenceController.getLevelController().readAllLevels();
|
||||
String[] arrLevelNames = getLevelNames(arrLevel);
|
||||
level.setModel(new DefaultComboBoxModel<String>(arrLevelNames));
|
||||
|
||||
// Button Spielen - ActionListener
|
||||
playButton.addActionListener(new ActionListener() {
|
||||
@@ -45,8 +42,8 @@ public class MainMenu {
|
||||
@Override
|
||||
public void run() {
|
||||
|
||||
GameController gameController = alienDefenceController.startGame(arrLevel.get(level.getSelectedIndex()), user);
|
||||
new GameGUI(gameController).start();
|
||||
//GameController gameController = alienDefenceController.startGame(arrLevel.get(level.getSelectedIndex()), user);
|
||||
//new GameGUI(gameController).start();
|
||||
}
|
||||
};
|
||||
t.start();
|
||||
@@ -72,7 +69,7 @@ public class MainMenu {
|
||||
highscoreButton.addActionListener(new ActionListener() {
|
||||
@Override
|
||||
public void actionPerformed(ActionEvent e) {
|
||||
new Highscore(alienDefenceController.getAttemptController(), arrLevel.get(level.getSelectedIndex()));
|
||||
new Highscore(alienDefenceController.getAttemptController(), arrLevel.get(1));
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user