Added a menudisplay class for menus with a value such as the menu of the merchants

This commit is contained in:
eichhornchen 2020-11-27 17:54:55 +01:00
parent bad56ba442
commit 3f301423fb
1 changed files with 7 additions and 0 deletions

View File

@ -94,3 +94,10 @@ class MainMenuDisplay(Display):
self.menudisplay.refresh( self.menudisplay.refresh(
menuy, menux, min(self.menudisplay.preferred_height, menuy, menux, min(self.menudisplay.preferred_height,
self.height - menuy), menuwidth) self.height - menuy), menuwidth)
class VariableMenuDisplay(MenuDisplay):
@property
def values(self) -> List[str]:
return [a[1][1] + (" : "
+ (a[1][0])
if a[1][0] else "" for a in self.menu.values]