1
0
Fork 0
mirror of https://github.com/Orama-Interactive/Pixelorama.git synced 2025-02-18 19:43:14 +00:00

Compare commits

..

No commits in common. "564b199fa9b24a5cbf2575c7a3f82f767ceb0b1a" and "dbe48a468167ccbd2201aa720510bfd59786917c" have entirely different histories.

4 changed files with 2 additions and 42 deletions

View file

@ -888,16 +888,6 @@ gaussian_blur={
"deadzone": 0.5,
"events": []
}
next_project={
"deadzone": 0.5,
"events": [null, Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":true,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":4194306,"key_label":0,"unicode":0,"location":0,"echo":false,"script":null)
]
}
previous_project={
"deadzone": 0.5,
"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":true,"ctrl_pressed":true,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":4194306,"key_label":0,"unicode":0,"location":0,"echo":false,"script":null)
]
}
[input_devices]

View file

@ -787,8 +787,6 @@ func _initialize_keychain() -> void:
&"open_editor_data_folder": Keychain.InputAction.new("", "Help menu", true),
&"changelog": Keychain.InputAction.new("", "Help menu", true),
&"about_pixelorama": Keychain.InputAction.new("", "Help menu", true),
&"previous_project": Keychain.InputAction.new("", "Canvas"),
&"next_project": Keychain.InputAction.new("", "Canvas"),
&"zoom_in": Keychain.InputAction.new("", "Canvas"),
&"zoom_out": Keychain.InputAction.new("", "Canvas"),
&"camera_left": Keychain.InputAction.new("", "Canvas"),

View file

@ -452,7 +452,8 @@ func save_project(path: String) -> void:
project_to_save = changed_projects_on_quit[0]
var include_blended := false
if OS.get_name() == "Web":
var file_name := project_to_save.name + ".pxo"
var file_name: String = save_sprite_html5.get_node("%FileNameLineEdit").text
file_name += ".pxo"
path = "user://".path_join(file_name)
include_blended = save_sprite_html5.get_node("%IncludeBlended").button_pressed
else:

View file

@ -4,35 +4,6 @@ extends TabBar
var unsaved_changes_dialog: ConfirmationDialog = Global.control.find_child("UnsavedCanvasDialog")
func _input(_event: InputEvent) -> void:
# NOTE: This feature has an unavoidable bug which sometimes causes the undoredo
# system to fail, because user is trying to draw while switching project simultaneously.
# This is because the current project has changed and the system tries to commit to the
# wrong undoredo.
var tab_idx = current_tab
# If a project is currently worked upon, then don't switch it.
# This doesn't stop the bug completely but significantly reduces it's chances
# of appearing.
if (
Input.is_action_pressed("activate_left_tool")
or Input.is_action_pressed("activate_right_tool")
):
return
# Due to the bug mentioned above, we will use is_action_just_released
# instead of is_action_just_pressed. This won't remove the bug completely
# but will significantly reduce it's chancce of appearing.
if Input.is_action_just_released(&"next_project", true):
tab_idx += 1
if tab_idx >= tab_count:
tab_idx = 0
elif Input.is_action_just_released(&"previous_project", true):
tab_idx = current_tab - 1
if tab_idx < 0:
tab_idx -= 1
if tab_idx != current_tab:
current_tab = tab_idx
## Handles closing tab with middle-click
## Thanks to https://github.com/godotengine/godot/issues/64498#issuecomment-1217992089
func _gui_input(event: InputEvent) -> void: