@@ -96,75 +96,87 @@ public mainMenu(MenuType menuType) {
9696
9797 // Button Level 1
9898 buttonLevel1 = new Rectangle (SIZE , 60 );
99- buttonLevel1 .setStrokeWidth (2.5 );
100- buttonLevel1 .strokeProperty ().bind (Bindings .when (buttonLevel1 .hoverProperty ()).then (Color .YELLOW ).otherwise (Color .BLACK ));
101- buttonLevel1 .fillProperty ().bind (Bindings .when (buttonLevel1 .pressedProperty ()).then (Color .YELLOW ).otherwise (Color .color (0.1 , 0.05 , 0.0 , 0.75 )));
99+ buttonLevel1 .setStrokeWidth (4 );
100+ buttonLevel1 .setArcHeight (15 );
101+ buttonLevel1 .setArcWidth (15 );
102+ buttonLevel1 .strokeProperty ().bind (Bindings .when (buttonLevel1 .hoverProperty ()).then (Color .web ("425622" ,1.0 )).otherwise (Color .web ("6E834C" ,1.0 )));
103+ buttonLevel1 .fillProperty ().bind (Bindings .when (buttonLevel1 .pressedProperty ()).then (Color .web ("425622" ,1.0 )).otherwise (Color .web ("6E834C" ,1.0 )));
102104 buttonLevel1 .setOnMouseClicked (e -> FXGL .getGameController ().startNewGame ()); // Level spelen
103105
104106 // Button Level 2
105107 buttonLevel2 = new Rectangle (SIZE , 60 );
106- buttonLevel2 .setStrokeWidth (2.5 );
107- buttonLevel2 .strokeProperty ().bind (Bindings .when (buttonLevel2 .hoverProperty ()).then (Color .YELLOW ).otherwise (Color .BLACK ));
108- buttonLevel2 .fillProperty ().bind (Bindings .when (buttonLevel2 .pressedProperty ()).then (Color .YELLOW ).otherwise (Color .color (0.1 , 0.05 , 0.0 , 0.75 )));
108+ buttonLevel2 .setStrokeWidth (4 );
109+ buttonLevel2 .setArcHeight (15 );
110+ buttonLevel2 .setArcWidth (15 );
111+ buttonLevel2 .strokeProperty ().bind (Bindings .when (buttonLevel2 .hoverProperty ()).then (Color .web ("425622" ,1.0 )).otherwise (Color .web ("6E834C" ,1.0 )));
112+ buttonLevel2 .fillProperty ().bind (Bindings .when (buttonLevel2 .pressedProperty ()).then (Color .web ("425622" ,1.0 )).otherwise (Color .web ("6E834C" ,1.0 )));
109113 buttonLevel2 .setOnMouseClicked (e -> FXGL .getGameController ().startNewGame ());
110114
111115 // Button Level 3
112116 buttonLevel3 = new Rectangle (SIZE , 60 );
113- buttonLevel3 .setStrokeWidth (2.5 );
114- buttonLevel3 .strokeProperty ().bind (Bindings .when (buttonLevel3 .hoverProperty ()).then (Color .YELLOW ).otherwise (Color .BLACK ));
115- buttonLevel3 .fillProperty ().bind (Bindings .when (buttonLevel3 .pressedProperty ()).then (Color .YELLOW ).otherwise (Color .color (0.1 , 0.05 , 0.0 , 0.75 )));
117+ buttonLevel3 .setStrokeWidth (4 );
118+ buttonLevel3 .setArcHeight (15 );
119+ buttonLevel3 .setArcWidth (15 );
120+ buttonLevel3 .strokeProperty ().bind (Bindings .when (buttonLevel3 .hoverProperty ()).then (Color .web ("425622" ,1.0 )).otherwise (Color .web ("6E834C" ,1.0 )));
121+ buttonLevel3 .fillProperty ().bind (Bindings .when (buttonLevel3 .pressedProperty ()).then (Color .web ("425622" ,1.0 )).otherwise (Color .web ("6E834C" ,1.0 )));
116122 buttonLevel3 .setOnMouseClicked (e -> FXGL .getGameController ().startNewGame ());
117123
118124 // Button Level 4
119125 buttonLevel4 = new Rectangle (SIZE , 60 );
120- buttonLevel4 .setStrokeWidth (2.5 );
121- buttonLevel4 .strokeProperty ().bind (Bindings .when (buttonLevel4 .hoverProperty ()).then (Color .YELLOW ).otherwise (Color .BLACK ));
122- buttonLevel4 .fillProperty ().bind (Bindings .when (buttonLevel4 .pressedProperty ()).then (Color .YELLOW ).otherwise (Color .color (0.1 , 0.05 , 0.0 , 0.75 )));
126+ buttonLevel4 .setStrokeWidth (4 );
127+ buttonLevel4 .setArcHeight (15 );
128+ buttonLevel4 .setArcWidth (15 );
129+ buttonLevel4 .strokeProperty ().bind (Bindings .when (buttonLevel4 .hoverProperty ()).then (Color .web ("425622" ,1.0 )).otherwise (Color .web ("6E834C" ,1.0 )));
130+ buttonLevel4 .fillProperty ().bind (Bindings .when (buttonLevel4 .pressedProperty ()).then (Color .web ("425622" ,1.0 )).otherwise (Color .web ("6E834C" ,1.0 )));
123131 buttonLevel4 .setOnMouseClicked (e -> FXGL .getGameController ().startNewGame ());
124132
125133
126134 // Button login
127135 var buttonLogin = new Rectangle (SIZE , 60 );
128- buttonLogin .setStrokeWidth (2.5 );
129- buttonLogin .strokeProperty ().bind (Bindings .when (buttonLogin .hoverProperty ()).then (Color .YELLOW ).otherwise (Color .BLACK ));
130- buttonLogin .fillProperty ().bind (Bindings .when (buttonLogin .pressedProperty ()).then (Color .YELLOW ).otherwise (Color .color (0.1 , 0.05 , 0.0 , 0.75 )));
136+ buttonLogin .setStrokeWidth (4 );
137+ buttonLogin .setArcHeight (15 );
138+ buttonLogin .setArcWidth (15 );
139+ buttonLogin .strokeProperty ().bind (Bindings .when (buttonLogin .hoverProperty ()).then (Color .web ("425622" ,1.0 )).otherwise (Color .web ("6E834C" ,1.0 )));
140+ buttonLogin .fillProperty ().bind (Bindings .when (buttonLogin .pressedProperty ()).then (Color .web ("425622" ,1.0 )).otherwise (Color .web ("6E834C" ,1.0 )));
131141 buttonLogin .setOnMouseClicked (e -> FXGL .getGameController ().startNewGame ());
132142
133143 // Button Quit
134144 var buttonQuit = new Rectangle (SIZE , 60 );
135- buttonQuit .setStrokeWidth (2.5 );
136- buttonQuit .strokeProperty ().bind (Bindings .when (buttonQuit .hoverProperty ()).then (Color .YELLOW ).otherwise (Color .BLACK ));
137- buttonQuit .fillProperty ().bind (Bindings .when (buttonQuit .pressedProperty ()).then (Color .YELLOW ).otherwise (Color .color (0.1 , 0.05 , 0.0 , 0.75 )));
145+ buttonQuit .setStrokeWidth (4 );
146+ buttonQuit .setArcHeight (15 );
147+ buttonQuit .setArcWidth (15 );
148+ buttonQuit .strokeProperty ().bind (Bindings .when (buttonQuit .hoverProperty ()).then (Color .web ("425622" ,1.0 )).otherwise (Color .web ("6E834C" ,1.0 )));
149+ buttonQuit .fillProperty ().bind (Bindings .when (buttonQuit .pressedProperty ()).then (Color .web ("425622" ,1.0 )).otherwise (Color .web ("6E834C" ,1.0 )));
138150 buttonQuit .setOnMouseClicked (e -> FXGL .getGameController ().exit ());
139151
140152
141153
142154
143155 // Text Level 1
144- Text textLevel1 = FXGL .getUIFactoryService ().newText ("LEVEL 1" , Color .RED , FontType .GAME , 24.0 );
156+ Text textLevel1 = FXGL .getUIFactoryService ().newText ("LEVEL 1" , Color .web ( "9db379" , 1.0 ) , FontType .GAME , 24.0 );
145157 textLevel1 .setTextAlignment (TextAlignment .CENTER );
146158
147159
148160 // Text Level 2
149- Text textLevel2 = FXGL .getUIFactoryService ().newText ("LEVEL 2" , Color .RED , FontType .GAME , 24.0 );
161+ Text textLevel2 = FXGL .getUIFactoryService ().newText ("LEVEL 2" , Color .web ( "9db379" , 1.0 ) , FontType .GAME , 24.0 );
150162 textLevel2 .setTextAlignment (TextAlignment .CENTER );
151163
152164 // Text Level 3
153- Text textLevel3 = FXGL .getUIFactoryService ().newText ("LEVEL 3" , Color .RED , FontType .GAME , 24.0 );
165+ Text textLevel3 = FXGL .getUIFactoryService ().newText ("LEVEL 3" , Color .web ( "9db379" , 1.0 ) , FontType .GAME , 24.0 );
154166 textLevel3 .setTextAlignment (TextAlignment .CENTER );
155167
156168 // Text Level 4
157- Text textLevel4 = FXGL .getUIFactoryService ().newText ("LEVEL 4" , Color .RED , FontType .GAME , 24.0 );
169+ Text textLevel4 = FXGL .getUIFactoryService ().newText ("LEVEL 4" , Color .web ( "9db379" , 1.0 ) , FontType .GAME , 24.0 );
158170 textLevel4 .setTextAlignment (TextAlignment .CENTER );
159171
160172 // Text Login
161- Text textLogin = FXGL .getUIFactoryService ().newText ("LOGIN" , Color .RED , FontType .GAME , 24.0 );
173+ Text textLogin = FXGL .getUIFactoryService ().newText ("LOGIN" , Color .web ( "9db379" , 1.0 ) , FontType .GAME , 24.0 );
162174 textLogin .setTextAlignment (TextAlignment .CENTER );
163175// textLogin.setWrappingWidth(buttonLogin.getWidth());
164176// textLogin.setTranslateY(buttonLogin.getTranslateY() + (buttonLogin.getHeight() / 2) + (textLogin.getLayoutBounds().getHeight() / 4) );
165177
166178 // Text Quit
167- Text textQuit = FXGL .getUIFactoryService ().newText ("QUIT" , Color .RED , FontType .GAME , 24.0 );
179+ Text textQuit = FXGL .getUIFactoryService ().newText ("QUIT" , Color .web ( "9db379" , 1.0 ) , FontType .GAME , 24.0 );
168180 textQuit .setTextAlignment (TextAlignment .CENTER );
169181
170182
0 commit comments