diff options
author | rodri <rgl@antares-labs.eu> | 2023-09-20 13:15:48 +0000 |
---|---|---|
committer | rodri <rgl@antares-labs.eu> | 2023-09-20 13:15:48 +0000 |
commit | 33de2d046acfc7ee42fb71b1804b091f671b098a (patch) | |
tree | 3c19b6a12cf861050701f004c5bad76877eac10e /dat.h | |
parent | a99916512365d68d130c7dfdb3f7ac5e2e0bbe8a (diff) | |
download | battleship-33de2d046acfc7ee42fb71b1804b091f671b098a.tar.gz battleship-33de2d046acfc7ee42fb71b1804b091f671b098a.tar.bz2 battleship-33de2d046acfc7ee42fb71b1804b091f671b098a.zip |
more work on the menulist of matches.
Diffstat (limited to 'dat.h')
-rw-r--r-- | dat.h | 13 |
1 files changed, 10 insertions, 3 deletions
@@ -108,7 +108,7 @@ struct Stands typedef struct Mentry Mentry; typedef struct Mlist Mlist; -typedef struct Matchlist Matchlist; +typedef struct Menulist Menulist; struct Mentry { @@ -123,8 +123,15 @@ struct Mlist int filling; }; -struct Matchlist +struct Menulist { Mlist; - int selected; /* [-1,nitems) where -1 is none */ + char *title; + Rectangle r, sr; /* content and scroll rects */ + int high; /* [-1,nitems) where -1 is none */ + + void (*add)(Menulist*, int, char*); + void (*clear)(Menulist*); + void (*update)(Menulist*, Mousectl*); + void (*draw)(Menulist*, Image*); }; |