From 1540dd58e53cbda25f8cd920e007aba3f9399da7 Mon Sep 17 00:00:00 2001 From: rodri Date: Thu, 7 Nov 2024 21:23:15 +0000 Subject: bts: use buttons to select the game mode (removes -a option). now pressing q in a screen other than the main one (Waiting0) forces a reconnection, effectively resetting the game. --- dat.h | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'dat.h') diff --git a/dat.h b/dat.h index 07b7dd3..fba1c16 100644 --- a/dat.h +++ b/dat.h @@ -32,7 +32,12 @@ enum { ACalibrating, ABombing, + BRest = 0, + BHover, + Boardmargin = 50, + Btnborder = 4, + Btnpadding = 2, TW = 16, TH = TW, MAPW = 17, @@ -163,6 +168,16 @@ struct MatchInfo char conclusion[16]; }; +typedef struct Button Button; + +struct Button +{ + char *label; + Rectangle r; + int status; + void (*handler)(Button*); +}; + typedef struct Mentry Mentry; typedef struct Mlist Mlist; typedef struct Menulist Menulist; -- cgit v1.2.3