Files
pokerfreak/cockpit/ui/cash.slint
T
mmintelandClaude Opus 5.5 d33e34a4fd Verlustdeckel Sitzung/Tag im Cockpit zuruecksetzen: Halteknopf (2 s) in WinUI, Rust, Swift
Server-Aktion deckel_zuruecksetzen setzt die Zaehlerdatei sofort zurueck und legt einen Auftrag
daneben; ein laufender Laeufer holt ihn im Takt ab (Zaehler im Speicher, Geld-Stops, Schluss,
Pause/Fertig -> neue Sitzung). Stufe und Bankroll bleiben bewusst Handarbeit.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-16 21:56:06 +01:00

720 lines
27 KiB
Plaintext
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
// Der Inhalt des Reiters "Cash": Modus, die drei Statuskarten, Tischzahl und -form, "Was spielen",
// Status, Hauptknopf mit Not-Aus und die Werkzeugleiste (Wurzel.swift `Kopfzeile`, ab ModusSchalter).
// Alles Gezeigte steht in `CashZustand`; was geschieht, geht ueber die Rueckrufe an Rust (bruecke.rs).
import { Farbe, Icon, Segmentschalter, Statuskarte, Auswahl, Stepper, Toggle, Formatkarte, Werkzeugknopf } from "bausteine.slint";
export struct KartenZeile {
id: string,
name: string,
hinweis: string,
symbol: string,
anzahl: int,
voll: bool,
rang: int,
}
// Turniere (TurnierBereich.swift): der Plan-Editor, sobald die Turnier-Kachel Tische hat, und die
// eigenen Anmeldungen mit Abmelden.
export struct TAnmeldung { raum: string, name: string, status: string }
export struct TurnierD {
aktiv: bool,
buyin-min: string,
buyin-max: string,
typen: [string],
typ: int,
nur-laufend: bool,
fenster: string,
anmeldungen: [TAnmeldung],
}
// Ein schmales Zahlfeld: `start` setzt den Text, solange das Feld nicht den Fokus hat; jede
// Eingabe geht sofort hinaus (leer = offenes Ende).
component Zahlfeld inherits Rectangle {
in property <string> start;
in property <string> platzhalter;
callback geaendert(string);
width: 64px;
height: 26px;
clip: true;
border-radius: 4px;
border-width: 1px;
border-color: Farbe.strich;
background: ti.has-focus ? #1c1c1c : ta.has-hover ? Farbe.feld-schwebe : Farbe.feld;
ta := TouchArea { mouse-cursor: text; clicked => { ti.focus(); } }
ti := TextInput {
x: 8px;
width: parent.width - 16px;
height: parent.height;
vertical-alignment: center;
color: Farbe.text;
font-size: 12px;
single-line: true;
edited => { root.geaendert(self.text); }
}
Text {
visible: ti.text == "";
x: 8px;
height: parent.height;
vertical-alignment: center;
text: root.platzhalter;
color: Farbe.text-aus;
font-size: 12px;
}
Rectangle {
y: parent.height - 2px;
height: 2px;
background: ti.has-focus ? Farbe.akzent : transparent;
}
init => { ti.text = root.start; }
changed start => { if (!ti.has-focus) { ti.text = root.start; } }
}
component Klein inherits Text {
color: Farbe.gedaempft;
font-size: 11px;
vertical-alignment: center;
}
component TurnierBereich inherits VerticalLayout {
in property <TurnierD> t;
callback buyin(bool, string);
callback typ(int);
callback laufend();
callback fenster(string);
callback abmelden(string);
spacing: 8px;
if root.t.aktiv: Rectangle {
height: ed.preferred-height;
border-radius: 8px;
background: #ffffff0f;
ed := VerticalLayout {
padding: 10px;
spacing: 8px;
HorizontalLayout {
spacing: 6px;
height: 18px;
Icon { art: "pokal"; farbe: Farbe.hell; groesse: 13px; y: (parent.height - self.height) / 2; }
Text { text: "Turniere"; color: Farbe.hell; font-size: 12px; font-weight: 600; vertical-alignment: center; }
Rectangle { }
Klein { text: "höchstes Preisgeld zuerst"; }
}
HorizontalLayout {
spacing: 8px;
height: 26px;
alignment: start;
Text { text: "Buy-in"; color: Farbe.hell; font-size: 12px; font-weight: 600; vertical-alignment: center; }
Zahlfeld { start: root.t.buyin-min; platzhalter: "ab"; geaendert(x) => { root.buyin(false, x); } }
Klein { text: "–"; }
Zahlfeld { start: root.t.buyin-max; platzhalter: "bis"; geaendert(x) => { root.buyin(true, x); } }
}
Text {
text: "Das Buy-in-Band gilt nur für bezahlte Turniere – Freerolls sind frei und immer dabei.";
color: Farbe.gedaempft;
font-size: 10px;
wrap: word-wrap;
}
HorizontalLayout {
spacing: 8px;
height: 28px;
Text { text: "Typ"; color: Farbe.hell; font-size: 12px; font-weight: 600; vertical-alignment: center; }
Auswahl { width: 112px; optionen: root.t.typen; index: root.t.typ; gewaehlt(i) => { root.typ(i); } }
Rectangle { }
Klein { text: "nur laufende"; }
Toggle { y: (parent.height - self.height) / 2; an: root.t.nur-laufend; umgeschaltet => { root.laufend(); } }
}
HorizontalLayout {
spacing: 8px;
height: 26px;
alignment: start;
Text { text: "Startet in"; color: Farbe.hell; font-size: 12px; font-weight: 600; vertical-alignment: center; }
Zahlfeld { width: 52px; start: root.t.fenster; platzhalter: "alle"; geaendert(x) => { root.fenster(x); } }
Klein { text: "Min oder weniger"; }
}
Text {
text: "Anmeldung wird noch gemessen - Auswahl und Band greifen, der Live-Beitritt ist in Erprobung.";
color: Farbe.gedaempft;
font-size: 10px;
wrap: word-wrap;
}
}
}
if root.t.anmeldungen.length > 0: Rectangle {
height: al.preferred-height;
border-radius: 8px;
background: #ffffff0f;
al := VerticalLayout {
padding: 10px;
spacing: 6px;
Text { text: "Angemeldet (" + root.t.anmeldungen.length + ")"; color: Farbe.hell; font-size: 12px; font-weight: 600; }
for a in root.t.anmeldungen: HorizontalLayout {
spacing: 8px;
VerticalLayout {
alignment: center;
Text { text: a.name; color: Farbe.text; font-size: 12px; font-weight: 500; overflow: elide; }
if a.status != "": Text { text: a.status; color: Farbe.gedaempft; font-size: 10px; }
}
Rectangle { }
Rectangle {
width: abm.preferred-width + 16px;
height: 24px;
y: (parent.height - self.height) / 2;
border-radius: 4px;
border-width: 1px;
border-color: Farbe.strich;
background: abmt.has-hover ? Farbe.feld-schwebe : Farbe.feld;
abm := Text { text: "Abmelden"; color: Farbe.text; font-size: 11px; }
abmt := TouchArea { clicked => { root.abmelden(a.raum); } }
}
}
}
}
}
export struct KAlarm { text: string, jetzt: bool }
// Eine Kachel des Verlustdeckels (O4): Sitzung, Tag, Stufe - fertig beschriftet vom Server.
export struct DeckelKarte {
titel: string,
wert: string,
fuss: string,
ton: color, // Verbrauch des Deckels -> Balken
wert-farbe: color, // Vorzeichen der Zahl: rot bei Minus, nie gruen fuer einen Verlust
anteil: float, // Verbrauch 0..1 -> Balkenlaenge
}
export struct CashZustand {
modus: int, // 0 Zuschauer, 1 Uebung, 2 Echtgeld
modus-gesperrt: bool,
cash-frage: bool,
cash: bool,
tische-wert: string,
tische-fuss: string,
geld-titel: string,
geld-wert: string,
geld-fuss: string,
plan-titel: string,
plan-fuss: string,
plan-unendlich: bool,
deckel: [DeckelKarte],
deckel-satz: string,
deckel-gesperrt: bool,
deckel-warn: bool,
deckel-zurueck-was: string, // "sitzung"/"tag": Halteknopf zeigen; leer = keiner
deckel-zurueck-text: string,
deckel-zurueck-hinweis: string,
sitzung-art: int, // 0 "immer N", 1 "ausgelost"
sitzung-immer: string,
stepper-text: string,
stepper-auf-ok: bool,
stepper-ab-ok: bool,
form: int, // 0 Multiway, 1 Heads-Up, 2 Beide
micro-only: bool,
budget-aus: bool,
zusammen: string,
ausweichen: bool,
ziel-text: string,
status-satz: string,
status-ton: color,
knopf-titel: string,
knopf-symbol: string,
knopf-farbe: color,
knopf-aktiv: bool,
beschaeftigt: bool,
not-aus: bool,
werkzeuge-aktiv: bool,
pausiert: bool,
pause-aktiv: bool,
meldung: string,
meldung-ok: bool,
phase-text: string,
phase-symbol: string,
phase-spielen: bool,
alarme: [KAlarm],
port-warnung: bool,
laufzeit: string,
klon: bool,
}
// Gedrueckt halten statt klicken (WinUI `LoesenKnopf`, Wurzel.swift): der Kreis fuellt sich, erst
// nach `dauer-ms` loest er aus. Loslassen vorher bricht ab.
component Halteknopf inherits Rectangle {
in property <color> farbe;
in property <int> dauer-ms: 2000;
callback gehalten();
property <float> anteil: 0;
width: 36px;
height: 36px;
border-radius: 18px;
background: ta.pressed ? farbe.with-alpha(0.25) : ta.has-hover ? #ffffff1f : #ffffff14;
border-width: 3px;
border-color: farbe.with-alpha(0.25 + 0.75 * anteil);
Rectangle {
width: 30px * root.anteil;
height: self.width;
border-radius: self.width / 2;
background: root.farbe.with-alpha(0.55);
}
Text {
text: "\u{21BA}";
color: root.farbe;
font-size: 18px;
font-weight: 700;
horizontal-alignment: center;
vertical-alignment: center;
}
ta := TouchArea {
pointer-event(e) => {
if (e.kind == PointerEventKind.up || e.kind == PointerEventKind.cancel) {
root.anteil = 0;
}
}
}
Timer {
interval: 30ms;
running: ta.pressed;
triggered => {
root.anteil = min(1.0, root.anteil + 30 / root.dauer-ms);
if (root.anteil >= 1.0) {
root.anteil = 0;
root.gehalten();
}
}
}
}
export component CashInhalt inherits VerticalLayout {
in property <CashZustand> lage;
in property <[KartenZeile]> karten;
in property <bool> nur-spiel: false; // --nur-spiel: ohne Zuschauer (nur Anzeige)
in property <TurnierD> turnier;
in-out property <string> budget-feld;
in-out property <bool> budget-tippt;
callback modus-gewaehlt(int);
callback cash-bestaetigt();
callback cash-abgebrochen();
callback budget-gesetzt(string);
callback geld-oeffnen();
callback plan-oeffnen();
callback sitzung-art-gewaehlt(int);
callback stepper-auf();
callback stepper-ab();
callback form-gewaehlt(int);
callback micro-umschalten();
callback deckel-zuruecksetzen(string);
callback ausweichen-umschalten();
callback ziel-auf();
callback ziel-ab();
callback karte-plus(string);
callback karte-minus(string);
callback karte-vor(string);
callback knopf-gedrueckt();
callback not-aus();
callback werkzeug(string);
callback turnier-buyin(bool, string);
callback turnier-typ(int);
callback turnier-laufend();
callback turnier-fenster(string);
callback turnier-abmelden(string);
property <length> spalte: (self.width - 28px - 8px) / 2;
padding-left: 14px;
padding-right: 14px;
padding-top: 8px;
padding-bottom: 18px;
spacing: 12px;
// 2) Modus-Leiste
Segmentschalter {
titel: root.nur-spiel ? ["Übung", "Echtgeld"] : ["Zuschauer", "Übung", "Echtgeld"];
farben: root.nur-spiel ? [Farbe.akzent, Farbe.rot] : [Farbe.akzent, Farbe.akzent, Farbe.rot];
// Ohne Zuschauer verschieben sich die Segmente um eins; der Modus selbst bleibt 0/1/2.
aktuell: root.nur-spiel ? root.lage.modus - 1 : root.lage.modus;
gesperrt: root.lage.modus-gesperrt;
gewaehlt(i) => { root.modus-gewaehlt(root.nur-spiel ? i + 1 : i); }
}
// Rueckfrage, bevor Echtgeld einschaltet (ModusLeiste.swift `LiveFrage`)
if root.lage.cash-frage: Rectangle {
background: #c42b1c24;
border-radius: 8px;
VerticalLayout {
padding: 12px;
spacing: 8px;
HorizontalLayout {
spacing: 6px;
alignment: start;
Text { text: "⚠"; color: Farbe.rot; font-size: 14px; font-weight: 700; vertical-alignment: center; }
Text { text: "Echtgeld heißt echtes Geld"; color: Farbe.rot; font-size: 14px; font-weight: 700; vertical-alignment: center; }
}
Text {
text: "Der Läufer öffnet selbst Tische und setzt Geld.";
color: Farbe.gedaempft;
font-size: 12px;
wrap: word-wrap;
}
HorizontalLayout {
spacing: 8px;
Rectangle {
height: 32px;
border-radius: 4px;
background: abta.pressed ? Farbe.feld-druck : abta.has-hover ? Farbe.feld-schwebe : Farbe.feld;
border-width: 1px;
border-color: Farbe.strich;
animate background { duration: 100ms; }
Text { text: "Abbrechen"; color: Farbe.text; font-size: 13px; font-weight: 600; }
abta := TouchArea { clicked => { root.cash-abgebrochen(); } }
}
Rectangle {
height: 32px;
border-radius: 4px;
background: bsta.pressed ? Farbe.rot.darker(0.12) : bsta.has-hover ? Farbe.rot.brighter(0.12) : Farbe.rot;
animate background { duration: 100ms; }
Text { text: "Echtgeld einschalten"; color: white; font-size: 13px; font-weight: 700; }
bsta := TouchArea { clicked => { root.cash-bestaetigt(); } }
}
}
}
}
if !(root.lage.modus == 0): VerticalLayout {
spacing: 12px;
// 3) die drei Statuskarten
HorizontalLayout {
spacing: 8px;
Statuskarte {
titel: "Tische";
wert: root.lage.tische-wert;
fuss: root.lage.tische-fuss;
wert-groesse: root.lage.tische-wert.character-count > 3 ? 20px : 26px;
}
budget := Statuskarte {
titel: root.lage.geld-titel;
wert: root.lage.geld-wert;
fuss: root.lage.geld-fuss;
pfeil: true;
eingabe: root.lage.cash && !root.lage.budget-aus;
feld <=> root.budget-feld;
wert-groesse: root.lage.cash ? 26px : 20px;
wert-farbe: root.lage.cash && !root.lage.budget-aus ? Farbe.text : Farbe.gedaempft;
geklickt => { root.geld-oeffnen(); }
angenommen(t) => { root.budget-gesetzt(t); }
changed tippt => { root.budget-tippt = self.tippt; }
}
Statuskarte {
titel: "Plan";
wert: (root.lage.plan-unendlich && root.lage.plan-titel == "Dauerlauf" ? "∞ " : "") + root.lage.plan-titel;
fuss: root.lage.plan-fuss;
wert-groesse: 15px;
pfeil: true;
geklickt => { root.plan-oeffnen(); }
}
}
// 3b) Verlustdeckel (O4): Sitzung, Tag, Stufe - ueber Neustarts gezaehlt
if root.lage.deckel.length > 0: HorizontalLayout {
spacing: 8px;
for k in root.lage.deckel: Statuskarte {
titel: k.titel;
wert: k.wert;
fuss: k.fuss;
fuss-umbruch: true;
wert-groesse: 18px;
wert-farbe: k.wert-farbe;
balken: k.anteil;
balken-farbe: k.ton;
}
}
if root.lage.deckel-satz != "": Text {
text: root.lage.deckel-satz;
color: root.lage.deckel-gesperrt ? Farbe.rot : root.lage.deckel-warn ? Farbe.bernstein : Farbe.gedaempft;
font-size: 12px;
font-weight: root.lage.deckel-gesperrt ? 700 : 400;
wrap: word-wrap;
}
// Sitzung/Tag gesperrt: zuruecksetzen nur mit 2 s Gedrueckthalten - nie aus Versehen (Owner 16.11.)
if root.lage.deckel-zurueck-was != "": Rectangle {
height: 52px;
border-radius: 10px;
background: Farbe.bernstein.with-alpha(0.14);
HorizontalLayout {
padding: 8px;
spacing: 10px;
VerticalLayout {
alignment: center;
Text { text: root.lage.deckel-zurueck-text; color: Farbe.text; font-size: 13px; font-weight: 700; }
Text { text: root.lage.deckel-zurueck-hinweis; color: Farbe.hell; font-size: 11px; wrap: word-wrap; }
}
Halteknopf {
farbe: Farbe.bernstein;
dauer-ms: 2000;
gehalten => { root.deckel-zuruecksetzen(root.lage.deckel-zurueck-was); }
}
}
}
// 4) Tische je Sitzung
HorizontalLayout {
spacing: 8px;
height: 30px;
Text { text: "Tische je Sitzung"; color: Farbe.hell; font-size: 13px; font-weight: 600; vertical-alignment: center; }
Auswahl {
width: 112px;
optionen: [root.lage.sitzung-immer, "ausgelost"];
index: root.lage.sitzung-art;
gewaehlt(i) => { root.sitzung-art-gewaehlt(i); }
}
Rectangle { }
Stepper {
text: root.lage.stepper-text;
auf-ok: root.lage.stepper-auf-ok;
ab-ok: root.lage.stepper-ab-ok;
auf => { root.stepper-auf(); }
ab => { root.stepper-ab(); }
}
}
// 5) Tischform
HorizontalLayout {
spacing: 8px;
height: 30px;
Text { text: "Tischform"; color: Farbe.hell; font-size: 13px; font-weight: 600; vertical-alignment: center; }
Auswahl {
width: 112px;
optionen: ["Multiway", "Heads-Up", "Beide"];
index: root.lage.form;
gewaehlt(i) => { root.form-gewaehlt(i); }
}
Rectangle { }
Text { text: "Micro only"; color: Farbe.hell; font-size: 13px; font-weight: 600; vertical-alignment: center; }
Toggle {
y: (parent.height - self.height) / 2;
an: root.lage.micro-only;
umgeschaltet => { root.micro-umschalten(); }
}
}
// 6) Was spielen
VerticalLayout {
spacing: 8px;
HorizontalLayout {
spacing: 10px;
height: 24px;
Text { text: "Was spielen"; color: Farbe.gedaempft; font-size: 12px; font-weight: 600; vertical-alignment: center; }
Rectangle { }
Text { text: root.lage.zusammen; color: Farbe.gedaempft; font-size: 12px; vertical-alignment: center; }
Rectangle {
width: ausw-text.preferred-width + 22px;
border-radius: 4px;
background: root.lage.ausweichen ? Farbe.akzent-fuell : (awc.has-hover ? Farbe.feld-schwebe : Farbe.feld);
border-width: root.lage.ausweichen ? 0px : 1px;
border-color: Farbe.strich;
animate background { duration: 100ms; }
ausw-text := Text {
text: "Ausweichen";
color: root.lage.ausweichen ? white : Farbe.hell;
font-size: 12px;
font-weight: 600;
}
awc := TouchArea { clicked => { root.ausweichen-umschalten(); } }
}
}
if root.lage.ausweichen: HorizontalLayout {
spacing: 8px;
height: 30px;
Text {
text: root.lage.ziel-text;
color: Farbe.gedaempft;
font-size: 11px;
vertical-alignment: center;
overflow: elide;
}
Stepper { auf => { root.ziel-auf(); } ab => { root.ziel-ab(); } text: ""; }
}
Rectangle {
height: Math.ceil(root.karten.length / 2) * 64px - 8px;
for k[i] in root.karten: Formatkarte {
x: Math.mod(i, 2) * (root.spalte + 8px);
y: Math.floor(i / 2) * 64px;
width: root.spalte;
name: k.name;
hinweis: k.hinweis;
symbol: k.symbol;
anzahl: k.anzahl;
voll: k.voll;
rang: k.rang;
plus => { root.karte-plus(k.id); }
minus => { root.karte-minus(k.id); }
vorziehen => { root.karte-vor(k.id); }
}
}
}
TurnierBereich {
t: root.turnier;
buyin(bis, x) => { root.turnier-buyin(bis, x); }
typ(i) => { root.turnier-typ(i); }
laufend => { root.turnier-laufend(); }
fenster(x) => { root.turnier-fenster(x); }
abmelden(r) => { root.turnier-abmelden(r); }
}
}
// Phase des Zeitplans im Lauf (PhaseBand)
if root.lage.phase-text != "": Rectangle {
height: pb.preferred-height;
border-radius: 8px;
background: #ffffff0f;
pb := HorizontalLayout {
padding-left: 10px;
padding-right: 10px;
padding-top: 6px;
padding-bottom: 6px;
spacing: 8px;
Icon {
art: root.lage.phase-symbol;
farbe: root.lage.phase-spielen ? Farbe.text : Farbe.bernstein;
groesse: 13px;
y: (parent.height - self.height) / 2;
}
Text {
text: root.lage.phase-text;
color: root.lage.phase-spielen ? Farbe.text : Farbe.bernstein;
font-size: 12px;
font-weight: 500;
wrap: word-wrap;
vertical-alignment: center;
horizontal-stretch: 1;
}
}
}
// 7) Statuszeile
HorizontalLayout {
spacing: 9px;
alignment: start;
Rectangle {
width: 10px;
Rectangle {
width: 10px;
height: 10px;
y: 5px;
border-radius: 5px;
background: root.lage.status-ton;
}
}
Text {
text: root.lage.status-satz;
color: Farbe.text;
font-size: 15px;
font-weight: 600;
wrap: word-wrap;
horizontal-stretch: 1;
}
}
// Verdacht, Sperre, laufende Ruhezeit: was uns aussperrt (KontoLeiste)
for al in root.lage.alarme: Rectangle {
height: alt.preferred-height + 6px;
border-radius: 6px;
background: (al.jetzt ? Farbe.bernstein : Farbe.rot).with-alpha(0.12);
alt := Text {
x: 8px;
y: 3px;
width: parent.width - 16px;
text: al.text;
color: al.jetzt ? Farbe.bernstein : Farbe.rot;
font-size: 11px;
wrap: word-wrap;
}
}
if root.lage.meldung != "": Text {
text: root.lage.meldung;
color: root.lage.meldung-ok ? Farbe.gruen : Farbe.bernstein;
font-size: 12px;
wrap: word-wrap;
}
// 8) Hauptknopf und Not-Aus
HorizontalLayout {
spacing: 10px;
height: 56px;
Rectangle {
border-radius: 4px;
// Fluent: ruhend Farbe.knopf, beim Schweben heller, beim Druecken tritt die Flaeche zurueck.
background: !root.lage.knopf-aktiv ? Farbe.knopf
: kta.pressed ? Farbe.knopf.darker(0.12)
: kta.has-hover ? Farbe.knopf.brighter(0.16)
: Farbe.knopf;
border-width: 1px;
border-color: Farbe.linie;
opacity: root.lage.knopf-aktiv ? 1 : 0.55;
animate background { duration: 100ms; }
HorizontalLayout {
alignment: center;
spacing: 8px;
Icon {
art: root.lage.beschaeftigt ? "punkte" : root.lage.knopf-symbol;
farbe: root.lage.knopf-farbe;
groesse: 20px;
y: (parent.height - self.height) / 2;
}
Text {
text: root.lage.knopf-titel;
color: Farbe.text;
font-size: 16px;
font-weight: 700;
vertical-alignment: center;
}
}
kta := TouchArea { enabled: root.lage.knopf-aktiv; clicked => { root.knopf-gedrueckt(); } }
}
Rectangle {
width: 56px;
border-radius: 6px;
// Not-Aus aktiv: der Knopf loest ihn (gruen, Play); sonst rot mit der Hand.
background: root.lage.not-aus
? (nta.has-hover ? #ffffff26 : #ffffff1a)
: (nta.pressed ? Farbe.rot.darker(0.12) : nta.has-hover ? Farbe.rot.brighter(0.12) : Farbe.rot);
border-width: 1px;
border-color: root.lage.not-aus ? Farbe.gruen : #ffffff59;
animate background { duration: 100ms; }
Icon {
art: root.lage.not-aus ? "play" : "hand";
farbe: root.lage.not-aus ? Farbe.gruen : white;
groesse: 26px;
}
nta := TouchArea { clicked => { root.not-aus(); } }
}
}
if root.lage.port-warnung: Text {
text: "⚠ CoinPoker läuft ohne Debug-Port: Tische öffnen und Selbstheilen gehen nicht. Aufhören, dann neu starten.";
color: Farbe.bernstein;
font-size: 11px;
wrap: word-wrap;
}
// 9) Werkzeugleiste
Rectangle {
height: 60px;
border-radius: 8px;
background: Farbe.karte;
HorizontalLayout {
padding: 4px;
spacing: 2px;
Werkzeugknopf { art: root.lage.pausiert ? "play" : "pause"; titel: root.lage.pausiert ? "Fortsetzen" : "Pause"; aktiv: root.lage.pause-aktiv; geklickt => { root.werkzeug("pause"); } }
Werkzeugknopf { art: "nach-vorn"; titel: "Nach vorn"; aktiv: root.lage.werkzeuge-aktiv; geklickt => { root.werkzeug("tische_vorn"); } }
Werkzeugknopf { art: "anordnen"; titel: "Anordnen"; aktiv: root.lage.werkzeuge-aktiv; geklickt => { root.werkzeug("tische_anordnen"); } }
Werkzeugknopf { art: "foto"; titel: "Foto"; aktiv: root.lage.werkzeuge-aktiv; geklickt => { root.werkzeug("foto"); } }
Werkzeugknopf { art: "schliessen"; titel: "Schließen"; rot: true; aktiv: root.lage.werkzeuge-aktiv; geklickt => { root.werkzeug("tische_schliessen"); } }
}
}
}