more lint and formatting
Some checks failed
Continuous Integration / Code Formatting (push) Successful in 33s
Continuous Integration / Code Quality Check (push) Successful in 29s
Continuous Integration / Test Execution (push) Failing after 16s
Continuous Integration / CI Summary (push) Failing after 4s

This commit is contained in:
2025-10-01 15:04:40 +04:00
parent 538459f323
commit 3b8da89ad5
31 changed files with 2112 additions and 691 deletions

View File

@@ -11,14 +11,17 @@ var language_stepper: ValueStepper = $VBoxContainer/Examples/LanguageContainer/L
var difficulty_stepper: ValueStepper = $VBoxContainer/Examples/DifficultyContainer/DifficultyStepper
@onready
var resolution_stepper: ValueStepper = $VBoxContainer/Examples/ResolutionContainer/ResolutionStepper
@onready var custom_stepper: ValueStepper = $VBoxContainer/Examples/CustomContainer/CustomStepper
@onready
var custom_stepper: ValueStepper = $VBoxContainer/Examples/CustomContainer/CustomStepper
func _ready():
DebugManager.log_info("ValueStepper example ready", "Example")
# Setup navigation array
navigable_steppers = [language_stepper, difficulty_stepper, resolution_stepper, custom_stepper]
navigable_steppers = [
language_stepper, difficulty_stepper, resolution_stepper, custom_stepper
]
# Connect to value change events
for stepper in navigable_steppers:
@@ -52,15 +55,22 @@ func _input(event: InputEvent):
func _navigate_steppers(direction: int):
current_stepper_index = (current_stepper_index + direction) % navigable_steppers.size()
current_stepper_index = (
(current_stepper_index + direction) % navigable_steppers.size()
)
if current_stepper_index < 0:
current_stepper_index = navigable_steppers.size() - 1
_update_stepper_highlighting()
DebugManager.log_info("Stepper navigation: index " + str(current_stepper_index), "Example")
DebugManager.log_info(
"Stepper navigation: index " + str(current_stepper_index), "Example"
)
func _handle_stepper_input(action: String):
if current_stepper_index >= 0 and current_stepper_index < navigable_steppers.size():
if (
current_stepper_index >= 0
and current_stepper_index < navigable_steppers.size()
):
var stepper = navigable_steppers[current_stepper_index]
if stepper.handle_input_action(action):
AudioManager.play_ui_click()
@@ -73,7 +83,14 @@ func _update_stepper_highlighting():
func _on_stepper_value_changed(new_value: String, new_index: int):
DebugManager.log_info(
"Stepper value changed to: " + new_value + " (index: " + str(new_index) + ")", "Example"
(
"Stepper value changed to: "
+ new_value
+ " (index: "
+ str(new_index)
+ ")"
),
"Example"
)
# Handle value change in your scene
# For example: apply settings, save preferences, update UI, etc.