Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Canvas keybinding controls #177

Merged
merged 4 commits into from
Jul 9, 2022
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Add I18N strings and make pan direction match language
  • Loading branch information
MrApplejuice committed Jul 8, 2022
commit 0b72624a3345fc2cda2a49e68c69fd6229908427
4 changes: 4 additions & 0 deletions lorien/Assets/I18n/en.txt
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,10 @@ ACTION_toggle_player EFF TWELVE
ACTION_toggle_fullscreen Toggle fullscreen
ACTION_canvas_zoom_in Zoom in
ACTION_canvas_zoom_out Zoom out
ACTION_canvas_pan_up Pan up
ACTION_canvas_pan_down Pan down
ACTION_canvas_pan_right Pan right
ACTION_canvas_pan_left Pan left

# -----------------------------------------------------------------------------
# Kebindings dialog messages
Expand Down
8 changes: 4 additions & 4 deletions lorien/InfiniteCanvas/PanZoomCamera.gd
Original file line number Diff line number Diff line change
Expand Up @@ -67,19 +67,19 @@ func tool_event(event: InputEvent) -> void:
get_tree().set_input_as_handled()

elif Utils.event_pressed_bug_workaround("canvas_pan_left", event):
_do_pan(Vector2.LEFT * KEYBOARD_PAN_CONSTANT)
_do_pan(-Vector2.LEFT * KEYBOARD_PAN_CONSTANT)
get_tree().set_input_as_handled()

elif Utils.event_pressed_bug_workaround("canvas_pan_right", event):
_do_pan(Vector2.RIGHT * KEYBOARD_PAN_CONSTANT)
_do_pan(-Vector2.RIGHT * KEYBOARD_PAN_CONSTANT)
get_tree().set_input_as_handled()

elif Utils.event_pressed_bug_workaround("canvas_pan_up", event):
_do_pan(Vector2.UP * KEYBOARD_PAN_CONSTANT)
_do_pan(-Vector2.UP * KEYBOARD_PAN_CONSTANT)
get_tree().set_input_as_handled()

elif Utils.event_pressed_bug_workaround("canvas_pan_down", event):
_do_pan(Vector2.DOWN * KEYBOARD_PAN_CONSTANT)
_do_pan(-Vector2.DOWN * KEYBOARD_PAN_CONSTANT)
get_tree().set_input_as_handled()

# -------------------------------------------------------------------------------------------------
Expand Down