mirror of
https://github.com/Orama-Interactive/Pixelorama.git
synced 2025-03-15 15:55:18 +00:00
Compare commits
2 commits
64b2b7b9af
...
92e8666da2
Author | SHA1 | Date | |
---|---|---|---|
|
92e8666da2 | ||
|
4e8a02c1a4 |
5 changed files with 79 additions and 57 deletions
|
@ -853,6 +853,16 @@ pixelize={
|
|||
"deadzone": 0.5,
|
||||
"events": []
|
||||
}
|
||||
go_to_previous_layer={
|
||||
"deadzone": 0.5,
|
||||
"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"command_or_control_autoremap":true,"alt_pressed":false,"shift_pressed":false,"pressed":false,"keycode":0,"physical_keycode":4194322,"key_label":0,"unicode":0,"echo":false,"script":null)
|
||||
]
|
||||
}
|
||||
go_to_next_layer={
|
||||
"deadzone": 0.5,
|
||||
"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"command_or_control_autoremap":true,"alt_pressed":false,"shift_pressed":false,"pressed":false,"keycode":0,"physical_keycode":4194320,"key_label":0,"unicode":0,"echo":false,"script":null)
|
||||
]
|
||||
}
|
||||
|
||||
[input_devices]
|
||||
|
||||
|
|
|
@ -796,6 +796,8 @@ func _initialize_keychain() -> void:
|
|||
"go_to_last_frame": Keychain.InputAction.new("", "Buttons"),
|
||||
"go_to_previous_frame": Keychain.InputAction.new("", "Buttons"),
|
||||
"go_to_next_frame": Keychain.InputAction.new("", "Buttons"),
|
||||
"go_to_previous_layer": Keychain.InputAction.new("", "Buttons"),
|
||||
"go_to_next_layer": Keychain.InputAction.new("", "Buttons"),
|
||||
"play_backwards": Keychain.InputAction.new("", "Buttons"),
|
||||
"play_forward": Keychain.InputAction.new("", "Buttons"),
|
||||
"onion_skinning_toggle": Keychain.InputAction.new("", "Buttons"),
|
||||
|
|
|
@ -136,6 +136,20 @@ func _notification(what: int) -> void:
|
|||
|
||||
|
||||
func _input(event: InputEvent) -> void:
|
||||
var project := Global.current_project
|
||||
if event.is_action_pressed("go_to_previous_layer"):
|
||||
project.selected_cels.clear()
|
||||
if project.current_layer > 0:
|
||||
project.change_cel(-1, project.current_layer - 1)
|
||||
else:
|
||||
project.change_cel(-1, project.layers.size() - 1)
|
||||
elif event.is_action_pressed("go_to_next_layer"):
|
||||
project.selected_cels.clear()
|
||||
if project.current_layer < project.layers.size() - 1:
|
||||
project.change_cel(-1, project.current_layer + 1)
|
||||
else:
|
||||
project.change_cel(-1, 0)
|
||||
|
||||
var mouse_pos := get_global_mouse_position()
|
||||
var timeline_rect := Rect2(global_position, size)
|
||||
if timeline_rect.has_point(mouse_pos):
|
||||
|
|
|
@ -39,14 +39,14 @@ var about_dialog := Dialog.new("res://src/UI/Dialogs/AboutDialog.tscn")
|
|||
|
||||
@onready var main_ui := Global.control.find_child("DockableContainer") as DockableContainer
|
||||
@onready var ui_elements := main_ui.get_children()
|
||||
@onready var file_menu: PopupMenu = $MenuBar/File
|
||||
@onready var edit_menu: PopupMenu = $MenuBar/Edit
|
||||
@onready var select_menu: PopupMenu = $MenuBar/Select
|
||||
@onready var image_menu: PopupMenu = $MenuBar/Image
|
||||
@onready var effects_menu: PopupMenu = $MenuBar/Effects
|
||||
@onready var view_menu: PopupMenu = $MenuBar/View
|
||||
@onready var window_menu: PopupMenu = $MenuBar/Window
|
||||
@onready var help_menu: PopupMenu = $MenuBar/Help
|
||||
@onready var file_menu := $MarginContainer/HBoxContainer/MenuBar/File as PopupMenu
|
||||
@onready var edit_menu := $MarginContainer/HBoxContainer/MenuBar/Edit as PopupMenu
|
||||
@onready var select_menu := $MarginContainer/HBoxContainer/MenuBar/Select as PopupMenu
|
||||
@onready var image_menu := $MarginContainer/HBoxContainer/MenuBar/Image as PopupMenu
|
||||
@onready var effects_menu := $MarginContainer/HBoxContainer/MenuBar/Effects as PopupMenu
|
||||
@onready var view_menu := $MarginContainer/HBoxContainer/MenuBar/View as PopupMenu
|
||||
@onready var window_menu := $MarginContainer/HBoxContainer/MenuBar/Window as PopupMenu
|
||||
@onready var help_menu := $MarginContainer/HBoxContainer/MenuBar/Help as PopupMenu
|
||||
|
||||
@onready var greyscale_vision: ColorRect = main_ui.find_child("GreyscaleVision")
|
||||
@onready var tile_mode_submenu := PopupMenu.new()
|
||||
|
@ -54,7 +54,7 @@ var about_dialog := Dialog.new("res://src/UI/Dialogs/AboutDialog.tscn")
|
|||
@onready var panels_submenu := PopupMenu.new()
|
||||
@onready var layouts_submenu := PopupMenu.new()
|
||||
@onready var recent_projects_submenu := PopupMenu.new()
|
||||
@onready var current_frame_mark := $HBoxContainer/CurrentFrameMark as Label
|
||||
@onready var current_frame_mark := %CurrentFrameMark as Label
|
||||
|
||||
|
||||
class Dialog:
|
||||
|
|
|
@ -9,42 +9,47 @@ offset_right = 1280.0
|
|||
offset_bottom = 28.0
|
||||
script = ExtResource("2")
|
||||
|
||||
[node name="MenuBar" type="MenuBar" parent="."]
|
||||
layout_mode = 2
|
||||
offset_left = 7.0
|
||||
offset_right = 356.0
|
||||
offset_bottom = 27.0
|
||||
flat = true
|
||||
|
||||
[node name="File" type="PopupMenu" parent="MenuBar"]
|
||||
|
||||
[node name="Edit" type="PopupMenu" parent="MenuBar"]
|
||||
|
||||
[node name="Select" type="PopupMenu" parent="MenuBar"]
|
||||
|
||||
[node name="Image" type="PopupMenu" parent="MenuBar"]
|
||||
|
||||
[node name="Effects" type="PopupMenu" parent="MenuBar"]
|
||||
|
||||
[node name="View" type="PopupMenu" parent="MenuBar"]
|
||||
|
||||
[node name="Window" type="PopupMenu" parent="MenuBar"]
|
||||
|
||||
[node name="Help" type="PopupMenu" parent="MenuBar"]
|
||||
|
||||
[node name="TopLabels" type="HBoxContainer" parent="."]
|
||||
[node name="MarginContainer" type="MarginContainer" parent="."]
|
||||
layout_mode = 1
|
||||
anchors_preset = 13
|
||||
anchor_left = 0.5
|
||||
anchor_right = 0.5
|
||||
anchors_preset = 15
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
offset_left = -65.5
|
||||
offset_right = 65.5
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
theme_override_constants/margin_left = 8
|
||||
theme_override_constants/margin_right = 8
|
||||
|
||||
[node name="HBoxContainer" type="HBoxContainer" parent="MarginContainer"]
|
||||
layout_mode = 2
|
||||
|
||||
[node name="MenuBar" type="MenuBar" parent="MarginContainer/HBoxContainer"]
|
||||
custom_minimum_size = Vector2(575, 0)
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
flat = true
|
||||
|
||||
[node name="File" type="PopupMenu" parent="MarginContainer/HBoxContainer/MenuBar"]
|
||||
|
||||
[node name="Edit" type="PopupMenu" parent="MarginContainer/HBoxContainer/MenuBar"]
|
||||
|
||||
[node name="Select" type="PopupMenu" parent="MarginContainer/HBoxContainer/MenuBar"]
|
||||
|
||||
[node name="Image" type="PopupMenu" parent="MarginContainer/HBoxContainer/MenuBar"]
|
||||
|
||||
[node name="Effects" type="PopupMenu" parent="MarginContainer/HBoxContainer/MenuBar"]
|
||||
|
||||
[node name="View" type="PopupMenu" parent="MarginContainer/HBoxContainer/MenuBar"]
|
||||
|
||||
[node name="Window" type="PopupMenu" parent="MarginContainer/HBoxContainer/MenuBar"]
|
||||
|
||||
[node name="Help" type="PopupMenu" parent="MarginContainer/HBoxContainer/MenuBar"]
|
||||
|
||||
[node name="TopLabels" type="HBoxContainer" parent="MarginContainer/HBoxContainer"]
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
theme_override_constants/separation = 20
|
||||
|
||||
[node name="RotationSlider" type="TextureProgressBar" parent="TopLabels"]
|
||||
[node name="RotationSlider" type="TextureProgressBar" parent="MarginContainer/HBoxContainer/TopLabels"]
|
||||
unique_name_in_owner = true
|
||||
custom_minimum_size = Vector2(70, 20)
|
||||
layout_mode = 2
|
||||
|
@ -65,7 +70,7 @@ stretch_margin_bottom = 3
|
|||
script = ExtResource("1")
|
||||
suffix = "°"
|
||||
|
||||
[node name="ZoomSlider" type="TextureProgressBar" parent="TopLabels"]
|
||||
[node name="ZoomSlider" type="TextureProgressBar" parent="MarginContainer/HBoxContainer/TopLabels"]
|
||||
unique_name_in_owner = true
|
||||
custom_minimum_size = Vector2(70, 20)
|
||||
layout_mode = 2
|
||||
|
@ -74,8 +79,9 @@ focus_mode = 2
|
|||
mouse_default_cursor_shape = 2
|
||||
theme_type_variation = &"ValueSlider"
|
||||
min_value = 1.0
|
||||
max_value = 50000.0
|
||||
max_value = 5000.0
|
||||
value = 50.0
|
||||
allow_greater = true
|
||||
nine_patch_stretch = true
|
||||
stretch_margin_left = 3
|
||||
stretch_margin_top = 3
|
||||
|
@ -84,31 +90,21 @@ stretch_margin_bottom = 3
|
|||
script = ExtResource("1")
|
||||
suffix = "%"
|
||||
|
||||
[node name="CursorPosition" type="Label" parent="TopLabels"]
|
||||
[node name="CursorPosition" type="Label" parent="MarginContainer/HBoxContainer/TopLabels"]
|
||||
layout_mode = 2
|
||||
text = "[64×64]"
|
||||
|
||||
[node name="HBoxContainer" type="HBoxContainer" parent="."]
|
||||
layout_mode = 1
|
||||
anchors_preset = 6
|
||||
anchor_left = 1.0
|
||||
anchor_top = 0.5
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 0.5
|
||||
offset_left = -330.0
|
||||
offset_top = -14.0
|
||||
offset_right = 0.00012207
|
||||
offset_bottom = 13.0
|
||||
grow_horizontal = 0
|
||||
grow_vertical = 2
|
||||
[node name="HBoxContainer" type="HBoxContainer" parent="MarginContainer/HBoxContainer"]
|
||||
layout_mode = 2
|
||||
alignment = 1
|
||||
|
||||
[node name="CurrentFrame" type="Label" parent="HBoxContainer"]
|
||||
[node name="CurrentFrame" type="Label" parent="MarginContainer/HBoxContainer/HBoxContainer"]
|
||||
layout_mode = 2
|
||||
size_flags_vertical = 1
|
||||
text = "Current frame:"
|
||||
|
||||
[node name="CurrentFrameMark" type="Label" parent="HBoxContainer"]
|
||||
[node name="CurrentFrameMark" type="Label" parent="MarginContainer/HBoxContainer/HBoxContainer"]
|
||||
unique_name_in_owner = true
|
||||
layout_mode = 2
|
||||
size_flags_vertical = 1
|
||||
text = "1/1"
|
||||
|
|
Loading…
Add table
Reference in a new issue