Better way of setting the active tab icons

This commit is contained in:
twinaphex 2016-07-11 01:45:16 +02:00
parent 5be5b98d26
commit 486ac44b71

View File

@ -235,26 +235,17 @@ static void mui_draw_tab(mui_handle_t *mui,
case MUI_SYSTEM_TAB_MAIN:
tab_icon = MUI_TEXTURE_TAB_MAIN_PASSIVE;
if (i == mui->categories.selection_ptr)
{
tab_icon = MUI_TEXTURE_TAB_MAIN_ACTIVE;
tab_color = active_tab_color;
}
break;
case MUI_SYSTEM_TAB_PLAYLISTS:
tab_icon = MUI_TEXTURE_TAB_PLAYLISTS_PASSIVE;
if (i == mui->categories.selection_ptr)
{
tab_icon = MUI_TEXTURE_TAB_PLAYLISTS_ACTIVE;
tab_color = active_tab_color;
}
break;
case MUI_SYSTEM_TAB_SETTINGS:
tab_icon = MUI_TEXTURE_TAB_SETTINGS_PASSIVE;
if (i == mui->categories.selection_ptr)
{
tab_icon = MUI_TEXTURE_TAB_SETTINGS_ACTIVE;
tab_color = active_tab_color;
}
break;
}