Back to shtanton's homepage
summaryrefslogtreecommitdiff
path: root/src/all.c
diff options
context:
space:
mode:
authorostanton <oliver@stanton.uk.net>2025-04-05 20:03:28 +0100
committerostanton <oliver@stanton.uk.net>2025-04-05 20:03:28 +0100
commit93d39259cfed341102177f38da58aa249df20789 (patch)
tree9f5540cd06728b23b0c41ac3c6272c411d0be9c0 /src/all.c
parent5920354ee9132b87cea62fed2d02fde789c1f8b8 (diff)
downloadldjam57-93d39259cfed341102177f38da58aa249df20789.tar
Thinner sidebar, nice layout
Diffstat (limited to 'src/all.c')
-rw-r--r--src/all.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/all.c b/src/all.c
index 028289c..d2536b9 100644
--- a/src/all.c
+++ b/src/all.c
@@ -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) {