General UI Work
This commit is contained in:
@@ -84,6 +84,8 @@ public partial class App : Node, IApp
|
||||
MainMenu.Quit += OnQuit;
|
||||
_loadedScene.Changed += OnGameLoaded;
|
||||
|
||||
GalleryMenu.GalleryExited += GalleryExited;
|
||||
|
||||
OptionsMenu.OptionsMenuExited += OptionsMenu_OptionsMenuExited;
|
||||
OptionsMenu.DeleteSaveData += DeleteSaveData;
|
||||
AppRepo = _container.GetInstance<IAppRepo>();
|
||||
@@ -113,6 +115,12 @@ public partial class App : Node, IApp
|
||||
MainMenu.OptionsButton.GrabFocus();
|
||||
}
|
||||
|
||||
private void GalleryExited()
|
||||
{
|
||||
GalleryMenu.Hide();
|
||||
MainMenu.GalleryButton.GrabFocus();
|
||||
}
|
||||
|
||||
private void OnGameLoaded(string sceneName)
|
||||
{
|
||||
LoadingScreen.Hide();
|
||||
@@ -190,13 +198,13 @@ public partial class App : Node, IApp
|
||||
private async void OnOptions()
|
||||
{
|
||||
OptionsMenu.Show();
|
||||
OptionsMenu.MasterVolumeSlider.GrabFocus();
|
||||
OptionsMenu.GameTab.GrabFocus();
|
||||
}
|
||||
|
||||
private async void OnGallery()
|
||||
{
|
||||
GalleryMenu.Show();
|
||||
GalleryMenu.PreviousButton.GrabFocus();
|
||||
GalleryMenu.ItemButton1.GrabFocus();
|
||||
}
|
||||
|
||||
public void OnQuit() => AppLogic.Input(new AppLogic.Input.QuitGame());
|
||||
|
||||
@@ -13,13 +13,13 @@ script = ExtResource("1_rt73h")
|
||||
[node name="LoadingScreen" parent="." instance=ExtResource("3_3st5l")]
|
||||
unique_name_in_owner = true
|
||||
|
||||
[node name="MainMenu" parent="." instance=ExtResource("2_1uiag")]
|
||||
unique_name_in_owner = true
|
||||
|
||||
[node name="OptionsMenu" parent="." instance=ExtResource("2_v0mgf")]
|
||||
unique_name_in_owner = true
|
||||
visible = false
|
||||
|
||||
[node name="MainMenu" parent="." instance=ExtResource("2_1uiag")]
|
||||
unique_name_in_owner = true
|
||||
|
||||
[node name="GalleryMenu" parent="." instance=ExtResource("5_iuu71")]
|
||||
unique_name_in_owner = true
|
||||
visible = false
|
||||
|
||||
Reference in New Issue
Block a user