mirror of
https://github.com/rr-/pq-cli.git
synced 2026-09-29 06:44:00 -06:00
ui: center roster view
This commit is contained in:
@@ -6,7 +6,7 @@ from pqcli.game_state import Roster
|
|||||||
from pqcli.ui.button import MenuButton
|
from pqcli.ui.button import MenuButton
|
||||||
|
|
||||||
|
|
||||||
class RosterView(urwid.ListBox):
|
class RosterView(urwid.Filler):
|
||||||
def __init__(
|
def __init__(
|
||||||
self,
|
self,
|
||||||
roster: Roster,
|
roster: Roster,
|
||||||
@@ -41,11 +41,14 @@ class RosterView(urwid.ListBox):
|
|||||||
buttons.append(MenuButton(label="Exit", on_press=self.on_exit_press))
|
buttons.append(MenuButton(label="Exit", on_press=self.on_exit_press))
|
||||||
|
|
||||||
super().__init__(
|
super().__init__(
|
||||||
[
|
urwid.Padding(
|
||||||
urwid.Padding(logo, width="clip"),
|
urwid.Pile(
|
||||||
urwid.Divider(),
|
[urwid.Padding(logo, width="clip"), urwid.Divider()]
|
||||||
urwid.Pile(buttons),
|
+ buttons
|
||||||
]
|
),
|
||||||
|
align="center",
|
||||||
|
width=logo.pack()[0],
|
||||||
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
def on_resume_game_press(self, user_data: T.Any) -> None:
|
def on_resume_game_press(self, user_data: T.Any) -> None:
|
||||||
|
|||||||
Reference in New Issue
Block a user