mirror of
https://github.com/Orama-Interactive/Pixelorama.git
synced 2025-01-18 09:09:47 +00:00
Allow editing of non-pixel cel properties
This commit is contained in:
parent
3113459224
commit
68be6ac106
|
@ -25,7 +25,11 @@ func _ready() -> void:
|
|||
for selected in Global.current_project.selected_cels:
|
||||
if selected[1] == layer and selected[0] == frame:
|
||||
button_pressed = true
|
||||
if cel is GroupCel:
|
||||
if cel is PixelCel:
|
||||
popup_menu.add_item("Delete")
|
||||
popup_menu.add_item("Link Cels to")
|
||||
popup_menu.add_item("Unlink Cels")
|
||||
elif cel is GroupCel:
|
||||
transparent_checker.visible = false
|
||||
|
||||
|
||||
|
@ -110,8 +114,7 @@ func _on_CelButton_pressed() -> void:
|
|||
release_focus()
|
||||
|
||||
elif Input.is_action_just_released("right_mouse"):
|
||||
if cel is PixelCel:
|
||||
popup_menu.popup_on_parent(Rect2(get_global_mouse_position(), Vector2.ONE))
|
||||
popup_menu.popup_on_parent(Rect2(get_global_mouse_position(), Vector2.ONE))
|
||||
button_pressed = !button_pressed
|
||||
elif Input.is_action_just_released("middle_mouse"):
|
||||
button_pressed = !button_pressed
|
||||
|
|
|
@ -72,15 +72,9 @@ grow_horizontal = 2
|
|||
grow_vertical = 2
|
||||
|
||||
[node name="PopupMenu" type="PopupMenu" parent="."]
|
||||
item_count = 4
|
||||
item_count = 1
|
||||
item_0/text = "Properties"
|
||||
item_0/id = 0
|
||||
item_1/text = "Delete"
|
||||
item_1/id = 1
|
||||
item_2/text = "Link Cels to"
|
||||
item_2/id = 2
|
||||
item_3/text = "Unlink Cels"
|
||||
item_3/id = 3
|
||||
|
||||
[connection signal="pressed" from="." to="." method="_on_CelButton_pressed"]
|
||||
[connection signal="id_pressed" from="PopupMenu" to="." method="_on_PopupMenu_id_pressed"]
|
||||
|
|
Loading…
Reference in a new issue