diff --git a/Scripts/BrushButton.gd b/Scripts/BrushButton.gd index c27b6cd..cae6b83 100644 --- a/Scripts/BrushButton.gd +++ b/Scripts/BrushButton.gd @@ -5,7 +5,7 @@ var custom_brush_index := -1 func _on_BrushButton_pressed() -> void: #Change left brush - if Global.brushes_popup.rect_global_position == Global.left_brush_type_button.rect_global_position: + if Global.brush_type_window_position == "left": Global.current_left_brush_type = brush_type Global.custom_left_brush_index = custom_brush_index if custom_brush_index > -1: #Custom brush diff --git a/Scripts/Global.gd b/Scripts/Global.gd index 8b442d7..6d2fa37 100644 --- a/Scripts/Global.gd +++ b/Scripts/Global.gd @@ -86,6 +86,8 @@ var right_brush_size := 1 var current_left_brush_type = BRUSH_TYPES.PIXEL # warning-ignore:unused_class_variable var current_right_brush_type = BRUSH_TYPES.PIXEL +# warning-ignore:unused_class_variable +var brush_type_window_position := "left" var brushes_from_files := 0 # warning-ignore:unused_class_variable diff --git a/Scripts/Main.gd b/Scripts/Main.gd index 04bed80..e5f26ef 100644 --- a/Scripts/Main.gd +++ b/Scripts/Main.gd @@ -734,9 +734,11 @@ func _on_RightIndicatorCheckbox_toggled(button_pressed) -> void: func _on_LeftBrushTypeButton_pressed() -> void: Global.brushes_popup.popup(Rect2(Global.left_brush_type_button.rect_global_position, Vector2(226, 72))) + Global.brush_type_window_position = "left" func _on_RightBrushTypeButton_pressed() -> void: Global.brushes_popup.popup(Rect2(Global.right_brush_type_button.rect_global_position, Vector2(226, 72))) + Global.brush_type_window_position = "right" func _on_LeftBrushSizeEdit_value_changed(value) -> void: var new_size = int(value)