mirror of
https://github.com/Orama-Interactive/Pixelorama.git
synced 2025-01-18 17:19:50 +00:00
Don't change brush size when resizing the timeline cels and the palette swatches
This commit is contained in:
parent
b0b1361722
commit
ce738f02c2
|
@ -90,3 +90,4 @@ func _on_PaletteScroll_gui_input(event: InputEvent) -> void:
|
||||||
return
|
return
|
||||||
resize_grid()
|
resize_grid()
|
||||||
set_sliders(palette_grid.current_palette, palette_grid.grid_window_origin + scroll_vector)
|
set_sliders(palette_grid.current_palette, palette_grid.grid_window_origin + scroll_vector)
|
||||||
|
get_window().set_input_as_handled()
|
||||||
|
|
|
@ -80,15 +80,21 @@ func _notification(what: int) -> void:
|
||||||
_reset_display(false)
|
_reset_display(false)
|
||||||
|
|
||||||
|
|
||||||
func _input(event: InputEvent) -> void:
|
func _unhandled_input(event: InputEvent) -> void:
|
||||||
if not editable or not is_visible_in_tree():
|
if not editable or not is_visible_in_tree():
|
||||||
return
|
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:
|
if snap_by_default:
|
||||||
value += step if event.ctrl_pressed else snap_step
|
value += step if event.ctrl_pressed else snap_step
|
||||||
else:
|
else:
|
||||||
value += snap_step if event.ctrl_pressed else step
|
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:
|
if snap_by_default:
|
||||||
value -= step if event.ctrl_pressed else snap_step
|
value -= step if event.ctrl_pressed else snap_step
|
||||||
else:
|
else:
|
||||||
|
|
|
@ -141,6 +141,7 @@ func _input(event: InputEvent) -> void:
|
||||||
if timeline_rect.has_point(mouse_pos):
|
if timeline_rect.has_point(mouse_pos):
|
||||||
if Input.is_key_pressed(KEY_CTRL):
|
if Input.is_key_pressed(KEY_CTRL):
|
||||||
cel_size += (2 * int(event.is_action("zoom_in")) - 2 * int(event.is_action("zoom_out")))
|
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:
|
func reset_settings() -> void:
|
||||||
|
|
Loading…
Reference in a new issue