diff options
author | rodri <rgl@antares-labs.eu> | 2024-11-07 21:23:15 +0000 |
---|---|---|
committer | rodri <rgl@antares-labs.eu> | 2024-11-07 21:23:15 +0000 |
commit | 1540dd58e53cbda25f8cd920e007aba3f9399da7 (patch) | |
tree | 83587482e52fe1b165808322693f95ccbc9e9702 /dat.h | |
parent | dbf2640b573990cf3377dc65824fc6870a5ee3ff (diff) | |
download | battleship-1540dd58e53cbda25f8cd920e007aba3f9399da7.tar.gz battleship-1540dd58e53cbda25f8cd920e007aba3f9399da7.tar.bz2 battleship-1540dd58e53cbda25f8cd920e007aba3f9399da7.zip |
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.
Diffstat (limited to 'dat.h')
-rw-r--r-- | dat.h | 15 |
1 files changed, 15 insertions, 0 deletions
@@ -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; |