mirror of
https://github.com/rr-/pq-cli.git
synced 2026-09-28 22:33:59 -06:00
ui: add shortcuts
This commit is contained in:
+10
-2
@@ -26,11 +26,15 @@ class RosterView(urwid.Filler):
|
||||
|
||||
buttons.append(
|
||||
MenuButton(
|
||||
label="Create a new character", on_press=self.on_new_game_press
|
||||
label="Create a new character",
|
||||
hint="F1",
|
||||
on_press=self.on_new_game_press,
|
||||
)
|
||||
)
|
||||
|
||||
buttons.append(MenuButton(label="Exit", on_press=self.on_exit_press))
|
||||
buttons.append(
|
||||
MenuButton(label="Exit", hint="Esc", on_press=self.on_exit_press)
|
||||
)
|
||||
|
||||
super().__init__(
|
||||
urwid.Padding(
|
||||
@@ -62,4 +66,8 @@ class RosterView(urwid.Filler):
|
||||
self._emit("exit")
|
||||
return True
|
||||
|
||||
if key == "f1":
|
||||
self._emit("new_game")
|
||||
return True
|
||||
|
||||
return False
|
||||
|
||||
Reference in New Issue
Block a user