Minor fixes
This commit is contained in:
+4
-1
@@ -7,13 +7,16 @@ signal quit_game
|
||||
signal show_options
|
||||
|
||||
|
||||
@onready var continue_button := $%ContinueButton
|
||||
|
||||
|
||||
func _ready() -> void:
|
||||
_init_focus()
|
||||
_setup_neighbors()
|
||||
|
||||
|
||||
func _init_focus() -> void:
|
||||
if $%ContinueButton.disabled:
|
||||
if continue_button.disabled:
|
||||
$%StartButton.grab_focus()
|
||||
else:
|
||||
$%ContinueButton.grab_focus()
|
||||
|
||||
+14
-8
@@ -5,6 +5,12 @@ signal show_credits
|
||||
signal show_main_menu
|
||||
|
||||
|
||||
@onready var fullscreen_button := $%FullscreenCheckButton
|
||||
@onready var window_factor_button := $%WindowFactorOptionButton
|
||||
@onready var credits_button := $%CreditsButton
|
||||
@onready var back_button := $%BackButton
|
||||
|
||||
|
||||
func _ready() -> void:
|
||||
_load_current_settings()
|
||||
_init_focus()
|
||||
@@ -12,30 +18,30 @@ func _ready() -> void:
|
||||
|
||||
|
||||
func _init_focus() -> void:
|
||||
$%FullscreenCheckButton.grab_focus()
|
||||
fullscreen_button.grab_focus()
|
||||
|
||||
|
||||
func _setup_neighbors() -> void:
|
||||
$%CreditsButton.focus_neighbor_left = $%BackButton.get_path()
|
||||
$%BackButton.focus_neighbor_right = $%CreditsButton.get_path()
|
||||
credits_button.focus_neighbor_left = back_button.get_path()
|
||||
back_button.focus_neighbor_right = credits_button.get_path()
|
||||
|
||||
|
||||
func _load_current_settings() -> void:
|
||||
$%FullscreenCheckButton.button_pressed = SettingsManager.fullscreen
|
||||
$%WindowFactorOptionButton.selected = SettingsManager.window_factor
|
||||
fullscreen_button.button_pressed = SettingsManager.fullscreen
|
||||
window_factor_button.selected = SettingsManager.window_factor
|
||||
_update_window_factor_disabled()
|
||||
|
||||
|
||||
func _update_window_factor_disabled() -> void:
|
||||
$%WindowFactorOptionButton.disabled = SettingsManager.fullscreen
|
||||
window_factor_button.disabled = SettingsManager.fullscreen
|
||||
|
||||
|
||||
func _on_fullscreen_check_button_toggled(toggled: bool) -> void:
|
||||
func _on_fullscreen_button_toggled(toggled: bool) -> void:
|
||||
SettingsManager.fullscreen = toggled
|
||||
_update_window_factor_disabled()
|
||||
|
||||
|
||||
func _on_window_factor_option_button_item_selected(index: int) -> void:
|
||||
func _on_window_factor_button_item_selected(index: int) -> void:
|
||||
if not SettingsManager.fullscreen:
|
||||
SettingsManager.window_factor = index
|
||||
|
||||
|
||||
+7
-3
@@ -1,6 +1,10 @@
|
||||
extends Node
|
||||
|
||||
|
||||
@onready var continue_button := $%ContinueButton
|
||||
@onready var main_menu_button := $%MainMenuButton
|
||||
|
||||
|
||||
signal continue_game
|
||||
signal show_main_menu
|
||||
|
||||
@@ -11,12 +15,12 @@ func _ready() -> void:
|
||||
|
||||
|
||||
func _init_focus() -> void:
|
||||
$%ContinueButton.grab_focus()
|
||||
continue_button.grab_focus()
|
||||
|
||||
|
||||
func _setup_neighbors() -> void:
|
||||
$%ContinueButton.focus_neighbor_top = $%MainMenuButton.get_path()
|
||||
$%MainMenuButton.focus_neighbor_bottom = $%ContinueButton.get_path()
|
||||
continue_button.focus_neighbor_top = main_menu_button.get_path()
|
||||
main_menu_button.focus_neighbor_bottom = continue_button.get_path()
|
||||
|
||||
|
||||
func _on_continue_button_pressed() -> void:
|
||||
|
||||
Reference in New Issue
Block a user