Skip to content

Commit

Permalink
added page switching for keyboard, oops
Browse files Browse the repository at this point in the history
  • Loading branch information
R3tr0BoiDX committed Oct 15, 2023
1 parent fb2ea45 commit 2cf5b90
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions source/gui/screens/browser.py
Original file line number Diff line number Diff line change
Expand Up @@ -310,6 +310,19 @@ def run(
selected_entry, scroll_offset = event_selection_down(
selected_entry, scroll_offset, len(page.hacks)
)
elif event.key == pygame.K_RIGHT:
next_page = event_next_page(page)
if next_page:
page = next_page
selected_entry = 0
scroll_offset = 0
elif event.key == pygame.K_LEFT:
previous_page = event_previous_page(page)
if previous_page:
page = previous_page
selected_entry = 0
scroll_offset = 0

elif event.key in (pygame.K_RETURN, pygame.K_KP_ENTER):
event_select_entry(page.hacks, selected_entry)
elif event.key == pygame.K_ESCAPE:
Expand Down

0 comments on commit 2cf5b90

Please sign in to comment.