diff options
author | ostanton <oliver@stanton.uk.net> | 2025-04-05 20:03:28 +0100 |
---|---|---|
committer | ostanton <oliver@stanton.uk.net> | 2025-04-05 20:03:28 +0100 |
commit | 93d39259cfed341102177f38da58aa249df20789 (patch) | |
tree | 9f5540cd06728b23b0c41ac3c6272c411d0be9c0 /src/all.c | |
parent | 5920354ee9132b87cea62fed2d02fde789c1f8b8 (diff) | |
download | ldjam57-93d39259cfed341102177f38da58aa249df20789.tar |
Thinner sidebar, nice layout
Diffstat (limited to 'src/all.c')
-rw-r--r-- | src/all.c | 9 |
1 files changed, 7 insertions, 2 deletions
@@ -89,9 +89,14 @@ static const Color colors[N_COLORS][4] = { }, }; +#define BUTTON_SIZE 32 +#define BUTTON_SPACING 16 +#define BUTTON_SPACER(i) (BUTTON_SPACING + (BUTTON_SIZE * (i) + (i) * BUTTON_SPACING)) + static const Button buttons[N_BUTTONS] = { - [BUTTON_RETRY] = {.x = 16, .y = 16, .w = 128, .h = 32}, - [BUTTON_BACK] = {.x = 16, .y = 48, .w = 128, .h = 32}, + [BUTTON_CONTINUE] = {.x = BUTTON_SPACING, .y = BUTTON_SPACER(BUTTON_CONTINUE), .w = BUTTON_SIZE, .h = BUTTON_SIZE}, + [BUTTON_RETRY] = {.x = BUTTON_SPACING, .y = BUTTON_SPACER(BUTTON_RETRY), .w = BUTTON_SIZE, .h = BUTTON_SIZE}, + [BUTTON_BACK] = {.x = BUTTON_SPACING, .y = BUTTON_SPACER(BUTTON_BACK), .w = BUTTON_SIZE, .h = BUTTON_SIZE}, }; static DrawList *render(State *state, UI *ui, Arena *a) { |