Fix shop reroll button's horizontal movement (#316) (#425)

* Add optional exit indexes to selection grid rows & fix shop reroll button movement (#316)

- Added has_exit_idx and exit_idx to SelGridRowAttributes to simulate subgrid-like behavior that was desired in shop reroll button
- Add logic to use exit index if given inside selection_grid_move_selection_horz()
- Add joker focus logic to shop_reroll_row_on_selection_changed()

* clang-format fix

* clang format fix #2

errors due to version mismatch in local fixed (i hope)

* important fix: check x instead of y for next_roudn_btn_sel_x

was checking y against an X value

* changed commenting

* selection_grid.h clang-format fix

* changed commenting again

trying to make docs understandable

* set shop selection rows explicit

Co-authored-by: Rickey <ric@rf3.xyz>

* syntax fix

* clang format fix onceagain

* guard clause when moving down from jokers

---------

Co-authored-by: Rickey <ric@rf3.xyz>
This commit is contained in:
Umut Paklacı
2026-04-05 23:19:08 -07:00
committed by GitHub
co-authored by Rickey
parent 481a869ebc
commit 1e1394ec21
3 changed files with 40 additions and 10 deletions
+11
View File
@@ -82,6 +82,17 @@ typedef struct
* @brief Whether to wrap selection when it passes the end of the row.
*/
bool wrap;
/**
* @brief Whether this row have a horizontal exit index (a row to process horizontal inputs
* from).
*/
bool has_h_exit_idx;
/**
* @brief The index of the row to exit from when a horizontal input is received.
*/
u8 h_exit_idx;
} SelGridRowAttributes;
/**