mirror of
https://github.com/libretro/RetroArch
synced 2025-02-08 06:40:14 +00:00
commit
2a173ae44a
@ -279,7 +279,7 @@ static INLINE void disp_set_label(file_list_t* list,
|
|||||||
type - MENU_SETTINGS_CORE_OPTION_START),
|
type - MENU_SETTINGS_CORE_OPTION_START),
|
||||||
type_str_size);
|
type_str_size);
|
||||||
else
|
else
|
||||||
setting_data_get_label(type_str,
|
setting_data_get_label(list, type_str,
|
||||||
type_str_size, w, type, label, entry_label, i);
|
type_str_size, w, type, label, entry_label, i);
|
||||||
|
|
||||||
strlcpy(path_buf, path, path_buf_size);
|
strlcpy(path_buf, path, path_buf_size);
|
||||||
|
@ -515,10 +515,13 @@ static void xmb_list_open_new(file_list_t *list, int dir, size_t current)
|
|||||||
|
|
||||||
if (!xmb)
|
if (!xmb)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
node->label_alpha = 0;
|
|
||||||
if (dir == 1 || (dir == -1 && i != current))
|
if (dir == 1 || (dir == -1 && i != current))
|
||||||
node->alpha = 0;
|
node->alpha = 0;
|
||||||
|
|
||||||
|
if (dir == 1 || dir == -1)
|
||||||
|
node->label_alpha = 0;
|
||||||
|
|
||||||
//if (dir == 1 || (dir == -1 && i == current))
|
//if (dir == 1 || (dir == -1 && i == current))
|
||||||
node->x = xmb->icon_size*dir*2;
|
node->x = xmb->icon_size*dir*2;
|
||||||
//else
|
//else
|
||||||
@ -741,8 +744,7 @@ static void xmb_set_title(void)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static void xmb_populate_entries(void *data, const char *path,
|
static void xmb_list_open()
|
||||||
const char *label, unsigned k)
|
|
||||||
{
|
{
|
||||||
int dir;
|
int dir;
|
||||||
unsigned j;
|
unsigned j;
|
||||||
@ -751,36 +753,40 @@ static void xmb_populate_entries(void *data, const char *path,
|
|||||||
if (!xmb)
|
if (!xmb)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
xmb_set_title();
|
dir = driver.menu->cat_selection_ptr > xmb->cat_selection_ptr_old ? 1 : -1;
|
||||||
|
|
||||||
if (driver.menu->cat_selection_ptr != xmb->active_category_old)
|
xmb->active_category += dir;
|
||||||
|
|
||||||
|
for (j = 0; j < xmb->num_categories; j++)
|
||||||
{
|
{
|
||||||
dir = driver.menu->cat_selection_ptr > xmb->cat_selection_ptr_old ? 1 : -1;
|
float ia, iz;
|
||||||
|
xmb_node_t *node = j ? xmb_node_for_core(j-1) : &xmb->settings_node;
|
||||||
|
|
||||||
xmb->active_category += dir;
|
if (!node)
|
||||||
|
continue;
|
||||||
|
|
||||||
for (j = 0; j < xmb->num_categories; j++)
|
ia = (j == xmb->active_category) ? xmb->c_active_alpha : xmb->c_passive_alpha;
|
||||||
{
|
iz = (j == xmb->active_category) ? xmb->c_active_zoom : xmb->c_passive_zoom;
|
||||||
float ia, iz;
|
add_tween(XMB_DELAY, ia, &node->alpha, &inOutQuad, NULL);
|
||||||
xmb_node_t *node = j ? xmb_node_for_core(j-1) : &xmb->settings_node;
|
add_tween(XMB_DELAY, iz, &node->zoom, &inOutQuad, NULL);
|
||||||
|
|
||||||
if (!node)
|
|
||||||
continue;
|
|
||||||
|
|
||||||
ia = (j == xmb->active_category) ? xmb->c_active_alpha : xmb->c_passive_alpha;
|
|
||||||
iz = (j == xmb->active_category) ? xmb->c_active_zoom : xmb->c_passive_zoom;
|
|
||||||
add_tween(XMB_DELAY, ia, &node->alpha, &inOutQuad, NULL);
|
|
||||||
add_tween(XMB_DELAY, iz, &node->zoom, &inOutQuad, NULL);
|
|
||||||
}
|
|
||||||
|
|
||||||
add_tween(XMB_DELAY, xmb->hspacing*-(float)driver.menu->cat_selection_ptr, &xmb->categories_x, &inOutQuad, NULL);
|
|
||||||
dir = driver.menu->cat_selection_ptr > xmb->cat_selection_ptr_old ? 1 : -1;
|
|
||||||
xmb_list_switch_old(xmb->selection_buf_old, dir, xmb->selection_ptr_old);
|
|
||||||
xmb_list_switch_new(driver.menu->menu_list->selection_buf, dir, driver.menu->selection_ptr);
|
|
||||||
xmb->active_category_old = driver.menu->cat_selection_ptr;
|
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
add_tween(XMB_DELAY, xmb->hspacing*-(float)driver.menu->cat_selection_ptr, &xmb->categories_x, &inOutQuad, NULL);
|
||||||
|
dir = driver.menu->cat_selection_ptr > xmb->cat_selection_ptr_old ? 1 : -1;
|
||||||
|
xmb_list_switch_old(xmb->selection_buf_old, dir, xmb->selection_ptr_old);
|
||||||
|
xmb_list_switch_new(driver.menu->menu_list->selection_buf, dir, driver.menu->selection_ptr);
|
||||||
|
xmb->active_category_old = driver.menu->cat_selection_ptr;
|
||||||
|
}
|
||||||
|
|
||||||
|
static void xmb_list_switch()
|
||||||
|
{
|
||||||
|
int dir;
|
||||||
|
unsigned j;
|
||||||
|
xmb_handle_t *xmb = (xmb_handle_t*)driver.menu->userdata;
|
||||||
|
|
||||||
|
if (!xmb)
|
||||||
|
return;
|
||||||
|
|
||||||
xmb->depth = file_list_get_size(driver.menu->menu_list->menu_stack);
|
xmb->depth = file_list_get_size(driver.menu->menu_list->menu_stack);
|
||||||
|
|
||||||
dir = 0;
|
dir = 0;
|
||||||
@ -817,6 +823,26 @@ static void xmb_populate_entries(void *data, const char *path,
|
|||||||
xmb->old_depth = xmb->depth;
|
xmb->old_depth = xmb->depth;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void xmb_populate_entries(void *data, const char *path,
|
||||||
|
const char *label, unsigned k)
|
||||||
|
{
|
||||||
|
int dir;
|
||||||
|
unsigned j;
|
||||||
|
xmb_handle_t *xmb = (xmb_handle_t*)driver.menu->userdata;
|
||||||
|
|
||||||
|
if (!xmb)
|
||||||
|
return;
|
||||||
|
|
||||||
|
xmb_set_title();
|
||||||
|
|
||||||
|
// horizontal list switching
|
||||||
|
if (driver.menu->cat_selection_ptr != xmb->active_category_old)
|
||||||
|
xmb_list_open();
|
||||||
|
// list open
|
||||||
|
else
|
||||||
|
xmb_list_switch();
|
||||||
|
}
|
||||||
|
|
||||||
static void xmb_draw_items(file_list_t *list, file_list_t *stack,
|
static void xmb_draw_items(file_list_t *list, file_list_t *stack,
|
||||||
size_t current, size_t cat_selection_ptr)
|
size_t current, size_t cat_selection_ptr)
|
||||||
{
|
{
|
||||||
|
@ -2804,6 +2804,7 @@ static void get_string_representation_savestate(void * data, char *type_str,
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* setting_data_get_label:
|
* setting_data_get_label:
|
||||||
|
* @list : File list on which to perform the search
|
||||||
* @type_str : String for the type to be represented on-screen as
|
* @type_str : String for the type to be represented on-screen as
|
||||||
* a label.
|
* a label.
|
||||||
* @type_str_size : Size of @type_str
|
* @type_str_size : Size of @type_str
|
||||||
@ -2816,7 +2817,7 @@ static void get_string_representation_savestate(void * data, char *type_str,
|
|||||||
*
|
*
|
||||||
* Get associated label of a setting.
|
* Get associated label of a setting.
|
||||||
**/
|
**/
|
||||||
void setting_data_get_label(char *type_str,
|
void setting_data_get_label(file_list_t* list, char *type_str,
|
||||||
size_t type_str_size, unsigned *w, unsigned type,
|
size_t type_str_size, unsigned *w, unsigned type,
|
||||||
const char *menu_label, const char *label, unsigned idx)
|
const char *menu_label, const char *label, unsigned idx)
|
||||||
{
|
{
|
||||||
@ -2828,7 +2829,7 @@ void setting_data_get_label(char *type_str,
|
|||||||
|
|
||||||
setting_data = (rarch_setting_t*)driver.menu->list_settings;
|
setting_data = (rarch_setting_t*)driver.menu->list_settings;
|
||||||
setting = (rarch_setting_t*)setting_data_find_setting(setting_data,
|
setting = (rarch_setting_t*)setting_data_find_setting(setting_data,
|
||||||
driver.menu->menu_list->selection_buf->list[idx].label);
|
list->list[idx].label);
|
||||||
|
|
||||||
if ((get_fallback_label(type_str, type_str_size, w, type, menu_label,
|
if ((get_fallback_label(type_str, type_str_size, w, type, menu_label,
|
||||||
label, idx)) == 0)
|
label, idx)) == 0)
|
||||||
|
@ -292,6 +292,7 @@ int setting_data_get_description(const char *label, char *msg,
|
|||||||
#ifdef HAVE_MENU
|
#ifdef HAVE_MENU
|
||||||
/**
|
/**
|
||||||
* setting_data_get_label:
|
* setting_data_get_label:
|
||||||
|
* @list : File list on which to perform the search
|
||||||
* @type_str : String for the type to be represented on-screen as
|
* @type_str : String for the type to be represented on-screen as
|
||||||
* a label.
|
* a label.
|
||||||
* @type_str_size : Size of @type_str
|
* @type_str_size : Size of @type_str
|
||||||
@ -304,7 +305,7 @@ int setting_data_get_description(const char *label, char *msg,
|
|||||||
*
|
*
|
||||||
* Get associated label of a setting.
|
* Get associated label of a setting.
|
||||||
**/
|
**/
|
||||||
void setting_data_get_label(char *type_str,
|
void setting_data_get_label(file_list_t* list, char *type_str,
|
||||||
size_t type_str_size, unsigned *w, unsigned type,
|
size_t type_str_size, unsigned *w, unsigned type,
|
||||||
const char *menu_label, const char *label, unsigned idx);
|
const char *menu_label, const char *label, unsigned idx);
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
x
Reference in New Issue
Block a user