Merge pull request #902 from lakkatv/lakka

(Lakka) Fix subitems vertical spacing
This commit is contained in:
Twinaphex 2014-08-28 01:46:01 +02:00
commit 955330b3fd
2 changed files with 9 additions and 7 deletions

View File

@ -162,7 +162,7 @@ static void lakka_reset_submenu(void)
subitem->alpha = 0; subitem->alpha = 0;
subitem->zoom = k == category->items[j].active_subitem ? i_active_zoom : i_passive_zoom; subitem->zoom = k == category->items[j].active_subitem ? i_active_zoom : i_passive_zoom;
subitem->y = k == 0 ? vspacing * active_item_factor : vspacing * (3+k); subitem->y = k == 0 ? vspacing * active_item_factor : vspacing * (k + under_item_offset);
} }
} }
} }
@ -379,9 +379,11 @@ static int menu_lakka_iterate(unsigned action)
lakka_open_submenu(); lakka_open_submenu();
depth = 1; depth = 1;
} }
else if (depth == 0 && menu_active_category == 0 && active_item->active_subitem == 1) // Hardcoded "Quit" item index else if (depth == 0 && menu_active_category == 0 && active_category->active_item == active_category->num_items-1)
{ {
printf("EXIT\n"); add_tween(DELAY, 1.0, &global_alpha, &inOutQuad, NULL);
g_extern.lifecycle_state &= ~(1ULL << MODE_GAME);
return -1;
} }
break; break;

View File

@ -686,7 +686,7 @@ void lakka_init_settings(void)
strlcpy(subitem0->name, "Libretro Logging Level", sizeof(subitem0->name)); strlcpy(subitem0->name, "Libretro Logging Level", sizeof(subitem0->name));
subitem0->alpha = k ? 1.0 : 0.5; subitem0->alpha = k ? 1.0 : 0.5;
subitem0->zoom = k ? i_active_zoom : i_passive_zoom; subitem0->zoom = k ? i_active_zoom : i_passive_zoom;
subitem0->y = k ? vspacing * (3+k) : vspacing * active_item_factor; subitem0->y = k ? vspacing * (k + under_item_offset) : vspacing * active_item_factor;
k = 1; k = 1;
item0->num_subitems++; item0->num_subitems++;
@ -698,7 +698,7 @@ void lakka_init_settings(void)
strlcpy(subitem1->name, "Logging Verbosity", sizeof(subitem1->name)); strlcpy(subitem1->name, "Logging Verbosity", sizeof(subitem1->name));
subitem1->alpha = k ? 1.0 : 0.5; subitem1->alpha = k ? 1.0 : 0.5;
subitem1->zoom = k ? i_active_zoom : i_passive_zoom; subitem1->zoom = k ? i_active_zoom : i_passive_zoom;
subitem1->y = k ? vspacing * (3+k) : vspacing * active_item_factor; subitem1->y = k ? vspacing * (k + under_item_offset) : vspacing * active_item_factor;
k = 2; k = 2;
item0->num_subitems++; item0->num_subitems++;
@ -710,7 +710,7 @@ void lakka_init_settings(void)
strlcpy(subitem2->name, "Configuration Save On Exit", sizeof(subitem2->name)); strlcpy(subitem2->name, "Configuration Save On Exit", sizeof(subitem2->name));
subitem2->alpha = k ? 1.0 : 0.5; subitem2->alpha = k ? 1.0 : 0.5;
subitem2->zoom = k ? i_active_zoom : i_passive_zoom; subitem2->zoom = k ? i_active_zoom : i_passive_zoom;
subitem2->y = k ? vspacing * (3+k) : vspacing * active_item_factor; subitem2->y = k ? vspacing * (k + under_item_offset) : vspacing * active_item_factor;
// Quit item // Quit item
@ -921,7 +921,7 @@ static void lakka_init_items(int i, menu_category_t *category, core_info_t *info
} }
subitem->alpha = 0; subitem->alpha = 0;
subitem->zoom = k ? i_passive_zoom : i_active_zoom; subitem->zoom = k ? i_passive_zoom : i_active_zoom;
subitem->y = k ? vspacing * (3+k) : vspacing * active_item_factor; subitem->y = k ? vspacing * (k+under_item_offset) : vspacing * active_item_factor;
} }
} }
} }