mirror of
https://github.com/Orama-Interactive/Pixelorama.git
synced 2025-01-31 15:39:49 +00:00
commit
9468dd5731
|
@ -1420,6 +1420,9 @@ visible = false
|
||||||
[connection signal="pressed" from="MenuAndUI/UI/RightPanel/PreviewAndPalettes/ToolAndPaletteVSplit/PaletteVBoxContainer/CenterContainer/PaletteButtons/AddPalette" to="MenuAndUI/UI/RightPanel/PreviewAndPalettes/ToolAndPaletteVSplit/PaletteVBoxContainer/ScrollPalette/CenterPalette/PaletteContainer" method="_on_AddPalette_pressed"]
|
[connection signal="pressed" from="MenuAndUI/UI/RightPanel/PreviewAndPalettes/ToolAndPaletteVSplit/PaletteVBoxContainer/CenterContainer/PaletteButtons/AddPalette" to="MenuAndUI/UI/RightPanel/PreviewAndPalettes/ToolAndPaletteVSplit/PaletteVBoxContainer/ScrollPalette/CenterPalette/PaletteContainer" method="_on_AddPalette_pressed"]
|
||||||
[connection signal="pressed" from="MenuAndUI/UI/RightPanel/PreviewAndPalettes/ToolAndPaletteVSplit/PaletteVBoxContainer/CenterContainer/PaletteButtons/EditPalette" to="MenuAndUI/UI/RightPanel/PreviewAndPalettes/ToolAndPaletteVSplit/PaletteVBoxContainer/ScrollPalette/CenterPalette/PaletteContainer" method="on_edit_palette"]
|
[connection signal="pressed" from="MenuAndUI/UI/RightPanel/PreviewAndPalettes/ToolAndPaletteVSplit/PaletteVBoxContainer/CenterContainer/PaletteButtons/EditPalette" to="MenuAndUI/UI/RightPanel/PreviewAndPalettes/ToolAndPaletteVSplit/PaletteVBoxContainer/ScrollPalette/CenterPalette/PaletteContainer" method="on_edit_palette"]
|
||||||
[connection signal="item_selected" from="MenuAndUI/UI/RightPanel/PreviewAndPalettes/ToolAndPaletteVSplit/PaletteVBoxContainer/CenterContainer/PaletteButtons/PaletteOptionButton" to="MenuAndUI/UI/RightPanel/PreviewAndPalettes/ToolAndPaletteVSplit/PaletteVBoxContainer/ScrollPalette/CenterPalette/PaletteContainer" method="_on_PaletteOptionButton_item_selected"]
|
[connection signal="item_selected" from="MenuAndUI/UI/RightPanel/PreviewAndPalettes/ToolAndPaletteVSplit/PaletteVBoxContainer/CenterContainer/PaletteButtons/PaletteOptionButton" to="MenuAndUI/UI/RightPanel/PreviewAndPalettes/ToolAndPaletteVSplit/PaletteVBoxContainer/ScrollPalette/CenterPalette/PaletteContainer" method="_on_PaletteOptionButton_item_selected"]
|
||||||
|
[connection signal="brush_selected" from="BrushesPopup/TabContainer/File/FileBrushContainer/PixelBrushButton" to="." method="_on_Brush_Selected"]
|
||||||
|
[connection signal="brush_selected" from="BrushesPopup/TabContainer/File/FileBrushContainer/CircleBrushButton" to="." method="_on_Brush_Selected"]
|
||||||
|
[connection signal="brush_selected" from="BrushesPopup/TabContainer/File/FileBrushContainer/FilledCircleBrushButton" to="." method="_on_Brush_Selected"]
|
||||||
[connection signal="popup_hide" from="SplashDialog" to="." method="_can_draw_true"]
|
[connection signal="popup_hide" from="SplashDialog" to="." method="_can_draw_true"]
|
||||||
[connection signal="popup_hide" from="CreateNewImage" to="." method="_can_draw_true"]
|
[connection signal="popup_hide" from="CreateNewImage" to="." method="_can_draw_true"]
|
||||||
[connection signal="file_selected" from="OpenSprite" to="." method="_on_OpenSprite_file_selected"]
|
[connection signal="file_selected" from="OpenSprite" to="." method="_on_OpenSprite_file_selected"]
|
||||||
|
|
|
@ -4,6 +4,7 @@ export var brush_type = 0 # Global.Brush_Types.PIXEL
|
||||||
export var custom_brush_index := -3
|
export var custom_brush_index := -3
|
||||||
# warning-ignore:unused_class_variable
|
# warning-ignore:unused_class_variable
|
||||||
var random_brushes := []
|
var random_brushes := []
|
||||||
|
signal brush_selected
|
||||||
|
|
||||||
func _on_BrushButton_pressed() -> void:
|
func _on_BrushButton_pressed() -> void:
|
||||||
# Delete the brush on middle mouse press
|
# 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.left_brush_type_label.text = tr("Brush: Filled Circle")
|
||||||
|
|
||||||
Global.update_left_custom_brush()
|
Global.update_left_custom_brush()
|
||||||
|
emit_signal("brush_selected")
|
||||||
|
|
||||||
else: # Change right brush
|
else: # Change right brush
|
||||||
Global.current_right_brush_type = brush_type
|
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.right_brush_type_label.text = tr("Brush: Filled Circle")
|
||||||
|
|
||||||
Global.update_right_custom_brush()
|
Global.update_right_custom_brush()
|
||||||
|
emit_signal("brush_selected")
|
||||||
|
|
||||||
func _on_DeleteButton_pressed() -> void:
|
func _on_DeleteButton_pressed() -> void:
|
||||||
if brush_type == Global.Brush_Types.CUSTOM:
|
if brush_type == Global.Brush_Types.CUSTOM:
|
||||||
|
|
|
@ -785,6 +785,7 @@ func create_brush_button(brush_img : Image, brush_type := Brush_Types.CUSTOM, hi
|
||||||
brush_tex.create_from_image(brush_img, 0)
|
brush_tex.create_from_image(brush_img, 0)
|
||||||
brush_button.get_child(0).texture = brush_tex
|
brush_button.get_child(0).texture = brush_tex
|
||||||
brush_button.hint_tooltip = hint_tooltip
|
brush_button.hint_tooltip = hint_tooltip
|
||||||
|
brush_button.connect("brush_selected",control,"_on_Brush_Selected")
|
||||||
if brush_type == Brush_Types.RANDOM_FILE:
|
if brush_type == Brush_Types.RANDOM_FILE:
|
||||||
brush_button.random_brushes.append(brush_img)
|
brush_button.random_brushes.append(brush_img)
|
||||||
brush_container.add_child(brush_button)
|
brush_container.add_child(brush_button)
|
||||||
|
|
|
@ -560,6 +560,8 @@ func _on_RightBrushSizeEdit_value_changed(value) -> void:
|
||||||
Global.right_brush_size = new_size
|
Global.right_brush_size = new_size
|
||||||
update_right_custom_brush()
|
update_right_custom_brush()
|
||||||
|
|
||||||
|
func _on_Brush_Selected() -> void:
|
||||||
|
$BrushesPopup.hide()
|
||||||
|
|
||||||
func _on_ColorSwitch_pressed() -> void:
|
func _on_ColorSwitch_pressed() -> void:
|
||||||
var temp: Color = Global.left_color_picker.color
|
var temp: Color = Global.left_color_picker.color
|
||||||
|
|
Loading…
Reference in a new issue