[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:
+10
-5
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user