Package com.mg105.user_interface
Class MainMenu
java.lang.Object
com.mg105.user_interface.MainMenu
- All Implemented Interfaces:
Toggleable
The main game menu.
-
Constructor Summary
-
Method Summary
-
Constructor Details
-
MainMenu
Create a new MainMenu.- Parameters:
startButton
- the button that starts the game.
-
-
Method Details
-
getScene
@NotNull public @NotNull javafx.scene.Scene getScene()Description copied from interface:Toggleable
Get the scene of this toggleable object. It is this scene that will be displayed.- Specified by:
getScene
in interfaceToggleable
- Returns:
- the scene to be displayed.
-
toggle
public void toggle(boolean isVisible) Description copied from interface:Toggleable
Set the visibility of this component.- Specified by:
toggle
in interfaceToggleable
- Parameters:
isVisible
- true if the Toggleable is now visible, false otherwise. If false the Toggleable is expected to do nothing on ANY user inputs.
-