fix: Character-Panel breiter, keine abgeschnittenen Namen

- 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)
This commit is contained in:
arch_agent
2026-07-25 20:22:15 +02:00
parent cc172d71c5
commit bba2458eea
+8 -8
View File
@@ -89,9 +89,9 @@ def render_game(engine: GameEngine) -> Panel:
c = engine.character c = engine.character
# === Character Panel === # === Character Panel ===
char_table = Table(show_header=False, box=box.SIMPLE, padding=(0, 1)) char_table = Table(show_header=False, box=box.SIMPLE, padding=(0, 1), expand=True)
char_table.add_column("Stat", style="cyan", width=8) char_table.add_column("Stat", style="cyan", width=10, no_wrap=True)
char_table.add_column("Value", style="bold") char_table.add_column("Value", style="bold", no_wrap=False, overflow="fold")
char_table.add_row("Name", f"{c.name}") char_table.add_row("Name", f"{c.name}")
char_table.add_row("Rasse", c.race) 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)) char_table.add_row("Quests", str(c.quests_done))
# === Equipment Panel === # === Equipment Panel ===
equip_table = Table(show_header=False, box=box.SIMPLE, padding=(0, 1), title="[bold]Ausrüstung[/]") 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) equip_table.add_column("Slot", style="cyan", width=10, no_wrap=True)
equip_table.add_column("Item", no_wrap=False) equip_table.add_column("Item", no_wrap=False, overflow="fold")
slot_names = {"weapon": "Waffe", "armor": "Rüstung", "helmet": "Helm", "boots": "Stiefel", "accessory": "Accessoir."} slot_names = {"weapon": "Waffe", "armor": "Rüstung", "helmet": "Helm", "boots": "Stiefel", "accessory": "Accessoir."}
for slot, name in slot_names.items(): 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 # Main: left=char/equip, center=log, right=quest/stats
layout["main"].split_row( 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(Panel(log_text, title="[bold]Ereignis-Log[/]"), name="center"),
Layout(name="right", size=45), Layout(name="right", size=40),
) )
layout["right"].split_column( layout["right"].split_column(