diff options
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) { |