mirror of
https://github.com/rr-/pq-cli.git
synced 2026-11-12 22:40:36 -07:00
ui: import and export .pqw files from the menus
The basic interface gets two main menu entries that ask for a path. The curses roster gets [I] Import and [E] Export, with a new text input view for the path, prefilled with NAME.pqw on export, and a message view for the outcome and any warnings. The README explains how to move characters to and from the web version. Resolves #21
This commit is contained in:
7 files changed
+266
-3
No files matched your search
@@ -57,6 +57,8 @@ class RosterView(BaseView):
|
||||
self.on_create = EventHandler[[]]()
|
||||
self.on_play = EventHandler[[]]()
|
||||
self.on_delete = EventHandler[[]]()
|
||||
self.on_import = EventHandler[[]]()
|
||||
self.on_export = EventHandler[[]]()
|
||||
self.on_quit = EventHandler[[]]()
|
||||
|
||||
self.choices: list[Choice] = [
|
||||
@@ -75,6 +77,16 @@ class RosterView(BaseView):
|
||||
desc="[D] Delete character",
|
||||
callback=self.on_delete,
|
||||
),
|
||||
Choice(
|
||||
keys=list(map(ord, "iI")),
|
||||
desc="[I] Import character (.pqw)",
|
||||
callback=self.on_import,
|
||||
),
|
||||
Choice(
|
||||
keys=list(map(ord, "eE")),
|
||||
desc="[E] Export character (.pqw)",
|
||||
callback=self.on_export,
|
||||
),
|
||||
Choice(
|
||||
keys=list(KEYS_CANCEL), desc="[Q] Quit", callback=self.on_quit
|
||||
),
|
||||
|
||||
Reference in new issue
Block a user