mirror of
https://github.com/Orama-Interactive/Pixelorama.git
synced 2025-02-13 09:13:07 +00:00
* gdformat . * Lint code - Part 1 * Format code - Part 2 * Lint code - Part 2 Trying to fix the max allowed line length errors * Add normal_map_invert_y to the image .import files Because of Godot 3.4 * Do not call private methods outside of the script's scope Lint code - Part 3 * Format code - Part 3 * Fixed more line length exceeded errors - Lint code Part 3 * Export array of licenses - Lint code part 4 * Clean hint_tooltip code from Global Removes a lot of lines of code * Create static-checks.yml * Fix FreeType's license
46 lines
1.1 KiB
GDScript
46 lines
1.1 KiB
GDScript
extends ImageEffect
|
|
|
|
var color := Color.red
|
|
var thickness := 1
|
|
var diagonal := false
|
|
var inside_image := false
|
|
|
|
onready var outline_color = $VBoxContainer/OptionsContainer/OutlineColor
|
|
|
|
|
|
func _ready() -> void:
|
|
outline_color.get_picker().presets_visible = false
|
|
color = outline_color.color
|
|
|
|
|
|
func set_nodes() -> void:
|
|
preview = $VBoxContainer/AspectRatioContainer/Preview
|
|
selection_checkbox = $VBoxContainer/OptionsContainer/SelectionCheckBox
|
|
affect_option_button = $VBoxContainer/OptionsContainer/AffectOptionButton
|
|
|
|
|
|
func commit_action(_cel: Image, _project: Project = Global.current_project) -> void:
|
|
DrawingAlgos.generate_outline(
|
|
_cel, selection_checkbox.pressed, _project, color, thickness, diagonal, inside_image
|
|
)
|
|
|
|
|
|
func _on_ThickValue_value_changed(value: int) -> void:
|
|
thickness = value
|
|
update_preview()
|
|
|
|
|
|
func _on_OutlineColor_color_changed(_color: Color) -> void:
|
|
color = _color
|
|
update_preview()
|
|
|
|
|
|
func _on_DiagonalCheckBox_toggled(button_pressed: bool) -> void:
|
|
diagonal = button_pressed
|
|
update_preview()
|
|
|
|
|
|
func _on_InsideImageCheckBox_toggled(button_pressed: bool) -> void:
|
|
inside_image = button_pressed
|
|
update_preview()
|