mirror of
https://gitlab.com/MaddoScientisto/cirnogodot.git
synced 2026-06-05 22:55:54 +00:00
Added navigation to main menu options
This commit is contained in:
parent
f7037fa043
commit
316880cf9d
6 changed files with 54 additions and 8 deletions
|
|
@ -14,6 +14,9 @@ public partial class MainMenu : CanvasLayer
|
|||
[Export]
|
||||
public Control SubMenuHolder { get; set; } = new Control();
|
||||
|
||||
[Export]
|
||||
public Button DefaultSelectedButton { get; private set; }
|
||||
|
||||
[Export]
|
||||
public AudioStreamPlayer2D MusicPlayer { get; private set; }
|
||||
|
||||
|
|
@ -36,6 +39,7 @@ public partial class MainMenu : CanvasLayer
|
|||
// Called when the node enters the scene tree for the first time.
|
||||
public override void _Ready()
|
||||
{
|
||||
DefaultSelectedButton.GrabFocus();
|
||||
}
|
||||
|
||||
// Called every frame. 'delta' is the elapsed time since the previous frame.
|
||||
|
|
@ -103,6 +107,8 @@ public partial class MainMenu : CanvasLayer
|
|||
{
|
||||
MusicPlayer.Play();
|
||||
}
|
||||
|
||||
DefaultSelectedButton.GrabFocus();
|
||||
};
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue