1
0
Fork 0
mirror of https://github.com/Orama-Interactive/Pixelorama.git synced 2025-02-08 19:39:50 +00:00
Pixelorama/src/UI/Dialogs/ImageEffects/OutlineDialog.gd

45 lines
1.1 KiB
GDScript3
Raw Normal View History

extends ImageEffect
2020-07-27 01:36:00 +00:00
var color := Color.red
var thickness := 1
var diagonal := false
var inside_image := false
onready var outline_color = $VBoxContainer/OptionsContainer/OutlineColor
2020-02-15 05:34:42 +00:00
func _ready() -> void:
outline_color.get_picker().presets_visible = false
2020-07-27 01:36:00 +00:00
color = outline_color.color
func set_nodes() -> void:
preview = $VBoxContainer/Preview
selection_checkbox = $VBoxContainer/OptionsContainer/SelectionCheckBox
affect_option_button = $VBoxContainer/OptionsContainer/AffectOptionButton
2020-02-15 05:34:42 +00:00
func commit_action(_cel : Image, _pixels : Array, _project : Project = Global.current_project) -> void:
DrawingAlgos.generate_outline(_cel, _pixels, color, thickness, diagonal, inside_image)
func _on_ThickValue_value_changed(value : int) -> void:
2020-07-27 01:36:00 +00:00
thickness = value
update_preview()
func _on_OutlineColor_color_changed(_color : Color) -> void:
2020-07-27 01:36:00 +00:00
color = _color
update_preview()
func _on_DiagonalCheckBox_toggled(button_pressed : bool) -> void:
2020-07-27 01:36:00 +00:00
diagonal = button_pressed
update_preview()
func _on_InsideImageCheckBox_toggled(button_pressed : bool) -> void:
2020-07-27 01:36:00 +00:00
inside_image = button_pressed
update_preview()