mirror of
https://github.com/Relintai/draw_gd.git
synced 2025-03-10 00:33:25 +01:00
Fixed a a few more errors.
This commit is contained in:
parent
efb6641ddc
commit
37631fb8d7
@ -200,7 +200,7 @@ func _enter_tree() -> void:
|
|||||||
func refresh_nodes():
|
func refresh_nodes():
|
||||||
#var root = get_tree().get_root()
|
#var root = get_tree().get_root()
|
||||||
# control = find_node_by_name(root, "DrawGDControl")
|
# control = find_node_by_name(root, "DrawGDControl")
|
||||||
control = get_parent()
|
control = get_node("DrawGDControl")
|
||||||
top_menu_container = find_node_by_name(control, "TopMenuContainer")
|
top_menu_container = find_node_by_name(control, "TopMenuContainer")
|
||||||
left_cursor = find_node_by_name(control, "LeftCursor")
|
left_cursor = find_node_by_name(control, "LeftCursor")
|
||||||
right_cursor = find_node_by_name(control, "RightCursor")
|
right_cursor = find_node_by_name(control, "RightCursor")
|
||||||
|
@ -106,7 +106,7 @@ func handle_backup() -> void:
|
|||||||
backup_paths.append(DrawGD.config_cache.get_value("backups", p_path))
|
backup_paths.append(DrawGD.config_cache.get_value("backups", p_path))
|
||||||
# Temporatily stop autosave until user confirms backup
|
# Temporatily stop autosave until user confirms backup
|
||||||
DrawGD.opensave.autosave_timer.stop()
|
DrawGD.opensave.autosave_timer.stop()
|
||||||
backup_confirmation.dialog_text = tr(backup_confirmation.dialog_text) % project_paths
|
backup_confirmation.dialog_text = tr("Autosaved backup for %s was found. Do you want to reload it?") % project_paths
|
||||||
backup_confirmation.connect("confirmed", self, "_on_BackupConfirmation_confirmed", [project_paths, backup_paths])
|
backup_confirmation.connect("confirmed", self, "_on_BackupConfirmation_confirmed", [project_paths, backup_paths])
|
||||||
backup_confirmation.get_cancel().connect("pressed", self, "_on_BackupConfirmation_delete", [project_paths, backup_paths])
|
backup_confirmation.get_cancel().connect("pressed", self, "_on_BackupConfirmation_delete", [project_paths, backup_paths])
|
||||||
backup_confirmation.popup_centered()
|
backup_confirmation.popup_centered()
|
||||||
|
@ -134,10 +134,13 @@ __meta__ = {
|
|||||||
}
|
}
|
||||||
|
|
||||||
[node name="ErrorDialog" type="AcceptDialog" parent="DrawGDControl/Dialogs"]
|
[node name="ErrorDialog" type="AcceptDialog" parent="DrawGDControl/Dialogs"]
|
||||||
margin_right = 151.0
|
margin_left = 8.0
|
||||||
margin_bottom = 60.0
|
margin_top = 24.0
|
||||||
|
margin_right = 172.0
|
||||||
|
margin_bottom = 99.0
|
||||||
window_title = "Error"
|
window_title = "Error"
|
||||||
dialog_text = "This is an error message!"
|
dialog_text = "Can't load file '--editor'.
|
||||||
|
Error code: 7"
|
||||||
|
|
||||||
[node name="BackupConfirmation" type="ConfirmationDialog" parent="DrawGDControl/Dialogs"]
|
[node name="BackupConfirmation" type="ConfirmationDialog" parent="DrawGDControl/Dialogs"]
|
||||||
margin_left = 429.0
|
margin_left = 429.0
|
||||||
|
@ -4,10 +4,20 @@ extends Button
|
|||||||
var frame := 0
|
var frame := 0
|
||||||
var layer := 0
|
var layer := 0
|
||||||
|
|
||||||
onready var popup_menu : PopupMenu = $PopupMenu
|
var DrawGD : Node = null
|
||||||
|
|
||||||
|
var popup_menu : PopupMenu = null
|
||||||
|
|
||||||
|
func _enter_tree() -> void:
|
||||||
|
var n : Node = get_parent()
|
||||||
|
while n:
|
||||||
|
if n.name == "DrawGDSingleton":
|
||||||
|
DrawGD = n
|
||||||
|
break
|
||||||
|
n = n.get_parent()
|
||||||
|
|
||||||
|
popup_menu = get_node("PopupMenu")
|
||||||
|
|
||||||
func _ready() -> void:
|
|
||||||
hint_tooltip = tr("Frame: %s, Layer: %s") % [frame + 1, layer]
|
hint_tooltip = tr("Frame: %s, Layer: %s") % [frame + 1, layer]
|
||||||
if DrawGD.current_project.frames[frame] in DrawGD.current_project.layers[layer].linked_cels:
|
if DrawGD.current_project.frames[frame] in DrawGD.current_project.layers[layer].linked_cels:
|
||||||
get_node("LinkedIndicator").visible = true
|
get_node("LinkedIndicator").visible = true
|
||||||
|
@ -91,4 +91,4 @@ func _on_LinkButton_pressed() -> void:
|
|||||||
if DrawGD.current_project.layers[i].new_cels_linked && !DrawGD.current_project.layers[i].linked_cels:
|
if DrawGD.current_project.layers[i].new_cels_linked && !DrawGD.current_project.layers[i].linked_cels:
|
||||||
# If button is pressed and there are no linked cels in the layer
|
# If button is pressed and there are no linked cels in the layer
|
||||||
DrawGD.current_project.layers[i].linked_cels.append(DrawGD.current_project.frames[DrawGD.current_project.current_frame])
|
DrawGD.current_project.layers[i].linked_cels.append(DrawGD.current_project.frames[DrawGD.current_project.current_frame])
|
||||||
DrawGD.current_project.layers[i].frame_container.get_child(DrawGD.current_project.current_frame)._ready()
|
#DrawGD.current_project.layers[i].frame_container.get_child(DrawGD.current_project.current_frame)._ready()
|
||||||
|
Loading…
Reference in New Issue
Block a user