1
0
Fork 0
mirror of https://github.com/Orama-Interactive/Pixelorama.git synced 2025-01-18 09:09:47 +00:00

Don't change brush size when resizing the timeline cels and the palette swatches

This commit is contained in:
Emmanouil Papadeas 2024-11-12 00:59:01 +02:00
parent b0b1361722
commit ce738f02c2
3 changed files with 11 additions and 3 deletions

View file

@ -90,3 +90,4 @@ func _on_PaletteScroll_gui_input(event: InputEvent) -> void:
return
resize_grid()
set_sliders(palette_grid.current_palette, palette_grid.grid_window_origin + scroll_vector)
get_window().set_input_as_handled()

View file

@ -80,15 +80,21 @@ func _notification(what: int) -> void:
_reset_display(false)
func _input(event: InputEvent) -> void:
func _unhandled_input(event: InputEvent) -> void:
if not editable or not is_visible_in_tree():
return
if event.is_action_pressed(global_increment_action, true):
if (
not global_increment_action.is_empty()
and event.is_action_pressed(global_increment_action, true)
):
if snap_by_default:
value += step if event.ctrl_pressed else snap_step
else:
value += snap_step if event.ctrl_pressed else step
elif event.is_action_pressed(global_decrement_action, true):
elif (
not global_decrement_action.is_empty()
and event.is_action_pressed(global_decrement_action, true)
):
if snap_by_default:
value -= step if event.ctrl_pressed else snap_step
else:

View file

@ -141,6 +141,7 @@ func _input(event: InputEvent) -> void:
if timeline_rect.has_point(mouse_pos):
if Input.is_key_pressed(KEY_CTRL):
cel_size += (2 * int(event.is_action("zoom_in")) - 2 * int(event.is_action("zoom_out")))
get_viewport().set_input_as_handled()
func reset_settings() -> void: