diff --git a/Main.tscn b/Main.tscn index b0e0dc8bd..6357e2735 100644 --- a/Main.tscn +++ b/Main.tscn @@ -887,8 +887,8 @@ resizable = true mode = 1 access = 2 filters = PoolStringArray( "*.bmp ; BMP Image", "*.hdr ; Radiance HDR Image", "*.jpg,*.jpeg ; JPEG Image", "*.png ; PNG Image", "*.svg ; SVG Image", "*.tga ; TGA Image", "*.webp ; WebP Image" ) -current_dir = "/home/danielnaoexiste/Documents/Prog/Pixelorama" -current_path = "/home/danielnaoexiste/Documents/Prog/Pixelorama/" +current_dir = "C:/Users/Overloaded/Dropbox/Orama Founding Members/εταιρικα αρχεια/Godot Projects/Pixelorama" +current_path = "C:/Users/Overloaded/Dropbox/Orama Founding Members/εταιρικα αρχεια/Godot Projects/Pixelorama/" [node name="ExportSprites" type="FileDialog" parent="."] anchor_left = 0.5 diff --git a/Scripts/Canvas.gd b/Scripts/Canvas.gd index 11b544452..7e1583935 100644 --- a/Scripts/Canvas.gd +++ b/Scripts/Canvas.gd @@ -95,15 +95,15 @@ func _process(delta) -> void: #Handle Undo/Redo - if point_in_rectangle(mouse_pos, location, location + size) && Global.can_draw && Global.has_focus: - if Input.is_action_just_pressed("left_mouse") || Input.is_action_just_pressed("right_mouse"): + if point_in_rectangle(mouse_pos, location, location + size) && Global.can_draw && Global.has_focus && Global.current_frame == frame: + if Input.is_action_just_pressed("left_mouse") || (Input.is_action_just_pressed("right_mouse") && !Input.is_action_pressed("left_mouse")): if current_action != "None": if current_action == "RectSelect": handle_undo("Rectangle Select") else: handle_undo("Draw") - elif Input.is_action_just_released("left_mouse") || Input.is_action_just_released("right_mouse"): + elif Input.is_action_just_released("left_mouse") || (Input.is_action_just_released("right_mouse") && !Input.is_action_pressed("left_mouse")): if previous_action != "None" && previous_action != "RectSelect": handle_redo("Draw") @@ -254,7 +254,9 @@ func handle_redo(action : String) -> void: func update_texture(layer_index : int) -> void: layers[layer_index][1].create_from_image(layers[layer_index][0], 0) - get_layer_container(layer_index).get_child(0).get_child(1).texture = layers[layer_index][1] + var layer_container := get_layer_container(layer_index) + if layer_container: + layer_container.get_child(0).get_child(1).texture = layers[layer_index][1] #This code is used to update the texture in the animation timeline frame button #but blend_rect causes major performance issues on large images