[Feature] Implement Joker descriptions in the Shop when holding B (#530)

* WIP

* WIP

* WIP

* WIP

* Tags are bugged but it's looking good

* Centering is bugged, almost there

* WIP

* Fixed centeriiiing, yaaaay

* good progress

* add proper '\n' support

* WIP descriptions

* All descriptions are there ^^

* missing 9-patch for pretty display

* WIP

* fix rebase issues

* Fix minor Run Setup screen issues

* Almost done, only one fix to go

* Aaaalmooost doooneeeee

* make desc frame size adaptative

* add rarity color and text

* final cleanup

* clang format

* clang format

* clang format

* clang format

* clang format

* Fix Joker update loop index

* Fix const and Bull description

* Fix unwanted button SFX

* fix tte colors

* Add misprint description

* Fix justified line length computation

* Add safeguards to tag parsing loop

* clang format

* Fix Ante bugged display at boss blind end

* Tweak suit colors

* Final fixes

* Simplified the way we print descriptions

* simplify further

* get rid of weird macro

* Fix Onwed joker price when holding A after showing its description

---------

Co-authored-by: MathisMartin31 <mathis.martin31@gmail.com>
This commit is contained in:
Geralt
2026-06-08 18:16:37 -07:00
committed by GitHub
co-authored by MathisMartin31
parent 917354f057
commit e26558e1a5
23 changed files with 1295 additions and 135 deletions
+10 -5
View File
@@ -768,7 +768,8 @@ static int seed_play_get_row_size(void)
*/
static void seed_play_row_on_key_transit(SelectionGrid* selection_grid, Selection* selection)
{
button_press(&choose_deck_bottom_buttons[selection->x]);
if (key_hit(SELECT_CARD))
button_press(&choose_deck_bottom_buttons[selection->x]);
}
// CHOOSE SEED
@@ -1004,13 +1005,18 @@ static inline Button* choose_seed_get_button_from_sel(const Selection* sel)
/**
* @brief Handle button imputs in `choose_seed_selection_grid`
*
* Always register A press, but only B press when we are on a keyboard row
*
* @param selection_grid pointer to `choose_seed_selection_grid`
* @param selection Selected button in `choose_seed_selection_grid`
*/
static void choose_seed_row_on_key_transit(SelectionGrid* selection_grid, Selection* selection)
{
if (key_hit(SELECT_CARD) || key_hit(DESELECT_CARDS))
if (key_hit(SELECT_CARD) ||
(selection->y <= RUN_SETUP_SEED_ROW_KEY3 && key_hit(DESELECT_CARDS)))
{
button_press(choose_seed_get_button_from_sel(selection));
}
}
/**
@@ -1133,8 +1139,7 @@ static inline void toggle_seed_enabled(bool enable)
*/
static void use_seed_on_pressed(void)
{
if (key_hit(SELECT_CARD))
toggle_seed_enabled(!use_seed);
toggle_seed_enabled(!use_seed);
}
/**
@@ -1142,7 +1147,7 @@ static void use_seed_on_pressed(void)
*/
static void seed_on_pressed(void)
{
if (key_hit(SELECT_CARD) && use_seed)
if (use_seed)
state_machine_change_state(&run_setup_sm, RUN_SETUP_SUBSTATE_CHOOSE_SEED);
}