summaryrefslogtreecommitdiffstats
path: root/src/client/view.rs
diff options
context:
space:
mode:
authorsalmonik <salmonik@tuta.io>2026-11-01 21:09:56 +0100
committersalmonik <salmonik@tuta.io>2026-11-01 21:09:56 +0100
commitbf4cf78ab26896faf457273e37d30fc96381c4a4 (patch)
tree71d67c300b6be191016a988ed5338e15c8b1bdd3 /src/client/view.rs
parentv4.1.1: pointer-first betting and visible payouts in the GUI (diff)
downloadzagan-bet-bf4cf78ab26896faf457273e37d30fc96381c4a4.tar.gz
zagan-bet-bf4cf78ab26896faf457273e37d30fc96381c4a4.zip
v4.2.0: wire the GUI to the core, transport and all four games
Phase 4. The egui frontend now shares ClientCore and the client database with the terminal: one background worker owns TLS, trust answers go through a channel, and a 10 s request deadline mirrors the terminal socket timeout. First contact, a changed key and a version mismatch are explicit screens; login can remember the credential and auto-login signs in before the login form appears. Adds the lobby with an update notice, a full-width scrollable history table, and the four games painted from View: slots with reel animation and win lines that stop at the last matching reel, roulette with the hover lattice and wheel spin, blackjack with vector-drawn suits, and a smooth crash curve. Sidebars pin their action block; leaving a live hand or round asks before forfeiting. The header balance holds the staked amount while the reels or wheel turn and only shows the payout when they stop. Refused spins cancel the animation. Live crash multipliers keep full precision for the chart; the terminal still displays two decimals. Verified live against a 4.2.0 server: register, login, auto-login, trust, all four games settling, history (50 rows), logout, disconnect, forfeit confirmation, and the version-mismatch screen. Release: 8.3 MB Linux, 6.8 MB Windows, 61 ms to window, 131 MB idle RSS.
Diffstat (limited to '')
-rw-r--r--src/client/view.rs2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/client/view.rs b/src/client/view.rs
index d2ccadb..4615720 100644
--- a/src/client/view.rs
+++ b/src/client/view.rs
@@ -246,6 +246,7 @@ impl CrashView {
246pub struct LobbyView { 246pub struct LobbyView {
247 pub connected: bool, 247 pub connected: bool,
248 pub user: Option<String>, 248 pub user: Option<String>,
249 pub account: Option<String>,
249 pub balance: Option<i64>, 250 pub balance: Option<i64>,
250 pub games: Vec<(String, String)>, 251 pub games: Vec<(String, String)>,
251 /// Why the last login or registration attempt failed. 252 /// Why the last login or registration attempt failed.
@@ -297,6 +298,7 @@ pub enum Command {
297 MoveCursor(Direction), 298 MoveCursor(Direction),
298 PlaceBet, 299 PlaceBet,
299 PlaceBetAt(BetTarget), 300 PlaceBetAt(BetTarget),
301 RemoveBetAt(BetTarget),
300 ClearBets, 302 ClearBets,
301 SetChip(u64), 303 SetChip(u64),
302 AdjustChip(i64), 304 AdjustChip(i64),