fix: resolve runtime errors and shadowed variable warnings
- use custom_minimum_size instead of minimum_size on Button (Godot 4.6 API) - reduce module_resized signal to 3 args to match _save_layout signature - rename testing_tile refresh param data -> _data (unused) - rename name -> layout_name in save_layout/switch_layout (shadows Node.name)
This commit is contained in:
parent
40ba0f3ee1
commit
12b45b2685
3 changed files with 15 additions and 15 deletions
|
|
@ -5,7 +5,7 @@ class_name DashboardGrid
|
|||
|
||||
signal module_placed(module: Control, col: int, row: int)
|
||||
signal module_removed(module: Control)
|
||||
signal module_resized(module: Control, col: int, row: int, w: int, h: int)
|
||||
signal module_resized(module: Control, col: int, row: int)
|
||||
|
||||
@export var cell_min_size: Vector2 = Vector2(300, 240)
|
||||
@export var cell_spacing: float = 8.0
|
||||
|
|
@ -196,7 +196,7 @@ func _make_menu_button(text: String, tooltip: String) -> Button:
|
|||
btn.text = text
|
||||
btn.tooltip_text = tooltip
|
||||
btn.flat = true
|
||||
btn.minimum_size = MENU_BUTTON_MIN_SIZE
|
||||
btn.custom_minimum_size = MENU_BUTTON_MIN_SIZE
|
||||
btn.add_theme_font_size_override("font_size", MENU_BUTTON_FONT_SIZE)
|
||||
return btn
|
||||
|
||||
|
|
@ -614,7 +614,7 @@ func _end_resize(_mouse_pos: Vector2) -> void:
|
|||
_set_module_grid_data(_resize_module, _resize_origin_col, _resize_origin_row, _resize_origin_w, _resize_origin_h)
|
||||
_occupy_cells(_resize_module, _resize_origin_col, _resize_origin_row, _resize_origin_w, _resize_origin_h)
|
||||
_layout_cells()
|
||||
module_resized.emit(_resize_module, _resize_origin_col, _resize_origin_row, _resize_origin_w, _resize_origin_h)
|
||||
module_resized.emit(_resize_module, _resize_origin_col, _resize_origin_row)
|
||||
|
||||
_is_resizing = false
|
||||
_resize_module = null
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue