tui: Q&D adaptation to new code:
use the new `quick_bridge` adapter and do few changes to make TUI work with new backend. TUI will probably be rewritten at some point, this is just an update to keep it working. `urwid` has been updated to have a version working with Python 3.14.
This commit is contained in:
parent
d3dc59b141
commit
e5ed4e3d7c
1 changed files with 135 additions and 77 deletions
|
|
@ -174,10 +174,13 @@ class Card(TarotCard):
|
|||
return CardDisplayer(self)
|
||||
|
||||
|
||||
class Table(urwid.FlowWidget):
|
||||
class Table(urwid.Widget):
|
||||
"""Represent the cards currently on the table"""
|
||||
|
||||
_sizing = frozenset([urwid.Sizing.FLOW])
|
||||
|
||||
def __init__(self):
|
||||
super().__init__()
|
||||
self.top = self.left = self.bottom = self.right = None
|
||||
|
||||
def put_card(self, location, card):
|
||||
|
|
@ -313,7 +316,7 @@ class TarotGame(QuickTarotGame, urwid.WidgetWrap):
|
|||
if not winners and not loosers:
|
||||
title = _("Draw game")
|
||||
else:
|
||||
title = _("You win \o/") if self.player_nick in winners else _("You loose :(")
|
||||
title = _("You win \\o/") if self.player_nick in winners else _("You loose :(")
|
||||
form = xmlui.create(
|
||||
self.parent.host,
|
||||
xml_data,
|
||||
|
|
|
|||
Loading…
Reference in a new issue