2024-12-21 17:07:18 +01:00
|
|
|
extends Node
|
2024-12-19 18:52:47 +01:00
|
|
|
|
2024-12-21 17:07:18 +01:00
|
|
|
@onready var editor_window = %EditorWindow
|
2024-12-28 00:12:40 +01:00
|
|
|
@onready var app_name = ProjectSettings.get_setting("application/config/name")
|
2024-06-04 18:31:04 +02:00
|
|
|
|
|
|
|
func _ready():
|
2024-12-28 00:12:40 +01:00
|
|
|
update_title()
|
2024-12-21 17:07:18 +01:00
|
|
|
# position windows
|
|
|
|
get_window().position = Vector2i(
|
|
|
|
editor_window.position.x + editor_window.size.x + 50,
|
|
|
|
editor_window.position.y)
|
2024-12-25 00:07:51 +01:00
|
|
|
get_window().min_size = Vector2i(400, 400)
|
|
|
|
editor_window.min_size = Vector2i(560, 400)
|
2024-12-28 00:12:40 +01:00
|
|
|
|
|
|
|
func update_title(current_file: String = ""):
|
|
|
|
if current_file == "":
|
|
|
|
get_window().title = app_name + " - Viewer"
|
|
|
|
editor_window.title = app_name + " - Editor"
|
|
|
|
else:
|
|
|
|
get_window().title = current_file + " - " + app_name + " - Viewer"
|
|
|
|
editor_window.title = current_file + " - " + app_name + " - Editor"
|