Start adding separate setting 'framebuffer_opacity'

This commit is contained in:
twinaphex 2017-08-15 22:17:02 +02:00
parent b2fd9c5b05
commit 5c6b230e42
23 changed files with 92 additions and 7 deletions

View File

@ -267,6 +267,8 @@ static bool xmb_show_add = true;
#endif
#endif
static float menu_framebuffer_opacity = 0.900;
static float menu_wallpaper_opacity = 0.300;
static float menu_footer_opacity = 1.000;

View File

@ -1297,6 +1297,7 @@ static struct config_float_setting *populate_settings_float(settings_t *settings
#endif
#ifdef HAVE_MENU
SETTING_FLOAT("menu_wallpaper_opacity", &settings->floats.menu_wallpaper_opacity, true, menu_wallpaper_opacity, false);
SETTING_FLOAT("menu_framebuffer_opacity", &settings->floats.menu_framebuffer_opacity, true, menu_framebuffer_opacity, false);
SETTING_FLOAT("menu_footer_opacity", &settings->floats.menu_footer_opacity, true, menu_footer_opacity, false);
SETTING_FLOAT("menu_header_opacity", &settings->floats.menu_header_opacity, true, menu_header_opacity, false);
#endif

View File

@ -238,6 +238,7 @@ typedef struct settings
float video_msg_color_b;
float menu_wallpaper_opacity;
float menu_framebuffer_opacity;
float menu_footer_opacity;
float menu_header_opacity;

View File

@ -3021,3 +3021,7 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_PLAYLIST_ENTRY_RENAME,
"Rename the title of the entry.")
MSG_HASH(MENU_ENUM_LABEL_PLAYLIST_ENTRY_RENAME,
"Rename")
MSG_HASH(MENU_ENUM_LABEL_VALUE_MENU_FRAMEBUFFER_OPACITY,
"Framebuffer Opacity")
MSG_HASH(MENU_ENUM_SUBLABEL_MENU_FRAMEBUFFER_OPACITY,
"Modify the opacity of the framebuffer.")

View File

@ -3021,3 +3021,7 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_PLAYLIST_ENTRY_RENAME,
"Rename the title of the entry.")
MSG_HASH(MENU_ENUM_LABEL_PLAYLIST_ENTRY_RENAME,
"Rename")
MSG_HASH(MENU_ENUM_LABEL_VALUE_MENU_FRAMEBUFFER_OPACITY,
"Framebuffer Opacity")
MSG_HASH(MENU_ENUM_SUBLABEL_MENU_FRAMEBUFFER_OPACITY,
"Modify the opacity of the framebuffer.")

View File

@ -3015,3 +3015,7 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_PLAYLIST_ENTRY_RENAME,
"Rename the title of the entry.")
MSG_HASH(MENU_ENUM_LABEL_PLAYLIST_ENTRY_RENAME,
"Rename")
MSG_HASH(MENU_ENUM_LABEL_VALUE_MENU_FRAMEBUFFER_OPACITY,
"Framebuffer Opacity")
MSG_HASH(MENU_ENUM_SUBLABEL_MENU_FRAMEBUFFER_OPACITY,
"Modify the opacity of the framebuffer.")

View File

@ -2884,3 +2884,7 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_PLAYLIST_ENTRY_RENAME,
"Rename the title of the entry.")
MSG_HASH(MENU_ENUM_LABEL_PLAYLIST_ENTRY_RENAME,
"Rename")
MSG_HASH(MENU_ENUM_LABEL_VALUE_MENU_FRAMEBUFFER_OPACITY,
"Framebuffer Opacity")
MSG_HASH(MENU_ENUM_SUBLABEL_MENU_FRAMEBUFFER_OPACITY,
"Modify the opacity of the framebuffer.")

View File

@ -3053,3 +3053,7 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_PLAYLIST_ENTRY_RENAME,
"Rename the title of the entry.")
MSG_HASH(MENU_ENUM_LABEL_PLAYLIST_ENTRY_RENAME,
"Rename")
MSG_HASH(MENU_ENUM_LABEL_VALUE_MENU_FRAMEBUFFER_OPACITY,
"Framebuffer Opacity")
MSG_HASH(MENU_ENUM_SUBLABEL_MENU_FRAMEBUFFER_OPACITY,
"Modify the opacity of the framebuffer.")

View File

@ -2419,3 +2419,7 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_ADD_TO_FAVORITES,
"Aggiungi ai preferiti")
MSG_HASH(MENU_ENUM_SUBLABEL_ADD_TO_FAVORITES,
"Aggiungere il titolo ai tuoi preferiti.")
MSG_HASH(MENU_ENUM_LABEL_VALUE_MENU_FRAMEBUFFER_OPACITY,
"Framebuffer Opacity")
MSG_HASH(MENU_ENUM_SUBLABEL_MENU_FRAMEBUFFER_OPACITY,
"Modify the opacity of the framebuffer.")

View File

@ -3007,3 +3007,7 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_PLAYLIST_ENTRY_RENAME,
"Rename the title of the entry.")
MSG_HASH(MENU_ENUM_LABEL_PLAYLIST_ENTRY_RENAME,
"Rename")
MSG_HASH(MENU_ENUM_LABEL_VALUE_MENU_FRAMEBUFFER_OPACITY,
"Framebuffer Opacity")
MSG_HASH(MENU_ENUM_SUBLABEL_MENU_FRAMEBUFFER_OPACITY,
"Modify the opacity of the framebuffer.")

View File

@ -3016,3 +3016,7 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_PLAYLIST_ENTRY_RENAME,
"Rename the title of the entry.")
MSG_HASH(MENU_ENUM_LABEL_PLAYLIST_ENTRY_RENAME,
"Rename")
MSG_HASH(MENU_ENUM_LABEL_VALUE_MENU_FRAMEBUFFER_OPACITY,
"Framebuffer Opacity")
MSG_HASH(MENU_ENUM_SUBLABEL_MENU_FRAMEBUFFER_OPACITY,
"Modify the opacity of the framebuffer.")

View File

@ -1277,3 +1277,5 @@ MSG_HASH(MENU_ENUM_LABEL_CORE_DELETE,
"core_delete")
MSG_HASH(MENU_ENUM_LABEL_PLAYLIST_ENTRY_RENAME,
"playlist_entry_rename")
MSG_HASH(MENU_ENUM_LABEL_MENU_FRAMEBUFFER_OPACITY,
"menu_framebuffer_opacity")

View File

@ -2884,3 +2884,7 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_PLAYLIST_ENTRY_RENAME,
"Rename the title of the entry.")
MSG_HASH(MENU_ENUM_LABEL_PLAYLIST_ENTRY_RENAME,
"Rename")
MSG_HASH(MENU_ENUM_LABEL_VALUE_MENU_FRAMEBUFFER_OPACITY,
"Framebuffer Opacity")
MSG_HASH(MENU_ENUM_SUBLABEL_MENU_FRAMEBUFFER_OPACITY,
"Modify the opacity of the framebuffer.")

View File

@ -3862,3 +3862,7 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_PLAYLIST_ENTRY_RENAME,
"Rename the title of the entry.")
MSG_HASH(MENU_ENUM_LABEL_PLAYLIST_ENTRY_RENAME,
"Rename")
MSG_HASH(MENU_ENUM_LABEL_VALUE_MENU_FRAMEBUFFER_OPACITY,
"Framebuffer Opacity")
MSG_HASH(MENU_ENUM_SUBLABEL_MENU_FRAMEBUFFER_OPACITY,
"Modify the opacity of the framebuffer.")

View File

@ -2991,3 +2991,7 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_PLAYLIST_ENTRY_RENAME,
"Rename the title of the entry.")
MSG_HASH(MENU_ENUM_LABEL_PLAYLIST_ENTRY_RENAME,
"Rename")
MSG_HASH(MENU_ENUM_LABEL_VALUE_MENU_FRAMEBUFFER_OPACITY,
"Framebuffer Opacity")
MSG_HASH(MENU_ENUM_SUBLABEL_MENU_FRAMEBUFFER_OPACITY,
"Modify the opacity of the framebuffer.")

View File

@ -3074,3 +3074,7 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_PLAYLIST_ENTRY_RENAME,
"Rename the title of the entry.")
MSG_HASH(MENU_ENUM_LABEL_PLAYLIST_ENTRY_RENAME,
"Rename")
MSG_HASH(MENU_ENUM_LABEL_VALUE_MENU_FRAMEBUFFER_OPACITY,
"Framebuffer Opacity")
MSG_HASH(MENU_ENUM_SUBLABEL_MENU_FRAMEBUFFER_OPACITY,
"Modify the opacity of the framebuffer.")

View File

@ -3105,3 +3105,7 @@ MSG_HASH(MENU_ENUM_SUBLABEL_PLAYLIST_ENTRY_RENAME,
"Rename the title of the entry.")
MSG_HASH(MENU_ENUM_LABEL_VALUE_PLAYLIST_ENTRY_RENAME,
"Rename")
MSG_HASH(MENU_ENUM_LABEL_VALUE_MENU_FRAMEBUFFER_OPACITY,
"Framebuffer Opacity")
MSG_HASH(MENU_ENUM_SUBLABEL_MENU_FRAMEBUFFER_OPACITY,
"Modify the opacity of the framebuffer.")

View File

@ -3045,3 +3045,7 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_PLAYLIST_ENTRY_RENAME,
"Rename the title of the entry.")
MSG_HASH(MENU_ENUM_LABEL_PLAYLIST_ENTRY_RENAME,
"Rename")
MSG_HASH(MENU_ENUM_LABEL_VALUE_MENU_FRAMEBUFFER_OPACITY,
"Framebuffer Opacity")
MSG_HASH(MENU_ENUM_SUBLABEL_MENU_FRAMEBUFFER_OPACITY,
"Modify the opacity of the framebuffer.")

View File

@ -280,6 +280,7 @@ default_sublabel_macro(action_bind_sublabel_xmb_icon_theme,
default_sublabel_macro(action_bind_sublabel_xmb_shadows_enable, MENU_ENUM_SUBLABEL_XMB_SHADOWS_ENABLE)
default_sublabel_macro(action_bind_sublabel_menu_color_theme, MENU_ENUM_SUBLABEL_MATERIALUI_MENU_COLOR_THEME)
default_sublabel_macro(action_bind_sublabel_menu_wallpaper_opacity, MENU_ENUM_SUBLABEL_MENU_WALLPAPER_OPACITY)
default_sublabel_macro(action_bind_sublabel_menu_framebuffer_opacity, MENU_ENUM_SUBLABEL_MENU_FRAMEBUFFER_OPACITY)
default_sublabel_macro(action_bind_sublabel_menu_ribbon_enable, MENU_ENUM_SUBLABEL_XMB_RIBBON_ENABLE)
default_sublabel_macro(action_bind_sublabel_menu_font, MENU_ENUM_SUBLABEL_XMB_FONT)
default_sublabel_macro(action_bind_sublabel_menu_favorites_tab, MENU_ENUM_SUBLABEL_XMB_SHOW_FAVORITES)
@ -572,6 +573,9 @@ int menu_cbs_init_bind_sublabel(menu_file_list_cbs_t *cbs,
case MENU_ENUM_LABEL_XMB_RIBBON_ENABLE:
BIND_ACTION_SUBLABEL(cbs, action_bind_sublabel_menu_ribbon_enable);
break;
case MENU_ENUM_LABEL_MENU_FRAMEBUFFER_OPACITY:
BIND_ACTION_SUBLABEL(cbs, action_bind_sublabel_menu_framebuffer_opacity);
break;
case MENU_ENUM_LABEL_MENU_WALLPAPER_OPACITY:
BIND_ACTION_SUBLABEL(cbs, action_bind_sublabel_menu_wallpaper_opacity);
break;

View File

@ -1193,7 +1193,7 @@ static void mui_frame(void *data, video_frame_info_t *video_info)
{
case MATERIALUI_THEME_BLUE:
hex32_to_rgba_normalized(blue_500, theme.header_bg_color, 1.00);
hex32_to_rgba_normalized(blue_50, theme.highlighted_entry_color, 1.00);
hex32_to_rgba_normalized(blue_50, theme.highlighted_entry_color, 0.90);
hex32_to_rgba_normalized(0xFFFFFF, theme.footer_bg_color, 1.00);
hex32_to_rgba_normalized(0xFAFAFA, theme.body_bg_color, 0.90);
hex32_to_rgba_normalized(blue_500, theme.active_tab_marker_color, 1.00);
@ -1211,7 +1211,7 @@ static void mui_frame(void *data, video_frame_info_t *video_info)
break;
case MATERIALUI_THEME_BLUE_GREY:
hex32_to_rgba_normalized(blue_grey_500, theme.header_bg_color, 1.00);
hex32_to_rgba_normalized(blue_grey_50, theme.highlighted_entry_color, 1.00);
hex32_to_rgba_normalized(blue_grey_50, theme.highlighted_entry_color, 0.90);
hex32_to_rgba_normalized(0xFFFFFF, theme.footer_bg_color, 1.00);
hex32_to_rgba_normalized(0xFAFAFA, theme.body_bg_color, 0.90);
hex32_to_rgba_normalized(blue_grey_500, theme.active_tab_marker_color, 1.00);
@ -1229,7 +1229,7 @@ static void mui_frame(void *data, video_frame_info_t *video_info)
break;
case MATERIALUI_THEME_GREEN:
hex32_to_rgba_normalized(green_500, theme.header_bg_color, 1.00);
hex32_to_rgba_normalized(green_50, theme.highlighted_entry_color, 1.00);
hex32_to_rgba_normalized(green_50, theme.highlighted_entry_color, 0.90);
hex32_to_rgba_normalized(0xFFFFFF, theme.footer_bg_color, 1.00);
hex32_to_rgba_normalized(0xFAFAFA, theme.body_bg_color, 0.90);
hex32_to_rgba_normalized(green_500, theme.active_tab_marker_color, 1.00);
@ -1247,7 +1247,7 @@ static void mui_frame(void *data, video_frame_info_t *video_info)
break;
case MATERIALUI_THEME_RED:
hex32_to_rgba_normalized(red_500, theme.header_bg_color, 1.00);
hex32_to_rgba_normalized(red_50, theme.highlighted_entry_color, 1.00);
hex32_to_rgba_normalized(red_50, theme.highlighted_entry_color, 0.90);
hex32_to_rgba_normalized(0xFFFFFF, theme.footer_bg_color, 1.00);
hex32_to_rgba_normalized(0xFAFAFA, theme.body_bg_color, 0.90);
hex32_to_rgba_normalized(red_500, theme.active_tab_marker_color, 1.00);
@ -1266,7 +1266,7 @@ static void mui_frame(void *data, video_frame_info_t *video_info)
break;
case MATERIALUI_THEME_YELLOW:
hex32_to_rgba_normalized(yellow_500, theme.header_bg_color, 1.00);
hex32_to_rgba_normalized(yellow_50, theme.highlighted_entry_color, 1.00);
hex32_to_rgba_normalized(yellow_50, theme.highlighted_entry_color, 0.90);
hex32_to_rgba_normalized(0xFFFFFF, theme.footer_bg_color, 1.00);
hex32_to_rgba_normalized(0xFAFAFA, theme.body_bg_color, 0.90);
hex32_to_rgba_normalized(yellow_500, theme.active_tab_marker_color, 1.00);
@ -1284,7 +1284,7 @@ static void mui_frame(void *data, video_frame_info_t *video_info)
break;
case MATERIALUI_THEME_DARK_BLUE:
hex32_to_rgba_normalized(greyish_blue, theme.header_bg_color, 1.00);
hex32_to_rgba_normalized(0xC7C7C7, theme.highlighted_entry_color, 1.00);
hex32_to_rgba_normalized(0xC7C7C7, theme.highlighted_entry_color, 0.90);
hex32_to_rgba_normalized(0x212121, theme.footer_bg_color, 1.00);
hex32_to_rgba_normalized(0x212121, theme.body_bg_color, 0.90);
hex32_to_rgba_normalized(0x38474F, theme.active_tab_marker_color, 1.00);
@ -1303,7 +1303,7 @@ static void mui_frame(void *data, video_frame_info_t *video_info)
break;
case MATERIALUI_THEME_NVIDIA_SHIELD:
hex32_to_rgba_normalized(color_nv_header, theme.header_bg_color, 1.00);
hex32_to_rgba_normalized(color_nv_accent, theme.highlighted_entry_color, 1.00);
hex32_to_rgba_normalized(color_nv_accent, theme.highlighted_entry_color, 0.90);
hex32_to_rgba_normalized(color_nv_body, theme.footer_bg_color, 1.00);
hex32_to_rgba_normalized(color_nv_body, theme.body_bg_color, 0.90);
hex32_to_rgba_normalized(0xFFFFFF, theme.active_tab_marker_color, 0.90);

View File

@ -5170,6 +5170,9 @@ bool menu_displaylist_ctl(enum menu_displaylist_ctl_state type, void *data)
menu_displaylist_parse_settings_enum(menu, info,
MENU_ENUM_LABEL_MENU_WALLPAPER_OPACITY,
PARSE_ONLY_FLOAT, false);
menu_displaylist_parse_settings_enum(menu, info,
MENU_ENUM_LABEL_MENU_FRAMEBUFFER_OPACITY,
PARSE_ONLY_FLOAT, false);
menu_displaylist_parse_settings_enum(menu, info,
MENU_ENUM_LABEL_MENU_LINEAR_FILTER,
PARSE_ONLY_BOOL, false);

View File

@ -5003,6 +5003,21 @@ static bool setting_append_list(
general_read_handler);
menu_settings_list_current_add_range(list, list_info, 0.0, 1.0, 0.010, true, true);
settings_data_list_current_add_flags(list, list_info, SD_FLAG_LAKKA_ADVANCED);
CONFIG_FLOAT(
list, list_info,
&settings->floats.menu_framebuffer_opacity,
MENU_ENUM_LABEL_MENU_FRAMEBUFFER_OPACITY,
MENU_ENUM_LABEL_VALUE_MENU_FRAMEBUFFER_OPACITY,
menu_framebuffer_opacity,
"%.3f",
&group_info,
&subgroup_info,
parent_group,
general_write_handler,
general_read_handler);
menu_settings_list_current_add_range(list, list_info, 0.0, 1.0, 0.010, true, true);
settings_data_list_current_add_flags(list, list_info, SD_FLAG_LAKKA_ADVANCED);
}
if (string_is_equal_fast(settings->arrays.menu_driver, "xmb", 3))

View File

@ -399,6 +399,7 @@ enum msg_hash_enums
MENU_ENUM_LABEL_INPUT_HOTKEY_BIND_END = MENU_ENUM_LABEL_INPUT_HOTKEY_BIND_BEGIN + RARCH_BIND_LIST_END,
MENU_LABEL(MENU_WALLPAPER_OPACITY),
MENU_LABEL(MENU_FRAMEBUFFER_OPACITY),
MENU_ENUM_LABEL_VALUE_CONFIG,
MENU_ENUM_LABEL_VALUE_OVERLAY,