From bba2458eea50fb76a4c1701e422188a54f7571c9 Mon Sep 17 00:00:00 2001 From: arch_agent Date: Sat, 25 Jul 2026 20:22:15 +0200 Subject: [PATCH] fix: Character-Panel breiter, keine abgeschnittenen Namen MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - left panel 28→35, right 45→40 - Tabellen mit expand=True + overflow=fold - Stat-Spalte width=10 (passt für 'Angriff', 'Klasse') - Value-Spalte no_wrap=False (Umbruch statt Abschneiden) --- src/main.py | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/main.py b/src/main.py index 8fd0c19..8a39012 100644 --- a/src/main.py +++ b/src/main.py @@ -89,9 +89,9 @@ def render_game(engine: GameEngine) -> Panel: c = engine.character # === Character Panel === - char_table = Table(show_header=False, box=box.SIMPLE, padding=(0, 1)) - char_table.add_column("Stat", style="cyan", width=8) - char_table.add_column("Value", style="bold") + char_table = Table(show_header=False, box=box.SIMPLE, padding=(0, 1), expand=True) + char_table.add_column("Stat", style="cyan", width=10, no_wrap=True) + char_table.add_column("Value", style="bold", no_wrap=False, overflow="fold") char_table.add_row("Name", f"{c.name}") char_table.add_row("Rasse", c.race) @@ -108,9 +108,9 @@ def render_game(engine: GameEngine) -> Panel: char_table.add_row("Quests", str(c.quests_done)) # === Equipment Panel === - equip_table = Table(show_header=False, box=box.SIMPLE, padding=(0, 1), title="[bold]Ausrüstung[/]") - equip_table.add_column("Slot", style="cyan", width=10) - equip_table.add_column("Item", no_wrap=False) + equip_table = Table(show_header=False, box=box.SIMPLE, padding=(0, 1), title="[bold]Ausrüstung[/]", expand=True) + equip_table.add_column("Slot", style="cyan", width=10, no_wrap=True) + equip_table.add_column("Item", no_wrap=False, overflow="fold") slot_names = {"weapon": "Waffe", "armor": "Rüstung", "helmet": "Helm", "boots": "Stiefel", "accessory": "Accessoir."} for slot, name in slot_names.items(): @@ -157,9 +157,9 @@ def render_game(engine: GameEngine) -> Panel: # Main: left=char/equip, center=log, right=quest/stats layout["main"].split_row( - Layout(Panel(char_table, title="[bold]Character[/]"), name="left", size=28), + Layout(Panel(char_table, title="[bold]Character[/]"), name="left", size=35), Layout(Panel(log_text, title="[bold]Ereignis-Log[/]"), name="center"), - Layout(name="right", size=45), + Layout(name="right", size=40), ) layout["right"].split_column(