mirror of
https://github.com/rr-/pq-cli.git
synced 2026-09-29 06:44:00 -06:00
ui/curses: cycle widgets on tab
This commit is contained in:
@@ -8,6 +8,7 @@ from pqcli.roster import Roster
|
||||
from pqcli.ui.curses.event_handler import EventHandler
|
||||
from pqcli.ui.curses.util import (
|
||||
KEYS_CANCEL,
|
||||
KEYS_CYCLE,
|
||||
KEYS_DOWN,
|
||||
KEYS_LEFT,
|
||||
KEYS_RIGHT,
|
||||
@@ -57,6 +58,20 @@ class GameView(BaseView):
|
||||
if hasattr(focused, "scroll_page_down"):
|
||||
focused.scroll_page_down()
|
||||
|
||||
elif key in KEYS_CYCLE:
|
||||
if focused == self._char_sheet_win:
|
||||
self.focus(self._spell_book_win)
|
||||
elif focused == self._spell_book_win:
|
||||
self.focus(self._equipment_win)
|
||||
elif focused == self._equipment_win:
|
||||
self.focus(self._inventory_win)
|
||||
elif focused == self._inventory_win:
|
||||
self.focus(self._plot_win)
|
||||
elif focused == self._plot_win:
|
||||
self.focus(self._quest_book_win)
|
||||
elif focused == self._quest_book_win:
|
||||
self.focus(self._char_sheet_win)
|
||||
|
||||
elif key in KEYS_DOWN:
|
||||
if focused == self._char_sheet_win:
|
||||
self.focus(self._spell_book_win)
|
||||
|
||||
Reference in New Issue
Block a user