Back to shtanton's homepage
summaryrefslogtreecommitdiff
path: root/src/all.c
diff options
context:
space:
mode:
authorCharlie Stanton <charlie@shtanton.xyz>2025-04-05 22:16:26 +0100
committerCharlie Stanton <charlie@shtanton.xyz>2025-04-05 22:16:26 +0100
commit8701a3d42c86aada738bfb3b5f817e6e1ce12a47 (patch)
tree79b9b7d239ff7b431fd6a50119061a9394bd2d15 /src/all.c
parent7bb8b8c7670728b0dcd510d8a8205bb3776368dd (diff)
parent3fba436a0b83cce81353e3b170621a1632d8b219 (diff)
downloadldjam57-8701a3d42c86aada738bfb3b5f817e6e1ce12a47.tar
Merge branch 'main' of codeberg.org:shtanton/ldjam57
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 b1560a5..e5c86db 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) {