01ea3af253
Apply Godot 4.6 automated conversion: renames Spatial.translate->position, margin_*->offset_*, tool->@tool, .empty()->.is_empty(), DynamicFont->FontFile, onready->@onready, export()->@export, and many more. 127 files changed by the tool. Manual fixes still required for: - godot_db_manager plugin (incompatible APIs: WindowDialog, Tabs, etc.) - lod plugin (Spatial -> Node3D renames) - ResourceLoader.load_interactive removed -> load_threaded_request - OS.set_window_fullscreen removed -> DisplayServer - Viewport.set_size_override removed Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
42 lines
958 B
GDScript
42 lines
958 B
GDScript
@tool
|
|
"""
|
|
class GDDBDeletePropDlg
|
|
"""
|
|
|
|
class_name GDDBDeletePropDlg
|
|
|
|
extends Window
|
|
|
|
signal delete_prop
|
|
|
|
var m_prop_id = gddb_constants.c_invalid_id
|
|
|
|
# Called when the node enters the scene tree for the first time.
|
|
func _ready() -> void :
|
|
$v_layout/buttons/ok_btn.connect("pressed", Callable(self, "on_ok_btn_pressed"))
|
|
$v_layout/buttons/cancel_btn.connect("pressed", Callable(self, "on_cancel_btn_pressed"))
|
|
|
|
# sets the property id
|
|
func set_prop_id(prop_id : int) -> void :
|
|
m_prop_id = prop_id
|
|
|
|
# returns the property id
|
|
func get_prop_id() -> int :
|
|
return m_prop_id
|
|
|
|
func set_prop_name(prop_name : String) -> void:
|
|
var text = "Delete property with name \"" + prop_name + "\" ?"
|
|
$v_layout/prop_info/prop_lbl.set_text(text)
|
|
|
|
# returns the table id
|
|
func get_table_id() -> int :
|
|
return m_prop_id
|
|
|
|
# called when the OK button is pressed
|
|
func on_ok_btn_pressed() -> void :
|
|
emit_signal("delete_prop")
|
|
hide()
|
|
|
|
func on_cancel_btn_pressed() -> void:
|
|
hide()
|