lint fixes
Some checks failed
Continuous Integration / Code Formatting (pull_request) Successful in 27s
Continuous Integration / Code Quality Check (pull_request) Successful in 29s
Continuous Integration / Test Execution (pull_request) Failing after 33s
Continuous Integration / CI Summary (pull_request) Failing after 5s
Some checks failed
Continuous Integration / Code Formatting (pull_request) Successful in 27s
Continuous Integration / Code Quality Check (pull_request) Successful in 29s
Continuous Integration / Test Execution (pull_request) Failing after 33s
Continuous Integration / CI Summary (pull_request) Failing after 5s
This commit is contained in:
@@ -1,6 +1,20 @@
|
||||
class_name DebugMenuBase
|
||||
extends Control
|
||||
|
||||
# Safety constants matching match3_gameplay.gd
|
||||
const MAX_GRID_SIZE := 15
|
||||
const MAX_TILE_TYPES := 10
|
||||
const MIN_GRID_SIZE := 3
|
||||
const MIN_TILE_TYPES := 3
|
||||
const SCENE_SEARCH_COOLDOWN := 0.5
|
||||
|
||||
@export var target_script_path: String = "res://scenes/game/gameplays/match3_gameplay.gd"
|
||||
@export var log_category: String = "DebugMenu"
|
||||
|
||||
var match3_scene: Node2D
|
||||
var search_timer: Timer
|
||||
var last_scene_search_time: float = 0.0
|
||||
|
||||
@onready var regenerate_button: Button = $VBoxContainer/RegenerateButton
|
||||
@onready var gem_types_spinbox: SpinBox = $VBoxContainer/GemTypesContainer/GemTypesSpinBox
|
||||
@onready var gem_types_label: Label = $VBoxContainer/GemTypesContainer/GemTypesLabel
|
||||
@@ -13,20 +27,6 @@ var grid_width_label: Label = $VBoxContainer/GridSizeContainer/GridWidthContaine
|
||||
@onready
|
||||
var grid_height_label: Label = $VBoxContainer/GridSizeContainer/GridHeightContainer/GridHeightLabel
|
||||
|
||||
@export var target_script_path: String = "res://scenes/game/gameplays/match3_gameplay.gd"
|
||||
@export var log_category: String = "DebugMenu"
|
||||
|
||||
# Safety constants matching match3_gameplay.gd
|
||||
const MAX_GRID_SIZE := 15
|
||||
const MAX_TILE_TYPES := 10
|
||||
const MIN_GRID_SIZE := 3
|
||||
const MIN_TILE_TYPES := 3
|
||||
|
||||
var match3_scene: Node2D
|
||||
var search_timer: Timer
|
||||
var last_scene_search_time: float = 0.0
|
||||
const SCENE_SEARCH_COOLDOWN := 0.5 # Prevent excessive scene searching
|
||||
|
||||
|
||||
func _exit_tree() -> void:
|
||||
if search_timer:
|
||||
|
||||
@@ -2,10 +2,11 @@ extends Control
|
||||
|
||||
signal open_settings
|
||||
|
||||
@onready var menu_buttons: Array[Button] = []
|
||||
var current_menu_index: int = 0
|
||||
var original_button_scales: Array[Vector2] = []
|
||||
|
||||
@onready var menu_buttons: Array[Button] = []
|
||||
|
||||
|
||||
func _ready() -> void:
|
||||
DebugManager.log_info("MainMenu ready", "MainMenu")
|
||||
|
||||
@@ -2,12 +2,6 @@ extends Control
|
||||
|
||||
signal back_to_main_menu
|
||||
|
||||
@onready var master_slider = $SettingsContainer/MasterVolumeContainer/MasterVolumeSlider
|
||||
@onready var music_slider = $SettingsContainer/MusicVolumeContainer/MusicVolumeSlider
|
||||
@onready var sfx_slider = $SettingsContainer/SFXVolumeContainer/SFXVolumeSlider
|
||||
@onready var language_stepper = $SettingsContainer/LanguageContainer/LanguageStepper
|
||||
@onready var reset_progress_button = $ResetSettingsContainer/ResetProgressButton
|
||||
|
||||
@export var settings_manager: Node = SettingsManager
|
||||
@export var localization_manager: Node = LocalizationManager
|
||||
|
||||
@@ -20,6 +14,12 @@ var current_control_index: int = 0
|
||||
var original_control_scales: Array[Vector2] = []
|
||||
var original_control_modulates: Array[Color] = []
|
||||
|
||||
@onready var master_slider = $SettingsContainer/MasterVolumeContainer/MasterVolumeSlider
|
||||
@onready var music_slider = $SettingsContainer/MusicVolumeContainer/MusicVolumeSlider
|
||||
@onready var sfx_slider = $SettingsContainer/SFXVolumeContainer/SFXVolumeSlider
|
||||
@onready var language_stepper = $SettingsContainer/LanguageContainer/LanguageStepper
|
||||
@onready var reset_progress_button = $ResetSettingsContainer/ResetProgressButton
|
||||
|
||||
|
||||
func _ready() -> void:
|
||||
add_to_group("localizable")
|
||||
@@ -226,14 +226,13 @@ func _update_visual_selection() -> void:
|
||||
func _get_control_name(control: Control) -> String:
|
||||
if control == master_slider:
|
||||
return "master_volume"
|
||||
elif control == music_slider:
|
||||
if control == music_slider:
|
||||
return "music_volume"
|
||||
elif control == sfx_slider:
|
||||
if control == sfx_slider:
|
||||
return "sfx_volume"
|
||||
elif control == language_stepper:
|
||||
if control == language_stepper:
|
||||
return language_stepper.get_control_name()
|
||||
else:
|
||||
return "button"
|
||||
return "button"
|
||||
|
||||
|
||||
func _on_language_stepper_value_changed(new_value: String, new_index: float) -> void:
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
@tool
|
||||
extends Control
|
||||
class_name ValueStepper
|
||||
extends Control
|
||||
|
||||
## A reusable UI control for stepping through discrete values with arrow buttons
|
||||
##
|
||||
@@ -12,10 +11,6 @@ class_name ValueStepper
|
||||
|
||||
signal value_changed(new_value: String, new_index: int)
|
||||
|
||||
@onready var left_button: Button = $LeftButton
|
||||
@onready var right_button: Button = $RightButton
|
||||
@onready var value_display: Label = $ValueDisplay
|
||||
|
||||
## The data source for values.
|
||||
@export var data_source: String = "language"
|
||||
## Custom display format function. Leave empty to use default.
|
||||
@@ -29,6 +24,10 @@ var original_scale: Vector2
|
||||
var original_modulate: Color
|
||||
var is_highlighted: bool = false
|
||||
|
||||
@onready var left_button: Button = $LeftButton
|
||||
@onready var right_button: Button = $RightButton
|
||||
@onready var value_display: Label = $ValueDisplay
|
||||
|
||||
|
||||
func _ready() -> void:
|
||||
DebugManager.log_info("ValueStepper ready for: " + data_source, "ValueStepper")
|
||||
|
||||
Reference in New Issue
Block a user