Brush Selection Fix

This commit is contained in:
luiq54 2020-04-17 22:33:52 +05:30
parent a552cbe8ee
commit 73891af597
4 changed files with 9 additions and 0 deletions

View file

@ -4,6 +4,7 @@ export var brush_type = 0 # Global.Brush_Types.PIXEL
export var custom_brush_index := -3
# warning-ignore:unused_class_variable
var random_brushes := []
signal brush_selected
func _on_BrushButton_pressed() -> void:
# Delete the brush on middle mouse press
@ -33,6 +34,7 @@ func _on_BrushButton_pressed() -> void:
# Global.left_brush_type_label.text = tr("Brush: Filled Circle")
Global.update_left_custom_brush()
emit_signal("brush_selected")
else: # Change right brush
Global.current_right_brush_type = brush_type
@ -55,6 +57,7 @@ func _on_BrushButton_pressed() -> void:
# Global.right_brush_type_label.text = tr("Brush: Filled Circle")
Global.update_right_custom_brush()
emit_signal("brush_selected")
func _on_DeleteButton_pressed() -> void:
if brush_type == Global.Brush_Types.CUSTOM: