Refactor/blind select screen (#461)

Refactor Blind Select Screen.

Based on #363
---------

Co-authored-by: emiyl <me@emiyl.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
This commit is contained in:
Rickey
2026-05-06 00:56:59 -07:00
committed by GitHub
co-authored by emiyl Copilot Autofix powered by AI
parent 877bd09576
commit d01b1ba12d
15 changed files with 844 additions and 738 deletions
+8 -2
View File
@@ -1,5 +1,6 @@
#include "game/common_ui.h"
#include "blind_select.h"
#include "game.h"
#include "game/main_menu.h"
#include "game/options_menu.h"
@@ -15,13 +16,18 @@ static const BackgroundRenderCallback bgCallbacks[] = {
[BG_CARD_PLAYING] = NULL,
[BG_ROUND_END] = NULL,
[BG_SHOP] = NULL,
[BG_BLIND_SELECT] = NULL,
[BG_BLIND_SELECT] = game_blind_select_change_background,
[BG_OPTIONS_MENU] = game_options_menu_change_background,
[BG_MAIN_MENU] = game_main_menu_change_background,
};
void change_background(enum BackgroundId id)
void change_background(enum BackgroundId id, bool force_redraw)
{
if (force_redraw)
{
background = BG_NONE;
reset_background();
}
if (id != background && bgCallbacks[id] != NULL)
{
bgCallbacks[id]();