diff options
Diffstat (limited to 'src/gui/src/button.c')
| -rw-r--r-- | src/gui/src/button.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/gui/src/button.c b/src/gui/src/button.c index eed744c..552a49c 100644 --- a/src/gui/src/button.c +++ b/src/gui/src/button.c @@ -151,12 +151,22 @@ static int update(struct gui_common *const g, return 0; } +static void get_dim(const struct gui_common *const g, + short *const w, short *const h) +{ + const struct gui_button *const b = (const struct gui_button *)g; + + *w = b->w; + *h = refs[GUI_BUTTON_MID].h; +} + void gui_button_init(struct gui_button *const b) { *b = (const struct gui_button) { .common = { + .get_dim = get_dim, .update = update, .render = render } |
