fixed the reversed indicator

This commit is contained in:
OrionW06 2025-06-20 06:30:15 -05:00 committed by Marta Sokolska
parent 4298c886b0
commit a74cc38c07

27
tarot.c
View file

@ -306,30 +306,27 @@ void draw_tarot(void* context) {
if(card_selected >= n) card_selected = 0;
spread.selected[card_selected] = 1;
int x_offsets[3] = {(128 - card_x) / 2 - 32, (128 - card_x) / 2, (128 - card_x) / 2 + 32};
for(int i = 0; i < n; ++i) {
widget_add_icon_element(
app->widget, x_offsets[i], 10 - 2 * spread.selected[i], card[spread.card[i]].icon);
// Add "R" indicator for reversed cards
// Improved: Add big 'R' above reversed cards, centered
if(spread.card[i] >= card_number) {
widget_add_string_element(
app->widget,
x_offsets[i] + card_x - 8,
10 - 2 * spread.selected[i] + 2,
AlignRight,
AlignTop,
FontSecondary,
app->widget,
x_offsets[i] + card_x / 2, // center over card
1, // above the card
AlignCenter,
AlignTop,
FontPrimary,
"R");
}
}
// Adjusted cursor position (moved 8px to the right)
widget_add_icon_element(
app->widget,
x_offsets[card_selected] - 11 + card_x / 2 + 9,
41,
&I_cursor);
app->widget, x_offsets[card_selected] - 11 + card_x / 2 + 9, 41, &I_cursor);
widget_add_string_element(
app->widget,
64,
@ -597,4 +594,4 @@ void tarot_app_scene_on_exit_settings(void* context) {
FURI_LOG_T(TAG, "tarot_app_scene_on_exit_settings");
App* app = context;
submenu_reset(app->submenu);
}
}