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>
38 lines
882 B
GDScript
38 lines
882 B
GDScript
@tool
|
|
"""
|
|
class GDDBDeleteTableDlg
|
|
"""
|
|
|
|
class_name GDDBDeleteTableDlg
|
|
|
|
extends Window
|
|
|
|
signal delete_table
|
|
|
|
var m_table_id = gddb_constants.c_invalid_id
|
|
|
|
# Called when the node enters the scene tree for the first time.
|
|
func _ready():
|
|
$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 table id
|
|
func set_table_id(table_id : int) -> void:
|
|
m_table_id = table_id
|
|
|
|
func set_table_name(table_name : String) -> void:
|
|
var text = "Delete table with name \"" + table_name + "\" ?"
|
|
$v_layout/table_info/table_lbl.set_text(text)
|
|
|
|
# returns the table id
|
|
func get_table_id() -> int:
|
|
return m_table_id
|
|
|
|
# called when the OK button is pressed
|
|
func on_ok_btn_pressed() -> void:
|
|
emit_signal("delete_table")
|
|
hide()
|
|
|
|
func on_cancel_btn_pressed() -> void:
|
|
hide()
|