- Client Godot 4.7 .NET (Godot.NET.Sdk 4.7.2): menu, collegamento, partita locale con server figlio; mappa con terreno (fasce, ombreggiatura, rive curve con shader, curve di livello), opere, entità, alberi, treni interpolati con fumo; strumenti binari con profilo, stazione, deposito, segnali, demolizione; pannelli treni, linee, mercato, finanze, schede; barra superiore, minimappa, notiziario; italiano e inglese. - Pilota automatico del client e scripts/client-autopilot.sh: partita locale, linea con ponte, treni in moto e schermate (docs/screenshots). - Registro dei comandi del server (--record) e viaferrea-tools replay. - PROTOCOL.md normativo, ADR 0009, ARCHITECTURE, STATE e README aggiornati. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0191R7vXgtbAvSV4V8tj8uzL
57 lines
1.9 KiB
C#
57 lines
1.9 KiB
C#
using Godot;
|
|
using ViaFerrea.Client.App;
|
|
|
|
namespace ViaFerrea.Client.Panels;
|
|
|
|
/// <summary>Mattoni comuni dei pannelli laterali.</summary>
|
|
public static class PanelKit
|
|
{
|
|
public static VBoxContainer Column(int separation = 10)
|
|
{
|
|
var v = new VBoxContainer { SizeFlagsHorizontal = Control.SizeFlags.ExpandFill };
|
|
v.AddThemeConstantOverride("separation", separation);
|
|
return v;
|
|
}
|
|
|
|
public static HBoxContainer Row(int separation = 10)
|
|
{
|
|
var h = new HBoxContainer { SizeFlagsHorizontal = Control.SizeFlags.ExpandFill };
|
|
h.AddThemeConstantOverride("separation", separation);
|
|
return h;
|
|
}
|
|
|
|
/// <summary>Riga etichetta : valore.</summary>
|
|
public static HBoxContainer Pair(string caption, Label value)
|
|
{
|
|
var row = Row();
|
|
var c = UiTheme.Text(caption, 14, Palette.TextSecondary);
|
|
c.SizeFlagsHorizontal = Control.SizeFlags.ExpandFill;
|
|
value.HorizontalAlignment = HorizontalAlignment.Right;
|
|
row.AddChild(c);
|
|
row.AddChild(value);
|
|
return row;
|
|
}
|
|
|
|
/// <summary>Riquadro statistico (velocità, affidabilità, età…) come nell'immagine 01.</summary>
|
|
public static PanelContainer Stat(string caption, Label value)
|
|
{
|
|
var p = new PanelContainer { SizeFlagsHorizontal = Control.SizeFlags.ExpandFill };
|
|
p.AddThemeStyleboxOverride("panel", UiTheme.Box(Palette.Inner, Palette.Inner, 8, 12));
|
|
var v = Column(2);
|
|
v.AddChild(UiTheme.Text(caption, 12, Palette.TextSecondary));
|
|
value.AddThemeFontSizeOverride("font_size", 20);
|
|
v.AddChild(value);
|
|
p.AddChild(v);
|
|
return p;
|
|
}
|
|
|
|
public static Label Value(string text = "") => UiTheme.Text(text, 14, bold: true);
|
|
|
|
public static HSeparator Separator()
|
|
{
|
|
var s = new HSeparator();
|
|
s.AddThemeStyleboxOverride("separator", UiTheme.Box(Palette.Border, Palette.Border, 0, 0));
|
|
return s;
|
|
}
|
|
}
|