Skip to content

Commit 5dbfefe

Browse files
committed
Merge branch 'master' into 'mainMenuLogo'
# Conflicts: # src/main/java/nl/hsleiden/joshuabloch/menu/MainMenu.java
2 parents 1f303ec + 9c579f3 commit 5dbfefe

File tree

14 files changed

+333
-112
lines changed

14 files changed

+333
-112
lines changed

src/main/java/nl/hsleiden/joshuabloch/menu/MainMenu.java

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@
2828

2929
public class MainMenu extends FXGLMenu {
3030
private static final int SIZE = 250;
31-
private final Animation<?> animation;
3231
private final Rectangle buttonLevel1;
3332
private final Rectangle buttonLevel2;
3433
private final Rectangle buttonLevel3;
@@ -148,12 +147,14 @@ public MainMenu(MenuType menuType, LevelManager levelManager) {
148147
buttonLogin.setArcWidth(15);
149148
buttonLogin.strokeProperty().bind(Bindings.when(buttonLogin.hoverProperty()).then(Color.web("425622",1.0)).otherwise(Color.web("6E834C",1.0)));
150149
buttonLogin.fillProperty().bind(Bindings.when(buttonLogin.pressedProperty()).then(Color.web("425622",1.0)).otherwise(Color.web("6E834C",1.0)));
151-
buttonLogin.setOnMouseClicked(e -> getDialogService().showInputBox("Please enter your name:", answer -> levelManager.setName(answer, c -> {
152-
textLogin.setText("LOGGED IN");
153-
lockButtons(levelManager.levelProgress);
154-
showHighscores();
155-
return null;
156-
})));
150+
buttonLogin.setOnMouseClicked(e -> getDialogService().showInputBox("Please enter your name:", answer -> {
151+
levelManager.setName(answer.toLowerCase(), c -> {
152+
textLogin.setText("LOGGED IN");
153+
lockButtons(levelManager.levelProgress);
154+
showHighscores();
155+
return null;
156+
});
157+
}));
157158

158159
// Button Quit
159160
var buttonQuit = new Rectangle(SIZE, 60);
@@ -222,19 +223,19 @@ public MainMenu(MenuType menuType, LevelManager levelManager) {
222223

223224

224225
// HighScore Level 1
225-
highScoreLevel1 = FXGL.getUIFactoryService().newText("", Color.RED, FontType.GAME, 24.0);
226+
highScoreLevel1 = FXGL.getUIFactoryService().newText("", Color.web("9db379",1.0), FontType.GAME, 24.0);
226227
highScoreLevel1.setTextAlignment(TextAlignment.CENTER);
227228

228229
// HighScore Level 2
229-
highScoreLevel2 = FXGL.getUIFactoryService().newText("", Color.RED, FontType.GAME, 24.0);
230+
highScoreLevel2 = FXGL.getUIFactoryService().newText("", Color.web("9db379",1.0), FontType.GAME, 24.0);
230231
highScoreLevel2.setTextAlignment(TextAlignment.CENTER);
231232

232233
// HighScore Level 3
233-
highScoreLevel3 = FXGL.getUIFactoryService().newText("", Color.RED, FontType.GAME, 24.0);
234+
highScoreLevel3 = FXGL.getUIFactoryService().newText("", Color.web("9db379",1.0), FontType.GAME, 24.0);
234235
highScoreLevel3.setTextAlignment(TextAlignment.CENTER);
235236

236237
// HighScore Level 4
237-
highScoreLevel4 = FXGL.getUIFactoryService().newText("", Color.RED, FontType.GAME, 24.0);
238+
highScoreLevel4 = FXGL.getUIFactoryService().newText("", Color.web("9db379",1.0), FontType.GAME, 24.0);
238239
highScoreLevel4.setTextAlignment(TextAlignment.CENTER);
239240

240241

324 Bytes
Loading
318 Bytes
Loading
597 Bytes
Loading

src/main/resources/assets/levels/tmx/level_2.tmx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<property name="background" value="snow_background.png"/>
55
<property name="cost" value="28"/>
66
</properties>
7-
<tileset firstgid="1" name="tiles" tilewidth="32" tileheight="32" tilecount="13" columns="0">
7+
<tileset firstgid="1" name="tiles" tilewidth="32" tileheight="32" tilecount="22" columns="0"> //13
88
<grid orientation="orthogonal" width="1" height="1"/>
99
<tile id="0">
1010
<image width="32" height="32" source="Dirt.png"/>

src/main/resources/assets/levels/tmx/level_3.tmx

Lines changed: 126 additions & 100 deletions
Large diffs are not rendered by default.

src/main/resources/assets/levels/tmx/level_4.tmx

Lines changed: 194 additions & 0 deletions
Large diffs are not rendered by default.
387 Bytes
Loading
528 Bytes
Loading
432 Bytes
Loading

0 commit comments

Comments
 (0)