mirror of
https://github.com/Orama-Interactive/Pixelorama.git
synced 2025-01-19 01:29:49 +00:00
The indicator's size of the shape tools should now change depending on the tool's thickness
This commit is contained in:
parent
2760049cfd
commit
873e2b8e9e
|
@ -12,14 +12,29 @@ var _thickness := 1
|
|||
|
||||
func _init() -> void:
|
||||
_drawer.color_op = Drawer.ColorOp.new()
|
||||
update_indicator()
|
||||
|
||||
|
||||
func update_brush() -> void:
|
||||
pass
|
||||
|
||||
|
||||
func _on_Thickness_value_changed(value: int) -> void:
|
||||
_thickness = value
|
||||
|
||||
update_indicator()
|
||||
update_config()
|
||||
save_config()
|
||||
|
||||
|
||||
func update_indicator() -> void:
|
||||
var bitmap := BitMap.new()
|
||||
bitmap.create(Vector2.ONE * _thickness)
|
||||
bitmap.set_bit_rect(Rect2(Vector2.ZERO, Vector2.ONE * _thickness), true)
|
||||
_indicator = bitmap
|
||||
_polylines = _create_polylines(_indicator)
|
||||
|
||||
|
||||
func get_config() -> Dictionary:
|
||||
var config := .get_config()
|
||||
config["thickness"] = _thickness
|
||||
|
|
|
@ -12,14 +12,29 @@ var _thickness := 1
|
|||
|
||||
func _init() -> void:
|
||||
_drawer.color_op = Drawer.ColorOp.new()
|
||||
update_indicator()
|
||||
|
||||
|
||||
func update_brush() -> void:
|
||||
pass
|
||||
|
||||
|
||||
func _on_Thickness_value_changed(value: int) -> void:
|
||||
_thickness = value
|
||||
|
||||
update_indicator()
|
||||
update_config()
|
||||
save_config()
|
||||
|
||||
|
||||
func update_indicator() -> void:
|
||||
var bitmap := BitMap.new()
|
||||
bitmap.create(Vector2.ONE * _thickness)
|
||||
bitmap.set_bit_rect(Rect2(Vector2.ZERO, Vector2.ONE * _thickness), true)
|
||||
_indicator = bitmap
|
||||
_polylines = _create_polylines(_indicator)
|
||||
|
||||
|
||||
func _on_FillCheckbox_toggled(button_pressed: bool) -> void:
|
||||
_fill = button_pressed
|
||||
update_config()
|
||||
|
|
Loading…
Reference in a new issue