Uncommittete Arbeit der Session "Windows Cockpit GUI Swift migration"
(local_47bddbc0) aus D:\Projects\pokerfreak\cockpit, 1:1 kopiert (36 Dateien:
Sitzungsleiste, Live, Reiter, Einstellungen, Zeitplan, Turnierplan, Zuschauer,
Chips, Diagramm, Bruecke live/reiter, UI-Slint). Basis main 5d4f939.
cargo test --locked -j 4: 142 gruen. Optik nicht geprueft; nicht in den
Live-Branch gemergt.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
1055 lines
43 KiB
Plaintext
1055 lines
43 KiB
Plaintext
// Die Live-Ansicht unter dem Cash-Kopf (Tische.swift `LiveAnsicht`): alle Tische als Chips, je
|
||
// Tisch eine Kachel (Minitisch, Karten, Entscheidung, Gegner), sonst "Bis zum Spielen"; darunter
|
||
// Geld gegen die Stopps und "Gerade eben". Was zu zeigen ist, rechnet src/live.rs.
|
||
|
||
import { Farbe, Icon } from "bausteine.slint";
|
||
import { DKarte, KarteKlein, Verweis } from "reiter.slint";
|
||
|
||
export struct LSitz {
|
||
ux: float, uy: float,
|
||
frei: bool, ich: bool,
|
||
name: string, stack: string, stack-bb: string, rolle: string,
|
||
aktion: string, aktion-farbe: color,
|
||
stil-farbe: color, stil-kuerzel: string,
|
||
draussen: bool,
|
||
}
|
||
export struct LMini {
|
||
mit-tisch: bool,
|
||
sitze: [LSitz],
|
||
board: [DKarte],
|
||
topf: string,
|
||
ring: float,
|
||
ring-text: string,
|
||
ring-farbe: color,
|
||
ring-pfad: string,
|
||
}
|
||
export struct LModus {
|
||
art: int,
|
||
chip: string, chip-farbe: color,
|
||
text: string,
|
||
lage: string, lage-farbe: color,
|
||
striche-gefuellt: int, striche-gesamt: int, anteil: float,
|
||
spur-text: string,
|
||
tasten: [string],
|
||
uhr: string,
|
||
}
|
||
export struct LWert { wert: string, name: string }
|
||
export struct LGegner {
|
||
sitz: int,
|
||
name: string, rolle: string, stack: string,
|
||
stil: string, stil-farbe: color,
|
||
geschaetzt: bool,
|
||
fold: string,
|
||
vertrauen: float, vertrauen-text: string, vertrauen-farbe: color,
|
||
satz: string, satz-leise: bool,
|
||
offen: bool,
|
||
werte: [LWert],
|
||
stichprobe: string,
|
||
draussen: bool,
|
||
}
|
||
export struct LKachel {
|
||
raum: string,
|
||
titel: string,
|
||
zustand: string, zustand-farbe: color,
|
||
netto: string, netto-farbe: color, netto-auf: bool,
|
||
modus: LModus,
|
||
mini: LMini,
|
||
karten: [DKarte],
|
||
aktion: string, equity: string,
|
||
klick: string, klick-farbe: color,
|
||
klartext: string,
|
||
hinweis: string,
|
||
hat-urteil: bool,
|
||
urteil-titel: string, urteil-grund: string, urteil-farbe: color, urteil-setzen: bool,
|
||
gegner: [LGegner],
|
||
platz: string,
|
||
zug-offen: bool,
|
||
hat-foto: bool,
|
||
foto: image,
|
||
}
|
||
export struct LChip { raum: string, titel: string, zeile: string, zeile-farbe: color, punkt: color, am-zug: bool }
|
||
export struct LKnoten { kurz: string, erledigt: bool, aktuell: bool }
|
||
export struct LSkala {
|
||
titel: string, netto: string, netto-farbe: color,
|
||
anteil: float, minus: bool, farbe: color, gross: bool,
|
||
stopp: string, mitte: string, plus: string,
|
||
}
|
||
export struct LMarke { text: string, farbe: color }
|
||
export struct LFeedZeile { zeit: string, karten: [DKarte], schritte: [LMarke], ergebnis: string, farbe: color }
|
||
export struct LFeedBlock { beginn: string, summe: string, summe-farbe: color, zeilen: [LFeedZeile] }
|
||
export struct LiveD {
|
||
anzahl: int,
|
||
fragt-schliessen: bool,
|
||
schliessen-frage: string,
|
||
bereit: bool,
|
||
schritte: [LKnoten],
|
||
naechst: string,
|
||
tun: string,
|
||
hat-sitzung: bool,
|
||
s-wann: string, s-hat-zahl: bool, s-netto: string, s-farbe: color,
|
||
s-raum: string, s-haende: string, s-dauer: string, s-ende: string, s-abbruch: bool,
|
||
such: int,
|
||
such-titel: string,
|
||
such-text: string,
|
||
such-turnier: bool,
|
||
geld-hinweis: string,
|
||
skalen: [LSkala],
|
||
geld-netto: string,
|
||
regeln: [string],
|
||
geld-offen: bool,
|
||
feed-offen: bool,
|
||
}
|
||
|
||
// Zuschauer (ZuschauerAnsicht.swift): je Tisch Minitisch und Zug des Kerns, darunter der Abgleich.
|
||
export struct ZLinie { aktion: string, ev: string, farbe: color }
|
||
export struct ZPlatz {
|
||
raum: string,
|
||
titel: string,
|
||
hat-tisch: bool,
|
||
modus: string, modus-farbe: color,
|
||
mini: LMini,
|
||
am-zug: string,
|
||
hinweis: string,
|
||
gegner: [LGegner],
|
||
hat-zug: bool,
|
||
karten: [DKarte],
|
||
strasse: string,
|
||
aktion: string, equity: string,
|
||
text: string,
|
||
zug-hinweis: string,
|
||
kenn: string,
|
||
linien: [ZLinie],
|
||
reads: [string],
|
||
}
|
||
export struct ZAbgleich { hand: string, urteil: string, urteil-farbe: color, zeilen: [string], unbewertet: string }
|
||
|
||
// ---- kleine Bausteine -----------------------------------------------------------------------
|
||
|
||
component Abzeichen inherits Rectangle {
|
||
in property <string> text;
|
||
in property <color> farbe;
|
||
in property <length> groesse: 10px;
|
||
width: t.preferred-width + 10px;
|
||
height: t.preferred-height + 4px;
|
||
border-radius: self.height / 2;
|
||
background: root.farbe.with-alpha(0.18);
|
||
t := Text { text: root.text; color: root.farbe; font-size: root.groesse; font-weight: 700; }
|
||
}
|
||
|
||
component RollenChip inherits Rectangle {
|
||
in property <string> rolle;
|
||
width: t.preferred-width + 6px;
|
||
height: 12px;
|
||
border-radius: 6px;
|
||
background: root.rolle == "D" ? white : #3b6fd0cc;
|
||
t := Text { text: root.rolle; color: root.rolle == "D" ? black : white; font-size: 8px; font-weight: 800; }
|
||
}
|
||
|
||
// Zeile mit Titel und Chevron: klappt einen Abschnitt auf und zu (EinklappAbschnitt).
|
||
component Einklapp inherits Rectangle {
|
||
in property <string> titel;
|
||
in property <string> hinweis;
|
||
in property <string> symbol;
|
||
in property <bool> offen;
|
||
callback umschalten();
|
||
height: 26px;
|
||
HorizontalLayout {
|
||
spacing: 6px;
|
||
Icon { art: root.symbol; farbe: Farbe.gedaempft; groesse: 12px; y: (parent.height - self.height) / 2; }
|
||
Text { text: root.titel; color: Farbe.gedaempft; font-size: 12px; font-weight: 600; vertical-alignment: center; }
|
||
Text { text: root.hinweis; color: Farbe.text-aus; font-size: 11px; vertical-alignment: center; }
|
||
Rectangle { }
|
||
Icon { art: root.offen ? "runter" : "rechts"; farbe: Farbe.text-aus; groesse: 12px; y: (parent.height - self.height) / 2; }
|
||
}
|
||
TouchArea { clicked => { root.umschalten(); } }
|
||
}
|
||
|
||
component Ueberschrift inherits HorizontalLayout {
|
||
in property <string> titel;
|
||
in property <string> hinweis;
|
||
spacing: 6px;
|
||
padding-top: 4px;
|
||
height: 20px;
|
||
Text { text: root.titel; color: Farbe.gedaempft; font-size: 12px; font-weight: 600; vertical-alignment: center; }
|
||
Text { text: root.hinweis; color: Farbe.text-aus; font-size: 11px; vertical-alignment: center; }
|
||
Rectangle { }
|
||
}
|
||
|
||
component MiniKarte inherits Rectangle {
|
||
in property <DKarte> k;
|
||
width: max(18px, t.preferred-width + 4px);
|
||
height: 22px;
|
||
border-radius: 3px;
|
||
background: #ffffffeb;
|
||
t := Text {
|
||
text: root.k.text;
|
||
color: root.k.rot ? #d02020 : black;
|
||
font-size: 10px;
|
||
font-weight: 700;
|
||
horizontal-alignment: center;
|
||
vertical-alignment: center;
|
||
}
|
||
}
|
||
|
||
// ---- der Minitisch (Tischbild.swift) ----------------------------------------------------------
|
||
|
||
component SitzSchild inherits Rectangle {
|
||
in property <LSitz> s;
|
||
in property <LMini> m;
|
||
width: min(80px, max(52px, inhalt.preferred-width + 8px));
|
||
height: inhalt.preferred-height + 4px;
|
||
border-radius: 6px;
|
||
background: root.s.ich ? #0078d459 : #00000080;
|
||
border-width: root.s.stil-kuerzel != "" ? 1.5px : 0px;
|
||
border-color: root.s.stil-farbe;
|
||
opacity: root.s.draussen ? 0.45 : 1;
|
||
inhalt := VerticalLayout {
|
||
padding-left: 4px;
|
||
padding-right: 4px;
|
||
padding-top: 2px;
|
||
padding-bottom: 2px;
|
||
alignment: center;
|
||
HorizontalLayout {
|
||
spacing: 2px;
|
||
alignment: center;
|
||
if root.s.ich && root.m.ring >= 0: Rectangle {
|
||
width: 12px;
|
||
height: 12px;
|
||
border-radius: 6px;
|
||
background: root.m.ring-farbe;
|
||
}
|
||
if root.s.rolle != "": RollenChip { rolle: root.s.rolle; }
|
||
Text { text: root.s.name; color: Farbe.text; font-size: 9px; font-weight: 600; overflow: elide; max-width: 60px; }
|
||
}
|
||
Text { text: root.s.stack; color: #f2d36be6; font-size: 10px; font-weight: 700; horizontal-alignment: center; }
|
||
if root.s.stack-bb != "": Text { text: root.s.stack-bb; color: #ffffff8c; font-size: 8px; horizontal-alignment: center; }
|
||
if root.s.aktion != "": Text { text: root.s.aktion; color: root.s.aktion-farbe; font-size: 8px; font-weight: 700; horizontal-alignment: center; }
|
||
}
|
||
if root.s.stil-kuerzel != "": Rectangle {
|
||
x: parent.width - self.width + 4px;
|
||
y: -4px;
|
||
width: kz.preferred-width + 4px;
|
||
height: 10px;
|
||
border-radius: 5px;
|
||
background: root.s.stil-farbe;
|
||
kz := Text { text: root.s.stil-kuerzel; color: black; font-size: 7px; font-weight: 800; }
|
||
}
|
||
}
|
||
|
||
// Der eigene Platz ohne Tischdaten: Kreis mit Countdown-Ring.
|
||
component EigenerPlatz inherits Rectangle {
|
||
in property <LMini> m;
|
||
width: 26px;
|
||
height: 26px;
|
||
border-radius: 13px;
|
||
background: #1a2130;
|
||
border-width: root.m.ring < 0 ? 1.5px : 0px;
|
||
border-color: #ffffff59;
|
||
if root.m.ring >= 0: Path {
|
||
width: 100%;
|
||
height: 100%;
|
||
viewbox-width: 100;
|
||
viewbox-height: 100;
|
||
commands: root.m.ring-pfad;
|
||
fill: transparent;
|
||
stroke: root.m.ring-farbe;
|
||
stroke-width: 3px;
|
||
}
|
||
Text {
|
||
text: root.m.ring >= 0 ? root.m.ring-text : "●";
|
||
color: root.m.ring >= 0 ? white : #ffffffb3;
|
||
font-size: root.m.ring >= 0 ? 10px : 8px;
|
||
font-weight: 700;
|
||
}
|
||
}
|
||
|
||
component MiniTisch inherits Rectangle {
|
||
in property <LMini> m;
|
||
property <length> mx: self.width / 2;
|
||
property <length> my: self.height / 2 - 6px;
|
||
property <length> rx: self.width / 2 - (root.m.mit-tisch ? 40px : 22px);
|
||
property <length> ry: self.height / 2 - (root.m.mit-tisch ? 26px : 20px);
|
||
height: root.m.mit-tisch ? 220px : 130px;
|
||
|
||
// Filz-Oval mit Bande
|
||
Rectangle {
|
||
x: root.mx - root.rx - 8px;
|
||
y: root.my - root.ry - 7px;
|
||
width: root.rx * 2 + 16px;
|
||
height: root.ry * 2 + 14px;
|
||
border-radius: self.height / 2;
|
||
// deckend statt Verlauf: der Software-Renderer schneidet einen Verlauf nicht an der Rundung ab
|
||
background: #0b4a32;
|
||
border-width: 5px;
|
||
border-color: #5c3d21;
|
||
Rectangle {
|
||
x: parent.width * 0.12;
|
||
y: parent.height * 0.14;
|
||
width: parent.width * 0.76;
|
||
height: parent.height * 0.72;
|
||
border-radius: self.height / 2;
|
||
background: #12664533;
|
||
}
|
||
}
|
||
// Board in fuenf Feldern, darunter der Topf
|
||
VerticalLayout {
|
||
x: root.mx - self.width / 2;
|
||
y: root.my - self.height / 2;
|
||
width: 5 * 24px + 4 * 3px;
|
||
height: 29px + (root.m.topf != "" ? 23px : 0px);
|
||
spacing: 5px;
|
||
HorizontalLayout {
|
||
spacing: 3px;
|
||
height: 29px;
|
||
for k in root.m.board: Rectangle {
|
||
width: 24px;
|
||
border-radius: 4px;
|
||
background: k.text != "" ? #ffffffeb : transparent;
|
||
border-width: k.text != "" ? 0px : 1px;
|
||
border-color: #ffffff2e;
|
||
Text {
|
||
text: k.text;
|
||
color: k.rot ? #d02020 : black;
|
||
font-size: 10px;
|
||
font-weight: 700;
|
||
}
|
||
}
|
||
}
|
||
if root.m.topf != "": HorizontalLayout {
|
||
alignment: center;
|
||
Rectangle {
|
||
width: tt.preferred-width + 16px;
|
||
height: 18px;
|
||
border-radius: 9px;
|
||
background: #00000059;
|
||
tt := Text { text: root.m.topf; color: white; font-size: 10px; font-weight: 700; }
|
||
}
|
||
}
|
||
}
|
||
// Die Sitze rundherum
|
||
for s in root.m.sitze: Rectangle {
|
||
x: root.mx + root.rx * s.ux - self.width / 2;
|
||
y: root.my + root.ry * s.uy - self.height / 2;
|
||
width: !s.frei ? schild.width : s.ich ? 26px : (root.m.mit-tisch ? 12px : 16px);
|
||
height: !s.frei ? schild.height : s.ich ? 26px : (root.m.mit-tisch ? 12px : 16px);
|
||
schild := SitzSchild { visible: !s.frei; s: s; m: root.m; }
|
||
if s.frei && s.ich: EigenerPlatz { m: root.m; }
|
||
if s.frei && !s.ich: Rectangle {
|
||
border-radius: self.width / 2;
|
||
background: root.m.mit-tisch ? #24303f80 : #24303f;
|
||
border-width: root.m.mit-tisch ? 0px : 1px;
|
||
border-color: #ffffff1f;
|
||
}
|
||
}
|
||
}
|
||
|
||
// ---- Modus, Urteil, Gegner --------------------------------------------------------------------
|
||
|
||
component ModusLeiste inherits VerticalLayout {
|
||
in property <LModus> m;
|
||
spacing: 5px;
|
||
HorizontalLayout {
|
||
spacing: 6px;
|
||
height: 18px;
|
||
Abzeichen { text: root.m.chip; farbe: root.m.chip-farbe; y: (parent.height - self.height) / 2; }
|
||
if root.m.art == 3: HorizontalLayout {
|
||
spacing: 4px;
|
||
for t in root.m.tasten: Rectangle {
|
||
width: tx.preferred-width + 10px;
|
||
border-radius: 4px;
|
||
background: #ffffff10;
|
||
border-width: 1px;
|
||
border-color: Farbe.strich;
|
||
tx := Text { text: t; color: Farbe.hell; font-size: 10px; font-weight: 600; }
|
||
}
|
||
}
|
||
Text { text: root.m.text; color: Farbe.gedaempft; font-size: 11px; vertical-alignment: center; overflow: elide; }
|
||
Rectangle { }
|
||
if root.m.art == 2: Abzeichen { text: root.m.lage; farbe: root.m.lage-farbe; y: (parent.height - self.height) / 2; }
|
||
if root.m.art == 3: Text { text: "⏱ " + root.m.uhr; color: Farbe.gedaempft; font-size: 11px; font-weight: 600; vertical-alignment: center; }
|
||
}
|
||
if root.m.art == 2 && root.m.striche-gesamt != 0: HorizontalLayout {
|
||
spacing: 8px;
|
||
height: 12px;
|
||
Rectangle {
|
||
horizontal-stretch: 1;
|
||
// Striche je Spieler oder ein Anteil (mehr als 40 Spieler)
|
||
if root.m.striche-gesamt > 0: HorizontalLayout {
|
||
spacing: 1px;
|
||
for i in root.m.striche-gesamt: Rectangle {
|
||
border-radius: 1px;
|
||
background: i >= root.m.striche-gesamt - root.m.striche-gefuellt ? root.m.lage-farbe : #ffffff1f;
|
||
}
|
||
}
|
||
if root.m.striche-gesamt < 0: Rectangle {
|
||
height: 6px;
|
||
border-radius: 3px;
|
||
background: #ffffff1f;
|
||
Rectangle {
|
||
x: parent.width * (1 - root.m.anteil);
|
||
width: parent.width * root.m.anteil;
|
||
border-radius: 3px;
|
||
background: root.m.lage-farbe;
|
||
}
|
||
}
|
||
}
|
||
Text { text: root.m.spur-text; color: Farbe.gedaempft; font-size: 10px; vertical-alignment: center; }
|
||
}
|
||
}
|
||
|
||
component UrteilBand inherits Rectangle {
|
||
in property <LKachel> k;
|
||
height: inhalt.preferred-height;
|
||
border-radius: 10px;
|
||
background: root.k.urteil-farbe.with-alpha(0.12);
|
||
inhalt := HorizontalLayout {
|
||
padding: 6px;
|
||
padding-left: 8px;
|
||
spacing: 8px;
|
||
Icon { art: root.k.urteil-setzen ? "schild" : "hand"; farbe: root.k.urteil-farbe; groesse: 16px; y: (parent.height - self.height) / 2; }
|
||
VerticalLayout {
|
||
spacing: 1px;
|
||
Text { text: root.k.urteil-titel; color: root.k.urteil-farbe; font-size: 12px; font-weight: 600; }
|
||
Text { text: root.k.urteil-grund; color: Farbe.gedaempft; font-size: 11px; wrap: word-wrap; }
|
||
}
|
||
}
|
||
}
|
||
|
||
component GegnerKarte inherits Rectangle {
|
||
in property <LGegner> g;
|
||
callback geklickt();
|
||
height: inhalt.preferred-height;
|
||
border-radius: 10px;
|
||
background: ta.has-hover ? #ffffff14 : #ffffff0d;
|
||
border-width: root.g.geschaetzt ? 1px : 0px;
|
||
border-color: root.g.stil-farbe.with-alpha(0.35);
|
||
opacity: root.g.draussen ? 0.55 : 1;
|
||
ta := TouchArea { clicked => { root.geklickt(); } }
|
||
inhalt := VerticalLayout {
|
||
padding: 8px;
|
||
spacing: 4px;
|
||
HorizontalLayout {
|
||
spacing: 6px;
|
||
height: 16px;
|
||
if root.g.rolle != "": RollenChip { rolle: root.g.rolle; y: (parent.height - self.height) / 2; }
|
||
Text { text: root.g.name; color: Farbe.text; font-size: 12px; font-weight: 600; overflow: elide; vertical-alignment: center; }
|
||
Rectangle { }
|
||
Text { text: root.g.stack; color: #f2d36be6; font-size: 12px; font-weight: 600; vertical-alignment: center; }
|
||
Icon { art: root.g.offen ? "rauf" : "runter"; farbe: Farbe.text-aus; groesse: 10px; y: (parent.height - self.height) / 2; }
|
||
}
|
||
if root.g.geschaetzt: HorizontalLayout {
|
||
spacing: 8px;
|
||
height: 16px;
|
||
Abzeichen { text: root.g.stil; farbe: root.g.stil-farbe; y: (parent.height - self.height) / 2; }
|
||
if root.g.fold != "": Text { text: "↩ " + root.g.fold; color: Farbe.gedaempft; font-size: 11px; vertical-alignment: center; }
|
||
Rectangle { }
|
||
Rectangle {
|
||
width: 22px;
|
||
height: 4px;
|
||
y: (parent.height - self.height) / 2;
|
||
border-radius: 2px;
|
||
background: #ffffff1f;
|
||
Rectangle { x: 0; width: parent.width * root.g.vertrauen; border-radius: 2px; background: root.g.vertrauen-farbe; }
|
||
}
|
||
Text { text: root.g.vertrauen-text; color: root.g.vertrauen-farbe; font-size: 9px; font-weight: 500; vertical-alignment: center; }
|
||
}
|
||
Text {
|
||
text: root.g.satz;
|
||
color: root.g.satz-leise ? Farbe.text-aus : #ffffffd9;
|
||
font-size: 11px;
|
||
wrap: word-wrap;
|
||
}
|
||
if root.g.offen: VerticalLayout {
|
||
spacing: 4px;
|
||
padding-top: 2px;
|
||
Rectangle {
|
||
height: Math.ceil(root.g.werte.length / 4) * 30px;
|
||
for w[i] in root.g.werte: VerticalLayout {
|
||
x: Math.mod(i, 4) * (parent.width / 4);
|
||
y: Math.floor(i / 4) * 30px;
|
||
width: parent.width / 4 - 4px;
|
||
height: 28px;
|
||
Text { text: w.wert; color: Farbe.text; font-size: 12px; font-weight: 600; }
|
||
Text { text: w.name; color: Farbe.gedaempft; font-size: 9px; overflow: elide; }
|
||
}
|
||
}
|
||
Text { text: root.g.stichprobe; color: Farbe.text-aus; font-size: 9px; wrap: word-wrap; }
|
||
}
|
||
}
|
||
}
|
||
|
||
// ---- die Kachel eines Tisches -----------------------------------------------------------------
|
||
|
||
component SymbolKnopf inherits Rectangle {
|
||
in property <string> art;
|
||
callback geklickt();
|
||
width: 22px;
|
||
height: 22px;
|
||
border-radius: 4px;
|
||
background: ta.has-hover ? Farbe.schwebe : transparent;
|
||
Icon { art: root.art; farbe: Farbe.gedaempft; groesse: 13px; }
|
||
ta := TouchArea { clicked => { root.geklickt(); } }
|
||
}
|
||
|
||
component KachelAnsicht inherits Rectangle {
|
||
in property <LKachel> k;
|
||
callback vorn();
|
||
callback foto();
|
||
callback schliessen();
|
||
callback gegner-geklickt(int);
|
||
height: inhalt.preferred-height;
|
||
border-radius: 16px;
|
||
background: ta.pressed ? #ffffff1a : ta.has-hover ? #ffffff17 : #ffffff0d;
|
||
border-width: root.k.zug-offen ? 1.5px : 0px;
|
||
border-color: Farbe.bernstein.mix(#ff8c00, 0.3);
|
||
// Ein Klick irgendwo auf die Kachel holt den Tisch nach vorn.
|
||
ta := TouchArea { clicked => { root.vorn(); } }
|
||
inhalt := VerticalLayout {
|
||
padding: 10px;
|
||
spacing: 7px;
|
||
HorizontalLayout {
|
||
spacing: 6px;
|
||
height: 22px;
|
||
Text { text: root.k.titel; color: Farbe.text; font-size: 14px; font-weight: 600; overflow: elide; vertical-alignment: center; }
|
||
if root.k.zustand != "": Abzeichen { text: root.k.zustand; farbe: root.k.zustand-farbe; y: (parent.height - self.height) / 2; }
|
||
Rectangle { }
|
||
if root.k.netto != "": Abzeichen {
|
||
text: (root.k.netto-auf ? "↗ " : "↘ ") + root.k.netto;
|
||
farbe: root.k.netto-farbe;
|
||
groesse: 11px;
|
||
y: (parent.height - self.height) / 2;
|
||
}
|
||
SymbolKnopf { art: "foto"; geklickt => { root.foto(); } }
|
||
SymbolKnopf { art: "x"; geklickt => { root.schliessen(); } }
|
||
}
|
||
if root.k.modus.art != 0: ModusLeiste { m: root.k.modus; }
|
||
MiniTisch { m: root.k.mini; }
|
||
HorizontalLayout {
|
||
spacing: 10px;
|
||
if root.k.karten.length > 0: HorizontalLayout {
|
||
spacing: 4px;
|
||
for c in root.k.karten: Rectangle {
|
||
width: 34px;
|
||
height: 46px;
|
||
border-radius: 5px;
|
||
background: #ffffffeb;
|
||
Text { text: c.text; color: c.rot ? #d02020 : black; font-size: 15px; font-weight: 800; }
|
||
}
|
||
}
|
||
VerticalLayout {
|
||
spacing: 3px;
|
||
alignment: start;
|
||
if root.k.aktion != "": HorizontalLayout {
|
||
spacing: 6px;
|
||
Text { text: root.k.aktion; color: Farbe.text; font-size: 14px; font-weight: 600; }
|
||
if root.k.equity != "": Text { text: root.k.equity; color: Farbe.gedaempft; font-size: 12px; vertical-alignment: center; }
|
||
Rectangle { }
|
||
Text { text: root.k.klick; color: root.k.klick-farbe; font-size: 14px; font-weight: 700; }
|
||
}
|
||
if root.k.aktion != "" && root.k.klartext != "": Text {
|
||
text: root.k.klartext;
|
||
color: Farbe.gedaempft;
|
||
font-size: 12px;
|
||
wrap: word-wrap;
|
||
}
|
||
if root.k.aktion == "": Text { text: root.k.hinweis; color: Farbe.gedaempft; font-size: 12px; wrap: word-wrap; }
|
||
}
|
||
}
|
||
if root.k.gegner.length > 0: VerticalLayout {
|
||
spacing: 5px;
|
||
if root.k.hat-urteil: UrteilBand { k: root.k; }
|
||
HorizontalLayout {
|
||
height: 14px;
|
||
Text { text: "Was ich über die Gegner denke"; color: Farbe.gedaempft; font-size: 10px; font-weight: 600; vertical-alignment: center; }
|
||
Rectangle { }
|
||
Text { text: "antippen: alle Werte"; color: Farbe.text-aus; font-size: 9px; vertical-alignment: center; }
|
||
}
|
||
for g in root.k.gegner: GegnerKarte { g: g; geklickt => { root.gegner-geklickt(g.sitz); } }
|
||
}
|
||
if root.k.platz != "": Text { text: root.k.platz; color: Farbe.text-aus; font-size: 10px; }
|
||
if root.k.hat-foto: Image {
|
||
source: root.k.foto;
|
||
height: 200px;
|
||
image-fit: contain;
|
||
}
|
||
}
|
||
}
|
||
|
||
// ---- Chips, Bereit, Suche, Geld, Gerade eben ---------------------------------------------------
|
||
|
||
component TischChip inherits Rectangle {
|
||
in property <LChip> c;
|
||
callback geklickt();
|
||
width: 104px;
|
||
height: 42px;
|
||
border-radius: 10px;
|
||
background: ta.has-hover ? #ffffff1f : #ffffff0f;
|
||
border-width: root.c.am-zug ? 1.5px : 0px;
|
||
border-color: #ff9a2e;
|
||
ta := TouchArea { clicked => { root.geklickt(); } }
|
||
VerticalLayout {
|
||
padding-left: 8px;
|
||
padding-right: 8px;
|
||
padding-top: 6px;
|
||
padding-bottom: 6px;
|
||
spacing: 3px;
|
||
HorizontalLayout {
|
||
spacing: 4px;
|
||
Rectangle { width: 6px; height: 6px; y: (parent.height - self.height) / 2; border-radius: 3px; background: root.c.punkt; }
|
||
Text { text: root.c.titel; color: Farbe.text; font-size: 10px; font-weight: 600; overflow: elide; }
|
||
}
|
||
Text { text: root.c.zeile; color: root.c.zeile-farbe; font-size: 10px; font-weight: 600; overflow: elide; }
|
||
}
|
||
}
|
||
|
||
component Schrittleiste inherits Rectangle {
|
||
in property <LiveD> l;
|
||
height: inhalt.preferred-height;
|
||
border-radius: 14px;
|
||
background: #ffffff0d;
|
||
inhalt := VerticalLayout {
|
||
padding: 12px;
|
||
spacing: 12px;
|
||
Rectangle {
|
||
height: 50px;
|
||
for p[i] in root.l.schritte: Rectangle {
|
||
property <length> abstand: (parent.width - 32px) / max(1, root.l.schritte.length - 1);
|
||
x: i * self.abstand;
|
||
width: 32px;
|
||
// Verbindungslinie zum vorigen Knoten
|
||
if i > 0: Rectangle {
|
||
x: 32px - parent.abstand + 4px;
|
||
y: 15px;
|
||
width: parent.abstand - 40px;
|
||
height: 2px;
|
||
border-radius: 1px;
|
||
background: p.erledigt ? #6ccb5a99 : #ffffff1f;
|
||
}
|
||
Rectangle {
|
||
y: 0;
|
||
width: 32px;
|
||
height: 32px;
|
||
border-radius: 16px;
|
||
background: p.erledigt ? #6ccb5a2e : p.aktuell ? #60cdff33 : #ffffff0f;
|
||
border-width: p.aktuell ? 2px : 1px;
|
||
border-color: p.erledigt ? #6ccb5ae6 : p.aktuell ? Farbe.akzent : #ffffff4d;
|
||
Text {
|
||
text: p.erledigt ? "✓" : (i + 1);
|
||
color: p.erledigt ? Farbe.gruen : p.aktuell ? Farbe.akzent : Farbe.gedaempft;
|
||
font-size: 13px;
|
||
font-weight: 700;
|
||
}
|
||
}
|
||
Text {
|
||
y: 37px;
|
||
// die Randknoten buendig, damit das Wort nicht aus der Leiste ragt
|
||
x: i == 0 ? 0 : i == root.l.schritte.length - 1 ? 32px - self.width : (32px - self.width) / 2;
|
||
text: p.kurz;
|
||
color: p.aktuell ? Farbe.text : Farbe.gedaempft;
|
||
font-size: 10px;
|
||
font-weight: p.aktuell ? 600 : 400;
|
||
}
|
||
}
|
||
}
|
||
if root.l.naechst != "": Rectangle {
|
||
height: nx.preferred-height;
|
||
border-radius: 10px;
|
||
background: #0078d41f;
|
||
nx := VerticalLayout {
|
||
padding: 10px;
|
||
spacing: 2px;
|
||
Text { text: "→ " + root.l.naechst; color: Farbe.text; font-size: 13px; font-weight: 600; }
|
||
Text { text: root.l.tun; color: Farbe.gedaempft; font-size: 11px; wrap: word-wrap; }
|
||
}
|
||
}
|
||
if root.l.naechst == "": Text { text: "✓ Alles bereit"; color: Farbe.gruen; font-size: 13px; font-weight: 600; }
|
||
}
|
||
}
|
||
|
||
component SitzungsKarte inherits Rectangle {
|
||
in property <LiveD> l;
|
||
height: inhalt.preferred-height;
|
||
border-radius: 14px;
|
||
background: #ffffff0d;
|
||
inhalt := HorizontalLayout {
|
||
padding: 12px;
|
||
spacing: 14px;
|
||
if root.l.s-hat-zahl: VerticalLayout {
|
||
alignment: center;
|
||
Text { text: root.l.s-netto; color: root.l.s-farbe; font-size: 28px; font-weight: 700; }
|
||
Text { text: "bb"; color: Farbe.gedaempft; font-size: 11px; font-weight: 600; }
|
||
}
|
||
if root.l.s-hat-zahl: VerticalLayout {
|
||
alignment: center;
|
||
spacing: 4px;
|
||
Text { text: "▦ " + root.l.s-raum; color: Farbe.gedaempft; font-size: 11px; overflow: elide; }
|
||
Text { text: "≡ " + root.l.s-haende; color: Farbe.gedaempft; font-size: 11px; }
|
||
if root.l.s-dauer != "": Text { text: "◷ " + root.l.s-dauer; color: Farbe.gedaempft; font-size: 11px; }
|
||
}
|
||
Rectangle { }
|
||
if root.l.s-ende != "": Rectangle {
|
||
width: 92px;
|
||
height: et.preferred-height + 16px;
|
||
y: (parent.height - self.height) / 2;
|
||
border-radius: 10px;
|
||
background: root.l.s-abbruch ? #e8605a1f : #ffffff0d;
|
||
et := Text {
|
||
width: 84px;
|
||
text: root.l.s-ende;
|
||
color: root.l.s-abbruch ? Farbe.rot-hell : Farbe.gedaempft;
|
||
font-size: 10px;
|
||
font-weight: 500;
|
||
wrap: word-wrap;
|
||
horizontal-alignment: center;
|
||
}
|
||
}
|
||
}
|
||
}
|
||
|
||
component SuchKachel inherits Rectangle {
|
||
in property <LiveD> l;
|
||
height: inhalt.preferred-height;
|
||
border-radius: 10px;
|
||
border-width: 1px;
|
||
border-color: #ffffff40;
|
||
inhalt := VerticalLayout {
|
||
padding: 10px;
|
||
spacing: 6px;
|
||
HorizontalLayout {
|
||
spacing: 6px;
|
||
Icon { art: root.l.such-turnier ? "pokal" : "punkte"; farbe: Farbe.gedaempft; groesse: 14px; y: (parent.height - self.height) / 2; }
|
||
Text { text: root.l.such-titel; color: Farbe.text; font-size: 13px; font-weight: 500; }
|
||
Rectangle { }
|
||
}
|
||
Text { text: root.l.such-text; color: Farbe.gedaempft; font-size: 11px; wrap: word-wrap; }
|
||
}
|
||
}
|
||
|
||
component StopSkala inherits VerticalLayout {
|
||
in property <LSkala> s;
|
||
spacing: 5px;
|
||
HorizontalLayout {
|
||
Text { text: root.s.titel; color: Farbe.text; font-size: root.s.gross ? 13px : 11px; font-weight: root.s.gross ? 600 : 400; overflow: elide; }
|
||
Rectangle { }
|
||
Text { text: root.s.netto; color: root.s.netto-farbe; font-size: root.s.gross ? 13px : 11px; font-weight: 600; }
|
||
}
|
||
Rectangle {
|
||
height: root.s.gross ? 10px : 6px;
|
||
border-radius: self.height / 2;
|
||
background: #ffffff12;
|
||
clip: true;
|
||
// Gefahrenzone: das letzte Viertel vor dem Stopp
|
||
Rectangle { x: 0; width: parent.width / 2 * 0.25; background: #e8605a1f; }
|
||
Rectangle {
|
||
property <length> breite: max(3px, parent.width / 2 * root.s.anteil);
|
||
x: root.s.minus ? parent.width / 2 - self.breite : parent.width / 2;
|
||
width: self.breite;
|
||
border-radius: parent.height / 2;
|
||
background: root.s.farbe;
|
||
}
|
||
Rectangle { x: parent.width / 2 - 0.75px; width: 1.5px; background: #ffffff80; }
|
||
}
|
||
if root.s.gross: HorizontalLayout {
|
||
Text { text: root.s.stopp; color: #e8605acc; font-size: 9.5px; }
|
||
Rectangle { }
|
||
Text { text: root.s.mitte; color: Farbe.gedaempft; font-size: 9.5px; }
|
||
Rectangle { }
|
||
Text { text: root.s.plus; color: Farbe.text-aus; font-size: 9.5px; }
|
||
}
|
||
}
|
||
|
||
component GeldUebersicht inherits Rectangle {
|
||
in property <LiveD> l;
|
||
height: inhalt.preferred-height;
|
||
border-radius: 14px;
|
||
background: #ffffff0d;
|
||
inhalt := VerticalLayout {
|
||
padding: 12px;
|
||
spacing: 12px;
|
||
for s in root.l.skalen: StopSkala { s: s; }
|
||
if root.l.skalen.length == 0: Text { text: "Keine laufende Sitzung"; color: Farbe.gedaempft; font-size: 12px; }
|
||
if root.l.geld-netto != "": Text { text: root.l.geld-netto; color: Farbe.gedaempft; font-size: 11px; wrap: word-wrap; }
|
||
if root.l.regeln.length > 0: Rectangle {
|
||
// Marken umbrechen: zwei je Zeile reichen in der schmalen Spalte
|
||
height: Math.ceil(root.l.regeln.length / 2) * 24px;
|
||
for r[i] in root.l.regeln: Rectangle {
|
||
x: Math.mod(i, 2) * (parent.width / 2);
|
||
y: Math.floor(i / 2) * 24px;
|
||
width: min(parent.width / 2 - 5px, rt.preferred-width + 14px);
|
||
height: 19px;
|
||
border-radius: 9.5px;
|
||
background: #ffffff0f;
|
||
rt := Text { text: r; color: Farbe.gedaempft; font-size: 10px; font-weight: 500; overflow: elide; }
|
||
}
|
||
}
|
||
}
|
||
}
|
||
|
||
component FeedZeileAnsicht inherits Rectangle {
|
||
in property <LFeedZeile> zeile;
|
||
height: 32px;
|
||
border-radius: 8px;
|
||
background: ta.has-hover ? #ffffff12 : #ffffff08;
|
||
ta := TouchArea { }
|
||
HorizontalLayout {
|
||
padding-left: 6px;
|
||
padding-right: 6px;
|
||
spacing: 8px;
|
||
Text { text: root.zeile.zeit; color: Farbe.text-aus; font-size: 10px; width: 32px; vertical-alignment: center; }
|
||
HorizontalLayout {
|
||
spacing: 2px;
|
||
for c in root.zeile.karten: MiniKarte { k: c; y: (parent.height - self.height) / 2; }
|
||
}
|
||
HorizontalLayout {
|
||
spacing: 3px;
|
||
for s[i] in root.zeile.schritte: HorizontalLayout {
|
||
spacing: 3px;
|
||
if i > 0: Text { text: "›"; color: Farbe.text-aus; font-size: 10px; vertical-alignment: center; }
|
||
Rectangle {
|
||
width: mt.preferred-width + 10px;
|
||
height: 17px;
|
||
y: (parent.height - self.height) / 2;
|
||
border-radius: 8.5px;
|
||
background: s.farbe.with-alpha(0.15);
|
||
mt := Text { text: s.text; color: s.farbe; font-size: 10px; font-weight: 600; }
|
||
}
|
||
}
|
||
}
|
||
Rectangle { }
|
||
Text { text: root.zeile.ergebnis; color: root.zeile.farbe; font-size: 12px; font-weight: 600; vertical-alignment: center; }
|
||
}
|
||
}
|
||
|
||
export component LiveInhalt inherits VerticalLayout {
|
||
in property <LiveD> l;
|
||
in property <[LChip]> chips;
|
||
in property <[LKachel]> kacheln;
|
||
in property <[LFeedBlock]> feed;
|
||
callback vorn(string);
|
||
callback foto(string);
|
||
callback schliessen(string);
|
||
callback gegner-geklickt(string, int);
|
||
callback alle-schliessen(bool);
|
||
callback geld-umschalten();
|
||
callback feed-umschalten();
|
||
callback alle-haende();
|
||
spacing: 10px;
|
||
|
||
if root.l.fragt-schliessen: Rectangle {
|
||
height: fr.preferred-height;
|
||
border-radius: 10px;
|
||
background: #c42b1c1f;
|
||
fr := HorizontalLayout {
|
||
padding: 8px;
|
||
spacing: 8px;
|
||
Text { text: root.l.schliessen-frage; color: Farbe.text; font-size: 11px; wrap: word-wrap; vertical-alignment: center; }
|
||
Rectangle {
|
||
width: ab.preferred-width + 16px;
|
||
height: 26px;
|
||
y: (parent.height - self.height) / 2;
|
||
border-radius: 4px;
|
||
background: abt.has-hover ? Farbe.feld-schwebe : Farbe.feld;
|
||
ab := Text { text: "Abbrechen"; color: Farbe.text; font-size: 11px; }
|
||
abt := TouchArea { clicked => { root.alle-schliessen(false); } }
|
||
}
|
||
Rectangle {
|
||
width: sb.preferred-width + 16px;
|
||
height: 26px;
|
||
y: (parent.height - self.height) / 2;
|
||
border-radius: 4px;
|
||
background: sbt.has-hover ? Farbe.rot.brighter(0.12) : Farbe.rot;
|
||
sb := Text { text: "Schließen"; color: white; font-size: 11px; font-weight: 600; }
|
||
sbt := TouchArea { clicked => { root.alle-schliessen(true); } }
|
||
}
|
||
}
|
||
}
|
||
|
||
// alle Tische auf einen Blick, ab zwei
|
||
if root.chips.length > 1: VerticalLayout {
|
||
spacing: 4px;
|
||
Text { text: "Alle Tische (" + root.chips.length + ")"; color: Farbe.gedaempft; font-size: 10px; font-weight: 500; }
|
||
Flickable {
|
||
height: 44px;
|
||
content-width: root.chips.length * 110px;
|
||
interactive: true;
|
||
HorizontalLayout {
|
||
spacing: 6px;
|
||
alignment: start;
|
||
for c in root.chips: TischChip { c: c; geklickt => { root.vorn(c.raum); } }
|
||
}
|
||
}
|
||
}
|
||
|
||
if root.l.bereit: VerticalLayout {
|
||
spacing: 10px;
|
||
Ueberschrift { titel: "Bis zum Spielen"; }
|
||
Schrittleiste { l: root.l; }
|
||
if root.l.hat-sitzung: Ueberschrift { titel: "Letzte Sitzung"; hinweis: root.l.s-wann; }
|
||
if root.l.hat-sitzung: SitzungsKarte { l: root.l; }
|
||
}
|
||
if !root.l.bereit: Ueberschrift { titel: "Tische"; hinweis: "Klick holt nach vorn"; }
|
||
for k in root.kacheln: KachelAnsicht {
|
||
k: k;
|
||
vorn => { root.vorn(k.raum); }
|
||
foto => { root.foto(k.raum); }
|
||
schliessen => { root.schliessen(k.raum); }
|
||
gegner-geklickt(s) => { root.gegner-geklickt(k.raum, s); }
|
||
}
|
||
for i in root.l.such: SuchKachel { l: root.l; }
|
||
|
||
Einklapp {
|
||
titel: "Geld";
|
||
symbol: "schein";
|
||
hinweis: root.l.geld-hinweis;
|
||
offen: root.l.geld-offen;
|
||
umschalten => { root.geld-umschalten(); }
|
||
}
|
||
if root.l.geld-offen: GeldUebersicht { l: root.l; }
|
||
|
||
Einklapp {
|
||
titel: "Gerade eben";
|
||
symbol: "uhr";
|
||
offen: root.l.feed-offen;
|
||
umschalten => { root.feed-umschalten(); }
|
||
}
|
||
if root.l.feed-offen && root.feed.length == 0: Text { text: "Noch keine Hand gespielt"; color: Farbe.gedaempft; font-size: 12px; }
|
||
if root.l.feed-offen && root.feed.length > 0: VerticalLayout {
|
||
spacing: 10px;
|
||
for b in root.feed: VerticalLayout {
|
||
spacing: 4px;
|
||
HorizontalLayout {
|
||
spacing: 6px;
|
||
height: 16px;
|
||
Text { text: b.beginn; color: Farbe.gedaempft; font-size: 10px; font-weight: 600; vertical-alignment: center; }
|
||
Rectangle { Rectangle { height: 1px; background: #ffffff1a; } }
|
||
if b.summe != "": Text { text: b.summe; color: b.summe-farbe; font-size: 10px; vertical-alignment: center; }
|
||
}
|
||
for z in b.zeilen: FeedZeileAnsicht { zeile: z; }
|
||
}
|
||
HorizontalLayout {
|
||
alignment: center;
|
||
Verweis { text: "≡ Alle Hände"; height: 20px; geklickt => { root.alle-haende(); } }
|
||
}
|
||
}
|
||
}
|
||
|
||
// ---- Zuschauer ----------------------------------------------------------------------------------
|
||
|
||
component ZuschauerTischKarte inherits Rectangle {
|
||
in property <ZPlatz> p;
|
||
callback gegner-geklickt(int);
|
||
height: inhalt.preferred-height;
|
||
border-radius: 16px;
|
||
background: #ffffff0d;
|
||
inhalt := VerticalLayout {
|
||
padding: 10px;
|
||
spacing: 7px;
|
||
HorizontalLayout {
|
||
spacing: 6px;
|
||
height: 22px;
|
||
Text { text: root.p.titel; color: Farbe.text; font-size: 14px; font-weight: 600; overflow: elide; vertical-alignment: center; }
|
||
Abzeichen { text: root.p.modus; farbe: root.p.modus-farbe; y: (parent.height - self.height) / 2; }
|
||
Rectangle { }
|
||
}
|
||
MiniTisch { m: root.p.mini; }
|
||
if root.p.am-zug != "": Text { text: root.p.am-zug; color: Farbe.gedaempft; font-size: 12px; }
|
||
if root.p.hinweis != "": Text { text: root.p.hinweis; color: Farbe.gedaempft; font-size: 12px; wrap: word-wrap; }
|
||
if root.p.gegner.length > 0: VerticalLayout {
|
||
spacing: 5px;
|
||
HorizontalLayout {
|
||
height: 14px;
|
||
Text { text: "Was ich über die Gegner denke"; color: Farbe.gedaempft; font-size: 10px; font-weight: 600; vertical-alignment: center; }
|
||
Rectangle { }
|
||
Text { text: "antippen: alle Werte"; color: Farbe.text-aus; font-size: 9px; vertical-alignment: center; }
|
||
}
|
||
for g in root.p.gegner: GegnerKarte { g: g; geklickt => { root.gegner-geklickt(g.sitz); } }
|
||
}
|
||
}
|
||
}
|
||
|
||
component Teiler inherits Rectangle {
|
||
height: 1px;
|
||
background: #ffffff1a;
|
||
}
|
||
|
||
component ZuschauerZugKarte inherits Rectangle {
|
||
in property <ZPlatz> p;
|
||
height: inhalt.preferred-height;
|
||
border-radius: 16px;
|
||
background: #ffffff0d;
|
||
inhalt := VerticalLayout {
|
||
padding: 10px;
|
||
spacing: 7px;
|
||
HorizontalLayout {
|
||
spacing: 4px;
|
||
for c in root.p.karten: Rectangle {
|
||
width: 34px;
|
||
height: 46px;
|
||
border-radius: 5px;
|
||
background: #ffffffeb;
|
||
Text { text: c.text; color: c.rot ? #d02020 : black; font-size: 15px; font-weight: 800; }
|
||
}
|
||
Rectangle { }
|
||
Text { text: root.p.strasse; color: Farbe.text-aus; font-size: 10px; vertical-alignment: top; }
|
||
}
|
||
if root.p.aktion != "": HorizontalLayout {
|
||
spacing: 6px;
|
||
Text { text: root.p.aktion; color: Farbe.text; font-size: 14px; font-weight: 600; }
|
||
if root.p.equity != "": Text { text: root.p.equity; color: Farbe.gedaempft; font-size: 12px; vertical-alignment: center; }
|
||
Rectangle { }
|
||
}
|
||
if root.p.text != "": Text { text: root.p.text; color: Farbe.gedaempft; font-size: 12px; wrap: word-wrap; }
|
||
if root.p.zug-hinweis != "": Text { text: root.p.zug-hinweis; color: Farbe.gedaempft; font-size: 12px; wrap: word-wrap; }
|
||
if root.p.kenn != "": Text { text: root.p.kenn; color: Farbe.text-aus; font-size: 10px; }
|
||
if root.p.linien.length > 0: Teiler { }
|
||
if root.p.linien.length > 0: Text { text: "EV je Linie"; color: Farbe.gedaempft; font-size: 10px; font-weight: 600; }
|
||
for l in root.p.linien: HorizontalLayout {
|
||
Text { text: l.aktion; color: Farbe.text; font-size: 12px; }
|
||
Rectangle { }
|
||
Text { text: l.ev; color: l.farbe; font-size: 12px; }
|
||
}
|
||
if root.p.reads.length > 0: Teiler { }
|
||
if root.p.reads.length > 0: Text { text: "Reads"; color: Farbe.gedaempft; font-size: 10px; font-weight: 600; }
|
||
for r in root.p.reads: Text { text: r; color: Farbe.text; font-size: 12px; wrap: word-wrap; }
|
||
}
|
||
}
|
||
|
||
component AbgleichZeile inherits Rectangle {
|
||
in property <ZAbgleich> a;
|
||
height: inhalt.preferred-height;
|
||
border-radius: 10px;
|
||
background: #ffffff0d;
|
||
inhalt := VerticalLayout {
|
||
padding: 8px;
|
||
spacing: 3px;
|
||
HorizontalLayout {
|
||
spacing: 6px;
|
||
Text { text: root.a.hand; color: Farbe.text; font-size: 12px; font-weight: 600; overflow: elide; }
|
||
Rectangle { }
|
||
Text { text: root.a.urteil; color: root.a.urteil-farbe; font-size: 12px; }
|
||
}
|
||
for z in root.a.zeilen: Text { text: z; color: Farbe.gedaempft; font-size: 10px; wrap: word-wrap; }
|
||
if root.a.unbewertet != "": Text { text: root.a.unbewertet; color: Farbe.text-aus; font-size: 10px; }
|
||
}
|
||
}
|
||
|
||
export component ZuschauerInhalt inherits VerticalLayout {
|
||
in property <string> leer;
|
||
in property <[ZPlatz]> plaetze;
|
||
in property <[ZAbgleich]> abgleich;
|
||
callback gegner-geklickt(string, int);
|
||
spacing: 10px;
|
||
Ueberschrift { titel: "Zuschauer"; hinweis: "was der Läufer täte - er klickt nicht"; }
|
||
if root.leer != "": Text { text: root.leer; color: Farbe.gedaempft; font-size: 12px; wrap: word-wrap; }
|
||
for p in root.plaetze: VerticalLayout {
|
||
spacing: 10px;
|
||
if p.hat-tisch: ZuschauerTischKarte { p: p; gegner-geklickt(s) => { root.gegner-geklickt(p.raum, s); } }
|
||
if p.hat-zug: ZuschauerZugKarte { p: p; }
|
||
}
|
||
if root.abgleich.length > 0: VerticalLayout {
|
||
spacing: 6px;
|
||
Ueberschrift { titel: "Abgleich"; hinweis: "du gegen den Kern, nur Chips"; }
|
||
for a in root.abgleich: AbgleichZeile { a: a; }
|
||
}
|
||
}
|