From b146c88a5ed24c5a722e3ae9390ae627919056ec Mon Sep 17 00:00:00 2001 From: Emmanouil Papadeas <35376950+OverloadedOrama@users.noreply.github.com> Date: Thu, 27 Jun 2024 01:25:17 +0300 Subject: [PATCH] Fix shape tools indicator being reset after drawing --- src/Tools/BaseShapeDrawer.gd | 5 +++++ src/Tools/DesignTools/CurveTool.gd | 5 +++++ src/Tools/DesignTools/LineTool.gd | 5 +++++ 3 files changed, 15 insertions(+) diff --git a/src/Tools/BaseShapeDrawer.gd b/src/Tools/BaseShapeDrawer.gd index 72503f365..ad36b6ff0 100644 --- a/src/Tools/BaseShapeDrawer.gd +++ b/src/Tools/BaseShapeDrawer.gd @@ -65,6 +65,11 @@ func update_config() -> void: $ThicknessSlider.value = _thickness +## This tool has no brush, so just return the indicator as it is. +func _create_brush_indicator() -> BitMap: + return _indicator + + func _get_shape_points(_size: Vector2i) -> Array[Vector2i]: return [] diff --git a/src/Tools/DesignTools/CurveTool.gd b/src/Tools/DesignTools/CurveTool.gd index 999c2b16e..dbdd8aa56 100644 --- a/src/Tools/DesignTools/CurveTool.gd +++ b/src/Tools/DesignTools/CurveTool.gd @@ -57,6 +57,11 @@ func update_config() -> void: $ThicknessSlider.value = _thickness +## This tool has no brush, so just return the indicator as it is. +func _create_brush_indicator() -> BitMap: + return _indicator + + func _input(event: InputEvent) -> void: if _drawing: if event is InputEventMouseMotion: diff --git a/src/Tools/DesignTools/LineTool.gd b/src/Tools/DesignTools/LineTool.gd index aee81550e..043a45dbf 100644 --- a/src/Tools/DesignTools/LineTool.gd +++ b/src/Tools/DesignTools/LineTool.gd @@ -50,6 +50,11 @@ func update_config() -> void: $ThicknessSlider.value = _thickness +## This tool has no brush, so just return the indicator as it is. +func _create_brush_indicator() -> BitMap: + return _indicator + + func _get_shape_points(_size: Vector2i) -> Array[Vector2i]: return []