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"?>
|
<?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">
|
<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"/>
|
<margin top="0" left="0" bottom="0" right="0"/>
|
||||||
<constraints>
|
<constraints>
|
||||||
<xy x="20" y="20" width="326" height="715"/>
|
<xy x="20" y="20" width="326" height="715"/>
|
||||||
@@ -66,25 +66,9 @@
|
|||||||
</constraints>
|
</constraints>
|
||||||
<properties/>
|
<properties/>
|
||||||
</component>
|
</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">
|
<component id="39eaf" class="javax.swing.JButton" binding="playButton">
|
||||||
<constraints>
|
<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>
|
</constraints>
|
||||||
<properties>
|
<properties>
|
||||||
<actionCommand value=""/>
|
<actionCommand value=""/>
|
||||||
@@ -93,7 +77,7 @@
|
|||||||
</component>
|
</component>
|
||||||
<component id="6cda2" class="javax.swing.JButton" binding="testButton">
|
<component id="6cda2" class="javax.swing.JButton" binding="testButton">
|
||||||
<constraints>
|
<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>
|
</constraints>
|
||||||
<properties>
|
<properties>
|
||||||
<text value="Testen"/>
|
<text value="Testen"/>
|
||||||
@@ -109,7 +93,7 @@
|
|||||||
</component>
|
</component>
|
||||||
<component id="e66c9" class="javax.swing.JButton" binding="highscoreButton" default-binding="true">
|
<component id="e66c9" class="javax.swing.JButton" binding="highscoreButton" default-binding="true">
|
||||||
<constraints>
|
<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>
|
</constraints>
|
||||||
<properties>
|
<properties>
|
||||||
<text value="Highscore"/>
|
<text value="Highscore"/>
|
||||||
@@ -117,7 +101,7 @@
|
|||||||
</component>
|
</component>
|
||||||
<component id="7ae73" class="javax.swing.JButton" binding="levelEditorButton" default-binding="true">
|
<component id="7ae73" class="javax.swing.JButton" binding="levelEditorButton" default-binding="true">
|
||||||
<constraints>
|
<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>
|
</constraints>
|
||||||
<properties>
|
<properties>
|
||||||
<background color="-256"/>
|
<background color="-256"/>
|
||||||
@@ -127,7 +111,7 @@
|
|||||||
</component>
|
</component>
|
||||||
<component id="ef1af" class="javax.swing.JButton" binding="exitButton">
|
<component id="ef1af" class="javax.swing.JButton" binding="exitButton">
|
||||||
<constraints>
|
<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>
|
</constraints>
|
||||||
<properties>
|
<properties>
|
||||||
<background color="-3552823"/>
|
<background color="-3552823"/>
|
||||||
|
|||||||
@@ -15,7 +15,6 @@ public class MainMenu {
|
|||||||
|
|
||||||
private JPanel main;
|
private JPanel main;
|
||||||
private JTextField loginTextField;
|
private JTextField loginTextField;
|
||||||
private JComboBox level;
|
|
||||||
private JButton playButton;
|
private JButton playButton;
|
||||||
private JButton testButton;
|
private JButton testButton;
|
||||||
private JButton highscoreButton;
|
private JButton highscoreButton;
|
||||||
@@ -24,12 +23,10 @@ public class MainMenu {
|
|||||||
private JPasswordField passwordTextField;
|
private JPasswordField passwordTextField;
|
||||||
|
|
||||||
public MainMenu(AlienDefenceController alienDefenceController) {
|
public MainMenu(AlienDefenceController alienDefenceController) {
|
||||||
|
|
||||||
//fill level chooser
|
//fill level chooser
|
||||||
// Levelliste für die ComboBox abrufen
|
// Levelliste für die ComboBox abrufen
|
||||||
List<Level> arrLevel = alienDefenceController.getLevelController().readAllLevels();
|
List<Level> arrLevel = alienDefenceController.getLevelController().readAllLevels();
|
||||||
String[] arrLevelNames = getLevelNames(arrLevel);
|
String[] arrLevelNames = getLevelNames(arrLevel);
|
||||||
level.setModel(new DefaultComboBoxModel<String>(arrLevelNames));
|
|
||||||
|
|
||||||
// Button Spielen - ActionListener
|
// Button Spielen - ActionListener
|
||||||
playButton.addActionListener(new ActionListener() {
|
playButton.addActionListener(new ActionListener() {
|
||||||
@@ -45,8 +42,8 @@ public class MainMenu {
|
|||||||
@Override
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
|
|
||||||
GameController gameController = alienDefenceController.startGame(arrLevel.get(level.getSelectedIndex()), user);
|
//GameController gameController = alienDefenceController.startGame(arrLevel.get(level.getSelectedIndex()), user);
|
||||||
new GameGUI(gameController).start();
|
//new GameGUI(gameController).start();
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
t.start();
|
t.start();
|
||||||
@@ -72,7 +69,7 @@ public class MainMenu {
|
|||||||
highscoreButton.addActionListener(new ActionListener() {
|
highscoreButton.addActionListener(new ActionListener() {
|
||||||
@Override
|
@Override
|
||||||
public void actionPerformed(ActionEvent e) {
|
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