diff options
-rw-r--r-- | src/main-menu.c | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/src/main-menu.c b/src/main-menu.c index 910ecc6..9583668 100644 --- a/src/main-menu.c +++ b/src/main-menu.c @@ -208,7 +208,33 @@ db_main_menu(void) if (buttons[i + 2]->texture_over == NULL) { goto err; } + if (i > 0) { + buttons[i + 2]->u = buttons[i + 1]; + buttons[i + 1]->d = buttons[i + 2]; + } + buttons[i + 2]->l = NULL; + buttons[i + 2]->r = buttons[0]; + } + + /* Help button links */ + buttons[0]->u = NULL; + buttons[0]->d = buttons[1]; + if (n > 0) { + buttons[0]->l = buttons[2]; + } else { + buttons[0]->l = NULL; + } + buttons[0]->r = NULL; + + /* Quit button links */ + buttons[1]->u = buttons[0]; + buttons[1]->d = NULL; + if (n > 0) { + buttons[1]->l = buttons[2]; + } else { + buttons[1]->l = NULL; } + buttons[1]->r = NULL; SDL_RenderPresent(renderer); SDL_Delay(1000); |