mirror of
https://github.com/libretro/RetroArch.git
synced 2025-01-24 10:24:55 +00:00
(RGUI) Add colour themes
This commit is contained in:
parent
f500cf19ab
commit
faaa6e081b
@ -380,6 +380,7 @@ static const uint32_t menu_bg_dark_color = 0xc0202020;
|
||||
static const uint32_t menu_bg_light_color = 0xc0404040;
|
||||
static const uint32_t menu_border_dark_color = 0xc0204020;
|
||||
static const uint32_t menu_border_light_color = 0xc0408040;
|
||||
static unsigned rgui_color_theme = RGUI_THEME_CUSTOM;
|
||||
|
||||
#else
|
||||
static bool default_block_config_read = false;
|
||||
|
@ -1638,6 +1638,7 @@ static struct config_uint_setting *populate_settings_uint(settings_t *settings,
|
||||
SETTING_UINT("dpi_override_value", &settings->uints.menu_dpi_override_value, true, menu_dpi_override_value, false);
|
||||
SETTING_UINT("menu_thumbnails", &settings->uints.menu_thumbnails, true, menu_thumbnails_default, false);
|
||||
SETTING_UINT("menu_timedate_style", &settings->uints.menu_timedate_style, true, menu_timedate_style, false);
|
||||
SETTING_UINT("rgui_menu_color_theme", &settings->uints.menu_rgui_color_theme, true, rgui_color_theme, false);
|
||||
#ifdef HAVE_LIBNX
|
||||
SETTING_UINT("split_joycon_p1", &settings->uints.input_split_joycon[0], true, 0, false);
|
||||
SETTING_UINT("split_joycon_p2", &settings->uints.input_split_joycon[1], true, 0, false);
|
||||
|
@ -410,6 +410,7 @@ typedef struct settings
|
||||
unsigned menu_bg_light_color;
|
||||
unsigned menu_border_dark_color;
|
||||
unsigned menu_border_light_color;
|
||||
unsigned menu_rgui_color_theme;
|
||||
unsigned menu_xmb_layout;
|
||||
unsigned menu_xmb_shader_pipeline;
|
||||
unsigned menu_xmb_scale_factor;
|
||||
|
@ -651,6 +651,8 @@ MSG_HASH(MENU_ENUM_LABEL_MAIN_MENU,
|
||||
"main_menu")
|
||||
MSG_HASH(MENU_ENUM_LABEL_MANAGEMENT,
|
||||
"database_settings")
|
||||
MSG_HASH(MENU_ENUM_LABEL_RGUI_MENU_COLOR_THEME,
|
||||
"rgui_menu_color_theme")
|
||||
MSG_HASH(MENU_ENUM_LABEL_OZONE_MENU_COLOR_THEME,
|
||||
"ozone_menu_color_theme")
|
||||
MSG_HASH(MENU_ENUM_LABEL_MATERIALUI_MENU_COLOR_THEME,
|
||||
|
@ -847,11 +847,11 @@ MSG_HASH(
|
||||
)
|
||||
MSG_HASH(
|
||||
MENU_ENUM_LABEL_VALUE_ENTRY_HOVER_COLOR,
|
||||
"Menu entry hover color"
|
||||
"Custom menu entry hover color"
|
||||
)
|
||||
MSG_HASH(
|
||||
MENU_ENUM_LABEL_VALUE_ENTRY_NORMAL_COLOR,
|
||||
"Menu entry normal color"
|
||||
"Custom menu entry normal color"
|
||||
)
|
||||
MSG_HASH(
|
||||
MENU_ENUM_LABEL_VALUE_FALSE,
|
||||
@ -3000,23 +3000,159 @@ MSG_HASH(
|
||||
)
|
||||
MSG_HASH(
|
||||
MENU_ENUM_LABEL_VALUE_TITLE_COLOR,
|
||||
"Menu title color"
|
||||
"Custom menu title color"
|
||||
)
|
||||
MSG_HASH(
|
||||
MENU_ENUM_LABEL_VALUE_BG_DARK_COLOR,
|
||||
"Menu background dark color"
|
||||
"Custom menu background dark color"
|
||||
)
|
||||
MSG_HASH(
|
||||
MENU_ENUM_LABEL_VALUE_BG_LIGHT_COLOR,
|
||||
"Menu background light color"
|
||||
"Custom menu background light color"
|
||||
)
|
||||
MSG_HASH(
|
||||
MENU_ENUM_LABEL_VALUE_BORDER_DARK_COLOR,
|
||||
"Menu border dark color"
|
||||
"Custom menu border dark color"
|
||||
)
|
||||
MSG_HASH(
|
||||
MENU_ENUM_LABEL_VALUE_BORDER_LIGHT_COLOR,
|
||||
"Menu border light color"
|
||||
"Custom menu border light color"
|
||||
)
|
||||
MSG_HASH(
|
||||
MENU_ENUM_LABEL_VALUE_RGUI_MENU_COLOR_THEME,
|
||||
"Menu Color Theme"
|
||||
)
|
||||
MSG_HASH(
|
||||
MENU_ENUM_LABEL_VALUE_RGUI_MENU_COLOR_THEME_CUSTOM,
|
||||
"Custom"
|
||||
)
|
||||
MSG_HASH(
|
||||
MENU_ENUM_LABEL_VALUE_RGUI_MENU_COLOR_THEME_CLASSIC_RED,
|
||||
"Classic Red"
|
||||
)
|
||||
MSG_HASH(
|
||||
MENU_ENUM_LABEL_VALUE_RGUI_MENU_COLOR_THEME_CLASSIC_ORANGE,
|
||||
"Classic Orange"
|
||||
)
|
||||
MSG_HASH(
|
||||
MENU_ENUM_LABEL_VALUE_RGUI_MENU_COLOR_THEME_CLASSIC_YELLOW,
|
||||
"Classic Yellow"
|
||||
)
|
||||
MSG_HASH(
|
||||
MENU_ENUM_LABEL_VALUE_RGUI_MENU_COLOR_THEME_CLASSIC_GREEN,
|
||||
"Classic Green"
|
||||
)
|
||||
MSG_HASH(
|
||||
MENU_ENUM_LABEL_VALUE_RGUI_MENU_COLOR_THEME_CLASSIC_BLUE,
|
||||
"Classic Blue"
|
||||
)
|
||||
MSG_HASH(
|
||||
MENU_ENUM_LABEL_VALUE_RGUI_MENU_COLOR_THEME_CLASSIC_VIOLET,
|
||||
"Classic Violet"
|
||||
)
|
||||
MSG_HASH(
|
||||
MENU_ENUM_LABEL_VALUE_RGUI_MENU_COLOR_THEME_CLASSIC_GREY,
|
||||
"Classic Grey"
|
||||
)
|
||||
MSG_HASH(
|
||||
MENU_ENUM_LABEL_VALUE_RGUI_MENU_COLOR_THEME_LEGACY_RED,
|
||||
"Legacy Red"
|
||||
)
|
||||
MSG_HASH(
|
||||
MENU_ENUM_LABEL_VALUE_RGUI_MENU_COLOR_THEME_DARK_PURPLE,
|
||||
"Dark Purple"
|
||||
)
|
||||
MSG_HASH(
|
||||
MENU_ENUM_LABEL_VALUE_RGUI_MENU_COLOR_THEME_MIDNIGHT_BLUE,
|
||||
"Midnight Blue"
|
||||
)
|
||||
MSG_HASH(
|
||||
MENU_ENUM_LABEL_VALUE_RGUI_MENU_COLOR_THEME_GOLDEN,
|
||||
"Golden"
|
||||
)
|
||||
MSG_HASH(
|
||||
MENU_ENUM_LABEL_VALUE_RGUI_MENU_COLOR_THEME_ELECTRIC_BLUE,
|
||||
"Electric Blue"
|
||||
)
|
||||
MSG_HASH(
|
||||
MENU_ENUM_LABEL_VALUE_RGUI_MENU_COLOR_THEME_APPLE_GREEN,
|
||||
"Apple Green"
|
||||
)
|
||||
MSG_HASH(
|
||||
MENU_ENUM_LABEL_VALUE_RGUI_MENU_COLOR_THEME_VOLCANIC_RED,
|
||||
"Volcanic Red"
|
||||
)
|
||||
MSG_HASH(
|
||||
MENU_ENUM_LABEL_VALUE_RGUI_MENU_COLOR_THEME_LAGOON,
|
||||
"Lagoon"
|
||||
)
|
||||
MSG_HASH(
|
||||
MENU_ENUM_LABEL_VALUE_RGUI_MENU_COLOR_THEME_BROGRAMMER,
|
||||
"Brogrammer"
|
||||
)
|
||||
MSG_HASH(
|
||||
MENU_ENUM_LABEL_VALUE_RGUI_MENU_COLOR_THEME_DRACULA,
|
||||
"Dracula"
|
||||
)
|
||||
MSG_HASH(
|
||||
MENU_ENUM_LABEL_VALUE_RGUI_MENU_COLOR_THEME_FAIRYFLOSS,
|
||||
"Fairy Floss"
|
||||
)
|
||||
MSG_HASH(
|
||||
MENU_ENUM_LABEL_VALUE_RGUI_MENU_COLOR_THEME_FLATUI,
|
||||
"Flat UI"
|
||||
)
|
||||
MSG_HASH(
|
||||
MENU_ENUM_LABEL_VALUE_RGUI_MENU_COLOR_THEME_GRUVBOX_DARK,
|
||||
"Gruvbox Dark"
|
||||
)
|
||||
MSG_HASH(
|
||||
MENU_ENUM_LABEL_VALUE_RGUI_MENU_COLOR_THEME_GRUVBOX_LIGHT,
|
||||
"Gruvbox Light"
|
||||
)
|
||||
MSG_HASH(
|
||||
MENU_ENUM_LABEL_VALUE_RGUI_MENU_COLOR_THEME_HACKING_THE_KERNEL,
|
||||
"Hacking the Kernel"
|
||||
)
|
||||
MSG_HASH(
|
||||
MENU_ENUM_LABEL_VALUE_RGUI_MENU_COLOR_THEME_NORD,
|
||||
"Nord"
|
||||
)
|
||||
MSG_HASH(
|
||||
MENU_ENUM_LABEL_VALUE_RGUI_MENU_COLOR_THEME_NOVA,
|
||||
"Nova"
|
||||
)
|
||||
MSG_HASH(
|
||||
MENU_ENUM_LABEL_VALUE_RGUI_MENU_COLOR_THEME_ONE_DARK,
|
||||
"One Dark"
|
||||
)
|
||||
MSG_HASH(
|
||||
MENU_ENUM_LABEL_VALUE_RGUI_MENU_COLOR_THEME_PALENIGHT,
|
||||
"Palenight"
|
||||
)
|
||||
MSG_HASH(
|
||||
MENU_ENUM_LABEL_VALUE_RGUI_MENU_COLOR_THEME_SOLARIZED_DARK,
|
||||
"Solarized Dark"
|
||||
)
|
||||
MSG_HASH(
|
||||
MENU_ENUM_LABEL_VALUE_RGUI_MENU_COLOR_THEME_SOLARIZED_LIGHT,
|
||||
"Solarized Light"
|
||||
)
|
||||
MSG_HASH(
|
||||
MENU_ENUM_LABEL_VALUE_RGUI_MENU_COLOR_THEME_TANGO_DARK,
|
||||
"Tango Dark"
|
||||
)
|
||||
MSG_HASH(
|
||||
MENU_ENUM_LABEL_VALUE_RGUI_MENU_COLOR_THEME_TANGO_LIGHT,
|
||||
"Tango Light"
|
||||
)
|
||||
MSG_HASH(
|
||||
MENU_ENUM_LABEL_VALUE_RGUI_MENU_COLOR_THEME_ZENBURN,
|
||||
"Zenburn"
|
||||
)
|
||||
MSG_HASH(
|
||||
MENU_ENUM_LABEL_VALUE_RGUI_MENU_COLOR_THEME_ANTI_ZENBURN,
|
||||
"Anti-Zenburn"
|
||||
)
|
||||
MSG_HASH(
|
||||
MENU_ENUM_LABEL_VALUE_TRUE,
|
||||
|
@ -53,6 +53,337 @@
|
||||
#define RGUI_TERM_WIDTH(width) (((width - RGUI_TERM_START_X(width) - RGUI_TERM_START_X(width)) / (FONT_WIDTH_STRIDE)))
|
||||
#define RGUI_TERM_HEIGHT(width, height) (((height - RGUI_TERM_START_Y(height) - RGUI_TERM_START_X(width)) / (FONT_HEIGHT_STRIDE)) - 1)
|
||||
|
||||
typedef struct
|
||||
{
|
||||
uint32_t hover_color;
|
||||
uint32_t normal_color;
|
||||
uint32_t title_color;
|
||||
uint32_t bg_dark_color;
|
||||
uint32_t bg_light_color;
|
||||
uint32_t border_dark_color;
|
||||
uint32_t border_light_color;
|
||||
} rgui_theme_t;
|
||||
|
||||
static const rgui_theme_t rgui_theme_classic_red = {
|
||||
0xFFFF362B, /* hover_color */
|
||||
0xFFFFFFFF, /* normal_color */
|
||||
0xFFFF362B, /* title_color */
|
||||
0xC0202020, /* bg_dark_color */
|
||||
0xC0404040, /* bg_light_color */
|
||||
0xC08C0000, /* border_dark_color */
|
||||
0xC0CC0E03 /* border_light_color */
|
||||
};
|
||||
|
||||
static const rgui_theme_t rgui_theme_classic_orange = {
|
||||
0xFFF87217, /* hover_color */
|
||||
0xFFFFFFFF, /* normal_color */
|
||||
0xFFF87217, /* title_color */
|
||||
0xC0202020, /* bg_dark_color */
|
||||
0xC0404040, /* bg_light_color */
|
||||
0xC0962800, /* border_dark_color */
|
||||
0xC0E46C03 /* border_light_color */
|
||||
};
|
||||
|
||||
static const rgui_theme_t rgui_theme_classic_yellow = {
|
||||
0xFFFFD801, /* hover_color */
|
||||
0xFFFFFFFF, /* normal_color */
|
||||
0xFFFFD801, /* title_color */
|
||||
0xC0202020, /* bg_dark_color */
|
||||
0xC0404040, /* bg_light_color */
|
||||
0xC0AC7800, /* border_dark_color */
|
||||
0xC0F3C60D /* border_light_color */
|
||||
};
|
||||
|
||||
static const rgui_theme_t rgui_theme_classic_green = {
|
||||
0xFF64FF64, /* hover_color */
|
||||
0xFFFFFFFF, /* normal_color */
|
||||
0xFF64FF64, /* title_color */
|
||||
0xC0202020, /* bg_dark_color */
|
||||
0xC0404040, /* bg_light_color */
|
||||
0xC0204020, /* border_dark_color */
|
||||
0xC0408040 /* border_light_color */
|
||||
};
|
||||
|
||||
static const rgui_theme_t rgui_theme_classic_blue = {
|
||||
0xFF48BEFF, /* hover_color */
|
||||
0xFFFFFFFF, /* normal_color */
|
||||
0xFF48BEFF, /* title_color */
|
||||
0xC0202020, /* bg_dark_color */
|
||||
0xC0404040, /* bg_light_color */
|
||||
0xC0005BA6, /* border_dark_color */
|
||||
0xC02E94E2 /* border_light_color */
|
||||
};
|
||||
|
||||
static const rgui_theme_t rgui_theme_classic_violet = {
|
||||
0xFFD86EFF, /* hover_color */
|
||||
0xFFFFFFFF, /* normal_color */
|
||||
0xFFD86EFF, /* title_color */
|
||||
0xC0202020, /* bg_dark_color */
|
||||
0xC0404040, /* bg_light_color */
|
||||
0xC04C0A60, /* border_dark_color */
|
||||
0xC0842DCE /* border_light_color */
|
||||
};
|
||||
|
||||
static const rgui_theme_t rgui_theme_classic_grey = {
|
||||
0xFFB6C1C7, /* hover_color */
|
||||
0xFFFFFFFF, /* normal_color */
|
||||
0xFFB6C1C7, /* title_color */
|
||||
0xC0202020, /* bg_dark_color */
|
||||
0xC0404040, /* bg_light_color */
|
||||
0xC0505050, /* border_dark_color */
|
||||
0xC0798A99 /* border_light_color */
|
||||
};
|
||||
|
||||
static const rgui_theme_t rgui_theme_legacy_red = {
|
||||
0xFFFFBDBD, /* hover_color */
|
||||
0xFFFAF6D5, /* normal_color */
|
||||
0xFFFF948A, /* title_color */
|
||||
0xC09E4137, /* bg_dark_color */
|
||||
0xC0B34B41, /* bg_light_color */
|
||||
0xC0BF5E58, /* border_dark_color */
|
||||
0xC0F27A6F /* border_light_color */
|
||||
};
|
||||
|
||||
static const rgui_theme_t rgui_theme_dark_purple = {
|
||||
0xFFF2B5D6, /* hover_color */
|
||||
0xFFE8D0CC, /* normal_color */
|
||||
0xFFC79FC2, /* title_color */
|
||||
0xC0562D56, /* bg_dark_color */
|
||||
0xC0663A66, /* bg_light_color */
|
||||
0xC0885783, /* border_dark_color */
|
||||
0xC0A675A1 /* border_light_color */
|
||||
};
|
||||
|
||||
static const rgui_theme_t rgui_theme_midnight_blue = {
|
||||
0xFFB2D3ED, /* hover_color */
|
||||
0xFFD3DCDE, /* normal_color */
|
||||
0xFF86A1BA, /* title_color */
|
||||
0xC024374A, /* bg_dark_color */
|
||||
0xC03C4D5E, /* bg_light_color */
|
||||
0xC046586A, /* border_dark_color */
|
||||
0xC06D7F91 /* border_light_color */
|
||||
};
|
||||
|
||||
static const rgui_theme_t rgui_theme_golden = {
|
||||
0xFFFFE666, /* hover_color */
|
||||
0xFFFFFFDC, /* normal_color */
|
||||
0xFFFFCC00, /* title_color */
|
||||
0xC0B88D0B, /* bg_dark_color */
|
||||
0xC0BF962B, /* bg_light_color */
|
||||
0xC0e1ad21, /* border_dark_color */
|
||||
0xC0FCC717 /* border_light_color */
|
||||
};
|
||||
|
||||
static const rgui_theme_t rgui_theme_electric_blue = {
|
||||
0xFF7DF9FF, /* hover_color */
|
||||
0xFFDBE9F4, /* normal_color */
|
||||
0xFF86CDE0, /* title_color */
|
||||
0xC02E69C6, /* bg_dark_color */
|
||||
0xC0007FFF, /* bg_light_color */
|
||||
0xC034A5D8, /* border_dark_color */
|
||||
0xC070C9FF /* border_light_color */
|
||||
};
|
||||
|
||||
static const rgui_theme_t rgui_theme_apple_green = {
|
||||
0xFFB0FC64, /* hover_color */
|
||||
0xFFD8F2CB, /* normal_color */
|
||||
0xFFA6D652, /* title_color */
|
||||
0xC04F7942, /* bg_dark_color */
|
||||
0xC0688539, /* bg_light_color */
|
||||
0xC0608E3A, /* border_dark_color */
|
||||
0xC09AB973 /* border_light_color */
|
||||
};
|
||||
|
||||
static const rgui_theme_t rgui_theme_volcanic_red = {
|
||||
0xFFFFCC99, /* hover_color */
|
||||
0xFFD3D3D3, /* normal_color */
|
||||
0xFFDDADAF, /* title_color */
|
||||
0xC0922724, /* bg_dark_color */
|
||||
0xC0BD0F1E, /* bg_light_color */
|
||||
0xC0CE2029, /* border_dark_color */
|
||||
0xC0FF0000 /* border_light_color */
|
||||
};
|
||||
|
||||
static const rgui_theme_t rgui_theme_lagoon = {
|
||||
0xFFBCE1EB, /* hover_color */
|
||||
0xFFCFCFC4, /* normal_color */
|
||||
0xFF86C7C7, /* title_color */
|
||||
0xC0495C6B, /* bg_dark_color */
|
||||
0xC0526778, /* bg_light_color */
|
||||
0xC058848F, /* border_dark_color */
|
||||
0xC060909C /* border_light_color */
|
||||
};
|
||||
|
||||
static const rgui_theme_t rgui_theme_brogrammer = {
|
||||
0xFF3498DB, /* hover_color */
|
||||
0xFFECF0F1, /* normal_color */
|
||||
0xFF2ECC71, /* title_color */
|
||||
0xC0242424, /* bg_dark_color */
|
||||
0xC0242424, /* bg_light_color */
|
||||
0xC0E74C3C, /* border_dark_color */
|
||||
0xC0E74C3C /* border_light_color */
|
||||
};
|
||||
|
||||
static const rgui_theme_t rgui_theme_dracula = {
|
||||
0xFFBD93F9, /* hover_color */
|
||||
0xFFF8F8F2, /* normal_color */
|
||||
0xFFFF79C6, /* title_color */
|
||||
0xC02F3240, /* bg_dark_color */
|
||||
0xC02F3240, /* bg_light_color */
|
||||
0xC06272A4, /* border_dark_color */
|
||||
0xC06272A4 /* border_light_color */
|
||||
};
|
||||
|
||||
static const rgui_theme_t rgui_theme_fairyfloss = {
|
||||
0xFFFFF352, /* hover_color */
|
||||
0xFFF8F8F2, /* normal_color */
|
||||
0xFFFFB8D1, /* title_color */
|
||||
0xC0675F87, /* bg_dark_color */
|
||||
0xC0675F87, /* bg_light_color */
|
||||
0xC08077A8, /* border_dark_color */
|
||||
0xC08077A8 /* border_light_color */
|
||||
};
|
||||
|
||||
static const rgui_theme_t rgui_theme_flatui = {
|
||||
0xFF0A74B9, /* hover_color */
|
||||
0xFF2C3E50, /* normal_color */
|
||||
0xFF8E44AD, /* title_color */
|
||||
0xE0ECF0F1, /* bg_dark_color */
|
||||
0xE0ECF0F1, /* bg_light_color */
|
||||
0xE095A5A6, /* border_dark_color */
|
||||
0xE095A5A6 /* border_light_color */
|
||||
};
|
||||
|
||||
static const rgui_theme_t rgui_theme_gruvbox_dark = {
|
||||
0xFFFE8019, /* hover_color */
|
||||
0xFFEBDBB2, /* normal_color */
|
||||
0xFF83A598, /* title_color */
|
||||
0xC03D3D3D, /* bg_dark_color */
|
||||
0xC03D3D3D, /* bg_light_color */
|
||||
0xC099897A, /* border_dark_color */
|
||||
0xC099897A /* border_light_color */
|
||||
};
|
||||
|
||||
static const rgui_theme_t rgui_theme_gruvbox_light = {
|
||||
0xFFAF3A03, /* hover_color */
|
||||
0xFF3C3836, /* normal_color */
|
||||
0xFF076678, /* title_color */
|
||||
0xE0FBEBC7, /* bg_dark_color */
|
||||
0xE0FBEBC7, /* bg_light_color */
|
||||
0xE0928374, /* border_dark_color */
|
||||
0xE0928374 /* border_light_color */
|
||||
};
|
||||
|
||||
static const rgui_theme_t rgui_theme_hacking_the_kernel = {
|
||||
0xFF83FF83, /* hover_color */
|
||||
0xFF00E000, /* normal_color */
|
||||
0xFF00FF00, /* title_color */
|
||||
0xC0000000, /* bg_dark_color */
|
||||
0xC0000000, /* bg_light_color */
|
||||
0xC0036303, /* border_dark_color */
|
||||
0xC0036303 /* border_light_color */
|
||||
};
|
||||
|
||||
static const rgui_theme_t rgui_theme_nord = {
|
||||
0xFF8FBCBB, /* hover_color */
|
||||
0xFFD8DEE9, /* normal_color */
|
||||
0xFF81A1C1, /* title_color */
|
||||
0xC0363C4F, /* bg_dark_color */
|
||||
0xC0363C4F, /* bg_light_color */
|
||||
0xC04E596E, /* border_dark_color */
|
||||
0xC04E596E /* border_light_color */
|
||||
};
|
||||
|
||||
static const rgui_theme_t rgui_theme_nova = {
|
||||
0XFF7FC1CA, /* hover_color */
|
||||
0XFFC5D4DD, /* normal_color */
|
||||
0XFF9A93E1, /* title_color */
|
||||
0xC0485B66, /* bg_dark_color */
|
||||
0xC0485B66, /* bg_light_color */
|
||||
0xC0627985, /* border_dark_color */
|
||||
0xC0627985 /* border_light_color */
|
||||
};
|
||||
|
||||
static const rgui_theme_t rgui_theme_one_dark = {
|
||||
0XFF98C379, /* hover_color */
|
||||
0XFFBBBBBB, /* normal_color */
|
||||
0XFFD19A66, /* title_color */
|
||||
0xC02D323B, /* bg_dark_color */
|
||||
0xC02D323B, /* bg_light_color */
|
||||
0xC0495162, /* border_dark_color */
|
||||
0xC0495162 /* border_light_color */
|
||||
};
|
||||
|
||||
static const rgui_theme_t rgui_theme_palenight = {
|
||||
0xFFC792EA, /* hover_color */
|
||||
0xFFBFC7D5, /* normal_color */
|
||||
0xFF82AAFF, /* title_color */
|
||||
0xC02F3347, /* bg_dark_color */
|
||||
0xC02F3347, /* bg_light_color */
|
||||
0xC0697098, /* border_dark_color */
|
||||
0xC0697098 /* border_light_color */
|
||||
};
|
||||
|
||||
static const rgui_theme_t rgui_theme_solarized_dark = {
|
||||
0xFFB58900, /* hover_color */
|
||||
0xFF839496, /* normal_color */
|
||||
0xFF268BD2, /* title_color */
|
||||
0xC0003542, /* bg_dark_color */
|
||||
0xC0003542, /* bg_light_color */
|
||||
0xC093A1A1, /* border_dark_color */
|
||||
0xC093A1A1 /* border_light_color */
|
||||
};
|
||||
|
||||
static const rgui_theme_t rgui_theme_solarized_light = {
|
||||
0xFFB58900, /* hover_color */
|
||||
0xFF657B83, /* normal_color */
|
||||
0xFF268BD2, /* title_color */
|
||||
0xE0FDEDDF, /* bg_dark_color */
|
||||
0xE0FDEDDF, /* bg_light_color */
|
||||
0xE093A1A1, /* border_dark_color */
|
||||
0xE093A1A1 /* border_light_color */
|
||||
};
|
||||
|
||||
static const rgui_theme_t rgui_theme_tango_dark = {
|
||||
0xFF8AE234, /* hover_color */
|
||||
0xFFEEEEEC, /* normal_color */
|
||||
0xFF729FCF, /* title_color */
|
||||
0xC0384042, /* bg_dark_color */
|
||||
0xC0384042, /* bg_light_color */
|
||||
0xC06A767A, /* border_dark_color */
|
||||
0xC06A767A /* border_light_color */
|
||||
};
|
||||
|
||||
static const rgui_theme_t rgui_theme_tango_light = {
|
||||
0xFF4E9A06, /* hover_color */
|
||||
0xFF2E3436, /* normal_color */
|
||||
0xFF204A87, /* title_color */
|
||||
0xE0EEEEEC, /* bg_dark_color */
|
||||
0xE0EEEEEC, /* bg_light_color */
|
||||
0xE0C7C7C7, /* border_dark_color */
|
||||
0xE0C7C7C7 /* border_light_color */
|
||||
};
|
||||
|
||||
static const rgui_theme_t rgui_theme_zenburn = {
|
||||
0xFFF0DFAF, /* hover_color */
|
||||
0xFFDCDCCC, /* normal_color */
|
||||
0xFF8FB28F, /* title_color */
|
||||
0xC04F4F4F, /* bg_dark_color */
|
||||
0xC04F4F4F, /* bg_light_color */
|
||||
0xC0636363, /* border_dark_color */
|
||||
0xC0636363 /* border_light_color */
|
||||
};
|
||||
|
||||
static const rgui_theme_t rgui_theme_anti_zenburn = {
|
||||
0xFF336C6C, /* hover_color */
|
||||
0xFF232333, /* normal_color */
|
||||
0xFF205070, /* title_color */
|
||||
0xE0C0C0C0, /* bg_dark_color */
|
||||
0xE0C0C0C0, /* bg_light_color */
|
||||
0xE0A0A0A0, /* border_dark_color */
|
||||
0xE0A0A0A0 /* border_light_color */
|
||||
};
|
||||
|
||||
typedef struct
|
||||
{
|
||||
uint16_t hover_color;
|
||||
@ -76,6 +407,7 @@ typedef struct
|
||||
bool border_thickness;
|
||||
float scroll_y;
|
||||
char *msgbox;
|
||||
unsigned color_theme;
|
||||
rgui_colors_t colors;
|
||||
} rgui_t;
|
||||
|
||||
@ -122,29 +454,127 @@ static uint16_t argb32_to_rgba4444(uint32_t col)
|
||||
|
||||
#endif
|
||||
|
||||
static void prepare_rgui_colors(rgui_t *rgui, settings_t *settings)
|
||||
static const rgui_theme_t *get_theme(rgui_t *rgui)
|
||||
{
|
||||
rgui->colors.hover_color = argb32_to_pixel_platform_format(settings->uints.menu_entry_hover_color);
|
||||
rgui->colors.normal_color = argb32_to_pixel_platform_format(settings->uints.menu_entry_normal_color);
|
||||
rgui->colors.title_color = argb32_to_pixel_platform_format(settings->uints.menu_title_color);
|
||||
rgui->colors.bg_dark_color = argb32_to_pixel_platform_format(settings->uints.menu_bg_dark_color);
|
||||
rgui->colors.bg_light_color = argb32_to_pixel_platform_format(settings->uints.menu_bg_light_color);
|
||||
rgui->colors.border_dark_color = argb32_to_pixel_platform_format(settings->uints.menu_border_dark_color);
|
||||
rgui->colors.border_light_color = argb32_to_pixel_platform_format(settings->uints.menu_border_light_color);
|
||||
switch (rgui->color_theme)
|
||||
{
|
||||
case RGUI_THEME_CLASSIC_RED:
|
||||
return &rgui_theme_classic_red;
|
||||
case RGUI_THEME_CLASSIC_ORANGE:
|
||||
return &rgui_theme_classic_orange;
|
||||
case RGUI_THEME_CLASSIC_YELLOW:
|
||||
return &rgui_theme_classic_yellow;
|
||||
case RGUI_THEME_CLASSIC_GREEN:
|
||||
return &rgui_theme_classic_green;
|
||||
case RGUI_THEME_CLASSIC_BLUE:
|
||||
return &rgui_theme_classic_blue;
|
||||
case RGUI_THEME_CLASSIC_VIOLET:
|
||||
return &rgui_theme_classic_violet;
|
||||
case RGUI_THEME_CLASSIC_GREY:
|
||||
return &rgui_theme_classic_grey;
|
||||
case RGUI_THEME_LEGACY_RED:
|
||||
return &rgui_theme_legacy_red;
|
||||
case RGUI_THEME_DARK_PURPLE:
|
||||
return &rgui_theme_dark_purple;
|
||||
case RGUI_THEME_MIDNIGHT_BLUE:
|
||||
return &rgui_theme_midnight_blue;
|
||||
case RGUI_THEME_GOLDEN:
|
||||
return &rgui_theme_golden;
|
||||
case RGUI_THEME_ELECTRIC_BLUE:
|
||||
return &rgui_theme_electric_blue;
|
||||
case RGUI_THEME_APPLE_GREEN:
|
||||
return &rgui_theme_apple_green;
|
||||
case RGUI_THEME_VOLCANIC_RED:
|
||||
return &rgui_theme_volcanic_red;
|
||||
case RGUI_THEME_LAGOON:
|
||||
return &rgui_theme_lagoon;
|
||||
case RGUI_THEME_BROGRAMMER:
|
||||
return &rgui_theme_brogrammer;
|
||||
case RGUI_THEME_DRACULA:
|
||||
return &rgui_theme_dracula;
|
||||
case RGUI_THEME_FAIRYFLOSS:
|
||||
return &rgui_theme_fairyfloss;
|
||||
case RGUI_THEME_FLATUI:
|
||||
return &rgui_theme_flatui;
|
||||
case RGUI_THEME_GRUVBOX_DARK:
|
||||
return &rgui_theme_gruvbox_dark;
|
||||
case RGUI_THEME_GRUVBOX_LIGHT:
|
||||
return &rgui_theme_gruvbox_light;
|
||||
case RGUI_THEME_HACKING_THE_KERNEL:
|
||||
return &rgui_theme_hacking_the_kernel;
|
||||
case RGUI_THEME_NORD:
|
||||
return &rgui_theme_nord;
|
||||
case RGUI_THEME_NOVA:
|
||||
return &rgui_theme_nova;
|
||||
case RGUI_THEME_ONE_DARK:
|
||||
return &rgui_theme_one_dark;
|
||||
case RGUI_THEME_PALENIGHT:
|
||||
return &rgui_theme_palenight;
|
||||
case RGUI_THEME_SOLARIZED_DARK:
|
||||
return &rgui_theme_solarized_dark;
|
||||
case RGUI_THEME_SOLARIZED_LIGHT:
|
||||
return &rgui_theme_solarized_light;
|
||||
case RGUI_THEME_TANGO_DARK:
|
||||
return &rgui_theme_tango_dark;
|
||||
case RGUI_THEME_TANGO_LIGHT:
|
||||
return &rgui_theme_tango_light;
|
||||
case RGUI_THEME_ZENBURN:
|
||||
return &rgui_theme_zenburn;
|
||||
case RGUI_THEME_ANTI_ZENBURN:
|
||||
return &rgui_theme_anti_zenburn;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
return &rgui_theme_classic_green;
|
||||
}
|
||||
|
||||
static uint16_t rgui_bg_filler(rgui_t *rgui, unsigned x, unsigned y, uint16_t dark_color, uint16_t light_color)
|
||||
static void prepare_rgui_colors(rgui_t *rgui, settings_t *settings)
|
||||
{
|
||||
rgui_theme_t theme_colors;
|
||||
rgui->color_theme = settings->uints.menu_rgui_color_theme;
|
||||
if (rgui->color_theme == RGUI_THEME_CUSTOM)
|
||||
{
|
||||
theme_colors.hover_color = settings->uints.menu_entry_hover_color;
|
||||
theme_colors.normal_color = settings->uints.menu_entry_normal_color;
|
||||
theme_colors.title_color = settings->uints.menu_title_color;
|
||||
theme_colors.bg_dark_color = settings->uints.menu_bg_dark_color;
|
||||
theme_colors.bg_light_color = settings->uints.menu_bg_light_color;
|
||||
theme_colors.border_dark_color = settings->uints.menu_border_dark_color;
|
||||
theme_colors.border_light_color = settings->uints.menu_border_light_color;
|
||||
}
|
||||
else
|
||||
{
|
||||
const rgui_theme_t *current_theme = get_theme(rgui);
|
||||
theme_colors.hover_color = current_theme->hover_color;
|
||||
theme_colors.normal_color = current_theme->normal_color;
|
||||
theme_colors.title_color = current_theme->title_color;
|
||||
theme_colors.bg_dark_color = current_theme->bg_dark_color;
|
||||
theme_colors.bg_light_color = current_theme->bg_light_color;
|
||||
theme_colors.border_dark_color = current_theme->border_dark_color;
|
||||
theme_colors.border_light_color = current_theme->border_light_color;
|
||||
}
|
||||
rgui->colors.hover_color = argb32_to_pixel_platform_format(theme_colors.hover_color);
|
||||
rgui->colors.normal_color = argb32_to_pixel_platform_format(theme_colors.normal_color);
|
||||
rgui->colors.title_color = argb32_to_pixel_platform_format(theme_colors.title_color);
|
||||
rgui->colors.bg_dark_color = argb32_to_pixel_platform_format(theme_colors.bg_dark_color);
|
||||
rgui->colors.bg_light_color = argb32_to_pixel_platform_format(theme_colors.bg_light_color);
|
||||
rgui->colors.border_dark_color = argb32_to_pixel_platform_format(theme_colors.border_dark_color);
|
||||
rgui->colors.border_light_color = argb32_to_pixel_platform_format(theme_colors.border_light_color);
|
||||
}
|
||||
|
||||
static uint16_t rgui_bg_filler(rgui_t *rgui, unsigned x, unsigned y)
|
||||
{
|
||||
unsigned shift = (rgui->bg_thickness ? 1 : 0);
|
||||
unsigned select = ((x >> shift) + (y >> shift)) & 1;
|
||||
return (select == 0) ? dark_color : light_color;
|
||||
return (select == 0) ? rgui->colors.bg_dark_color : rgui->colors.bg_light_color;
|
||||
}
|
||||
|
||||
static uint16_t rgui_border_filler(rgui_t *rgui, unsigned x, unsigned y, uint16_t dark_color, uint16_t light_color)
|
||||
static uint16_t rgui_border_filler(rgui_t *rgui, unsigned x, unsigned y)
|
||||
{
|
||||
unsigned shift = (rgui->border_thickness ? 1 : 0);
|
||||
unsigned select = ((x >> shift) + (y >> shift)) & 1;
|
||||
return (select == 0) ? dark_color : light_color;
|
||||
return (select == 0) ? rgui->colors.border_dark_color : rgui->colors.border_light_color;
|
||||
}
|
||||
|
||||
static void rgui_fill_rect(
|
||||
@ -153,14 +583,13 @@ static void rgui_fill_rect(
|
||||
size_t pitch,
|
||||
unsigned x, unsigned y,
|
||||
unsigned width, unsigned height,
|
||||
uint16_t dark_color, uint16_t light_color,
|
||||
uint16_t (*col)(rgui_t *rgui, unsigned x, unsigned y, uint16_t dark_color, uint16_t light_color))
|
||||
uint16_t (*col)(rgui_t *rgui, unsigned x, unsigned y))
|
||||
{
|
||||
unsigned i, j;
|
||||
|
||||
for (j = y; j < y + height; j++)
|
||||
for (i = x; i < x + width; i++)
|
||||
data[j * (pitch >> 1) + i] = col(rgui, i, j, dark_color, light_color);
|
||||
data[j * (pitch >> 1) + i] = col(rgui, i, j);
|
||||
}
|
||||
|
||||
static void rgui_color_rect(
|
||||
@ -288,7 +717,6 @@ static void rgui_render_background(rgui_t *rgui)
|
||||
unsigned fb_width, fb_height;
|
||||
uint16_t *src = NULL;
|
||||
uint16_t *dst = NULL;
|
||||
uint16_t dark_color, light_color;
|
||||
|
||||
menu_display_get_fb_size(&fb_width, &fb_height,
|
||||
&fb_pitch);
|
||||
@ -310,18 +738,10 @@ static void rgui_render_background(rgui_t *rgui)
|
||||
|
||||
if (settings->bools.menu_rgui_border_filler_enable)
|
||||
{
|
||||
dark_color = rgui->colors.border_dark_color;
|
||||
light_color = rgui->colors.border_light_color;
|
||||
|
||||
rgui_fill_rect(rgui, rgui_framebuf_data, fb_pitch, 5, 5, fb_width - 10, 5,
|
||||
dark_color, light_color, rgui_border_filler);
|
||||
rgui_fill_rect(rgui, rgui_framebuf_data, fb_pitch, 5, fb_height - 10, fb_width - 10, 5,
|
||||
dark_color, light_color, rgui_border_filler);
|
||||
|
||||
rgui_fill_rect(rgui, rgui_framebuf_data, fb_pitch, 5, 5, 5, fb_height - 10,
|
||||
dark_color, light_color, rgui_border_filler);
|
||||
rgui_fill_rect(rgui, rgui_framebuf_data, fb_pitch, fb_width - 10, 5, 5, fb_height - 10,
|
||||
dark_color, light_color, rgui_border_filler);
|
||||
rgui_fill_rect(rgui, rgui_framebuf_data, fb_pitch, 5, 5, fb_width - 10, 5, rgui_border_filler);
|
||||
rgui_fill_rect(rgui, rgui_framebuf_data, fb_pitch, 5, fb_height - 10, fb_width - 10, 5, rgui_border_filler);
|
||||
rgui_fill_rect(rgui, rgui_framebuf_data, fb_pitch, 5, 5, 5, fb_height - 10, rgui_border_filler);
|
||||
rgui_fill_rect(rgui, rgui_framebuf_data, fb_pitch, fb_width - 10, 5, 5, fb_height - 10, rgui_border_filler);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -342,8 +762,6 @@ static void rgui_set_message(void *data, const char *message)
|
||||
static void rgui_render_messagebox(rgui_t *rgui, const char *message)
|
||||
{
|
||||
int x, y;
|
||||
uint16_t normal_color;
|
||||
uint16_t dark_color, light_color;
|
||||
size_t i, fb_pitch;
|
||||
unsigned fb_width, fb_height;
|
||||
unsigned width, glyphs_width, height;
|
||||
@ -393,31 +811,17 @@ static void rgui_render_messagebox(rgui_t *rgui, const char *message)
|
||||
|
||||
if (rgui_framebuf_data)
|
||||
{
|
||||
dark_color = rgui->colors.bg_dark_color;
|
||||
light_color = rgui->colors.bg_light_color;
|
||||
|
||||
rgui_fill_rect(rgui, rgui_framebuf_data, fb_pitch, x + 5, y + 5, width - 10, height - 10,
|
||||
dark_color, light_color, rgui_bg_filler);
|
||||
rgui_fill_rect(rgui, rgui_framebuf_data, fb_pitch, x + 5, y + 5, width - 10, height - 10, rgui_bg_filler);
|
||||
|
||||
if (settings->bools.menu_rgui_border_filler_enable)
|
||||
{
|
||||
|
||||
dark_color = rgui->colors.border_dark_color;
|
||||
light_color = rgui->colors.border_light_color;
|
||||
|
||||
rgui_fill_rect(rgui, rgui_framebuf_data, fb_pitch, x, y, width - 5, 5,
|
||||
dark_color, light_color, rgui_border_filler);
|
||||
rgui_fill_rect(rgui, rgui_framebuf_data, fb_pitch, x + width - 5, y, 5, height - 5,
|
||||
dark_color, light_color, rgui_border_filler);
|
||||
rgui_fill_rect(rgui, rgui_framebuf_data, fb_pitch, x + 5, y + height - 5, width - 5, 5,
|
||||
dark_color, light_color, rgui_border_filler);
|
||||
rgui_fill_rect(rgui, rgui_framebuf_data, fb_pitch, x, y + 5, 5, height - 5,
|
||||
dark_color, light_color, rgui_border_filler);
|
||||
rgui_fill_rect(rgui, rgui_framebuf_data, fb_pitch, x, y, width - 5, 5, rgui_border_filler);
|
||||
rgui_fill_rect(rgui, rgui_framebuf_data, fb_pitch, x + width - 5, y, 5, height - 5, rgui_border_filler);
|
||||
rgui_fill_rect(rgui, rgui_framebuf_data, fb_pitch, x + 5, y + height - 5, width - 5, 5, rgui_border_filler);
|
||||
rgui_fill_rect(rgui, rgui_framebuf_data, fb_pitch, x, y + 5, 5, height - 5, rgui_border_filler);
|
||||
}
|
||||
}
|
||||
|
||||
normal_color = rgui->colors.normal_color;
|
||||
|
||||
for (i = 0; i < list->size; i++)
|
||||
{
|
||||
const char *msg = list->elems[i].data;
|
||||
@ -425,7 +829,7 @@ static void rgui_render_messagebox(rgui_t *rgui, const char *message)
|
||||
int offset_y = (int)(FONT_HEIGHT_STRIDE * i);
|
||||
|
||||
if (rgui_framebuf_data)
|
||||
blit_line(x + 8 + offset_x, y + 8 + offset_y, msg, normal_color);
|
||||
blit_line(x + 8 + offset_x, y + 8 + offset_y, msg, rgui->colors.normal_color);
|
||||
}
|
||||
|
||||
end:
|
||||
@ -462,6 +866,12 @@ static void rgui_frame(void *data, video_frame_info_t *video_info)
|
||||
rgui->bg_thickness = settings->bools.menu_rgui_background_filler_thickness_enable;
|
||||
rgui->border_thickness = settings->bools.menu_rgui_border_filler_thickness_enable;
|
||||
|
||||
if (settings->uints.menu_rgui_color_theme != rgui->color_theme)
|
||||
{
|
||||
prepare_rgui_colors(rgui, settings);
|
||||
rgui->bg_modified = true;
|
||||
}
|
||||
|
||||
rgui->frame_count++;
|
||||
}
|
||||
|
||||
@ -469,8 +879,6 @@ static void rgui_render(void *data, bool is_idle)
|
||||
{
|
||||
menu_animation_ctx_ticker_t ticker;
|
||||
unsigned x, y;
|
||||
uint16_t hover_color, normal_color;
|
||||
uint16_t dark_color, light_color;
|
||||
size_t i, end, fb_pitch, old_start;
|
||||
unsigned fb_width, fb_height;
|
||||
int bottom;
|
||||
@ -506,11 +914,7 @@ static void rgui_render(void *data, bool is_idle)
|
||||
{
|
||||
if (rgui_framebuf_data)
|
||||
{
|
||||
dark_color = rgui->colors.bg_dark_color;
|
||||
light_color = rgui->colors.bg_light_color;
|
||||
|
||||
rgui_fill_rect(rgui, rgui_framebuf_data, fb_pitch, 0, fb_height, fb_width, 4,
|
||||
dark_color, light_color, rgui_bg_filler);
|
||||
rgui_fill_rect(rgui, rgui_framebuf_data, fb_pitch, 0, fb_height, fb_width, 4, rgui_bg_filler);
|
||||
}
|
||||
rgui->last_width = fb_width;
|
||||
rgui->last_height = fb_height;
|
||||
@ -594,9 +998,6 @@ static void rgui_render(void *data, bool is_idle)
|
||||
|
||||
menu_animation_ticker(&ticker);
|
||||
|
||||
hover_color = rgui->colors.hover_color;
|
||||
normal_color = rgui->colors.normal_color;
|
||||
|
||||
if (menu_entries_ctl(MENU_ENTRIES_CTL_SHOW_BACK, NULL))
|
||||
{
|
||||
char back_buf[32];
|
||||
@ -630,7 +1031,7 @@ static void rgui_render(void *data, bool is_idle)
|
||||
blit_line(
|
||||
RGUI_TERM_START_X(fb_width),
|
||||
(RGUI_TERM_HEIGHT(fb_width, fb_height) * FONT_HEIGHT_STRIDE) +
|
||||
RGUI_TERM_START_Y(fb_height) + 2, title_msg, hover_color);
|
||||
RGUI_TERM_START_Y(fb_height) + 2, title_msg, rgui->colors.hover_color);
|
||||
}
|
||||
|
||||
if (settings->bools.menu_timedate_enable)
|
||||
@ -650,7 +1051,7 @@ static void rgui_render(void *data, bool is_idle)
|
||||
blit_line(
|
||||
RGUI_TERM_WIDTH(fb_width) * FONT_WIDTH_STRIDE - RGUI_TERM_START_X(fb_width),
|
||||
(RGUI_TERM_HEIGHT(fb_width, fb_height) * FONT_HEIGHT_STRIDE) +
|
||||
RGUI_TERM_START_Y(fb_height) + 2, timedate, hover_color);
|
||||
RGUI_TERM_START_Y(fb_height) + 2, timedate, rgui->colors.hover_color);
|
||||
}
|
||||
|
||||
x = RGUI_TERM_START_X(fb_width);
|
||||
@ -715,7 +1116,7 @@ static void rgui_render(void *data, bool is_idle)
|
||||
|
||||
if (rgui_framebuf_data)
|
||||
blit_line(x, y, message,
|
||||
entry_selected ? hover_color : normal_color);
|
||||
entry_selected ? rgui->colors.hover_color : rgui->colors.normal_color);
|
||||
|
||||
menu_entry_free(&entry);
|
||||
if (!string_is_empty(entry_path))
|
||||
|
@ -5983,6 +5983,10 @@ bool menu_displaylist_ctl(enum menu_displaylist_ctl_state type, menu_displaylist
|
||||
MENU_ENUM_LABEL_MENU_HORIZONTAL_ANIMATION,
|
||||
PARSE_ONLY_BOOL, false) == 0)
|
||||
count++;
|
||||
if (menu_displaylist_parse_settings_enum(menu, info,
|
||||
MENU_ENUM_LABEL_RGUI_MENU_COLOR_THEME,
|
||||
PARSE_ONLY_UINT, false) == 0)
|
||||
count++;
|
||||
if (menu_displaylist_parse_settings_enum(menu, info,
|
||||
MENU_ENUM_LABEL_ENTRY_NORMAL_COLOR,
|
||||
PARSE_ONLY_HEX, false) == 0)
|
||||
|
@ -253,6 +253,44 @@ enum menu_settings_type
|
||||
MENU_SETTINGS_LAST
|
||||
};
|
||||
|
||||
enum rgui_color_theme
|
||||
{
|
||||
RGUI_THEME_CUSTOM = 0,
|
||||
RGUI_THEME_CLASSIC_RED,
|
||||
RGUI_THEME_CLASSIC_ORANGE,
|
||||
RGUI_THEME_CLASSIC_YELLOW,
|
||||
RGUI_THEME_CLASSIC_GREEN,
|
||||
RGUI_THEME_CLASSIC_BLUE,
|
||||
RGUI_THEME_CLASSIC_VIOLET,
|
||||
RGUI_THEME_CLASSIC_GREY,
|
||||
RGUI_THEME_LEGACY_RED,
|
||||
RGUI_THEME_DARK_PURPLE,
|
||||
RGUI_THEME_MIDNIGHT_BLUE,
|
||||
RGUI_THEME_GOLDEN,
|
||||
RGUI_THEME_ELECTRIC_BLUE,
|
||||
RGUI_THEME_APPLE_GREEN,
|
||||
RGUI_THEME_VOLCANIC_RED,
|
||||
RGUI_THEME_LAGOON,
|
||||
RGUI_THEME_BROGRAMMER,
|
||||
RGUI_THEME_DRACULA,
|
||||
RGUI_THEME_FAIRYFLOSS,
|
||||
RGUI_THEME_FLATUI,
|
||||
RGUI_THEME_GRUVBOX_DARK,
|
||||
RGUI_THEME_GRUVBOX_LIGHT,
|
||||
RGUI_THEME_HACKING_THE_KERNEL,
|
||||
RGUI_THEME_NORD,
|
||||
RGUI_THEME_NOVA,
|
||||
RGUI_THEME_ONE_DARK,
|
||||
RGUI_THEME_PALENIGHT,
|
||||
RGUI_THEME_SOLARIZED_DARK,
|
||||
RGUI_THEME_SOLARIZED_LIGHT,
|
||||
RGUI_THEME_TANGO_DARK,
|
||||
RGUI_THEME_TANGO_LIGHT,
|
||||
RGUI_THEME_ZENBURN,
|
||||
RGUI_THEME_ANTI_ZENBURN,
|
||||
RGUI_THEME_LAST
|
||||
};
|
||||
|
||||
enum materialui_color_theme
|
||||
{
|
||||
MATERIALUI_THEME_BLUE = 0,
|
||||
|
@ -576,6 +576,216 @@ static void setting_get_string_representation_uint_menu_timedate_style(
|
||||
}
|
||||
}
|
||||
|
||||
static void setting_get_string_representation_uint_rgui_menu_color_theme(
|
||||
rarch_setting_t *setting,
|
||||
char *s, size_t len)
|
||||
{
|
||||
if (!setting)
|
||||
return;
|
||||
|
||||
switch (*setting->value.target.unsigned_integer)
|
||||
{
|
||||
case RGUI_THEME_CUSTOM:
|
||||
strlcpy(s,
|
||||
msg_hash_to_str(
|
||||
MENU_ENUM_LABEL_VALUE_RGUI_MENU_COLOR_THEME_CUSTOM),
|
||||
len);
|
||||
break;
|
||||
case RGUI_THEME_CLASSIC_RED:
|
||||
strlcpy(s,
|
||||
msg_hash_to_str(
|
||||
MENU_ENUM_LABEL_VALUE_RGUI_MENU_COLOR_THEME_CLASSIC_RED),
|
||||
len);
|
||||
break;
|
||||
case RGUI_THEME_CLASSIC_ORANGE:
|
||||
strlcpy(s,
|
||||
msg_hash_to_str(
|
||||
MENU_ENUM_LABEL_VALUE_RGUI_MENU_COLOR_THEME_CLASSIC_ORANGE),
|
||||
len);
|
||||
break;
|
||||
case RGUI_THEME_CLASSIC_YELLOW:
|
||||
strlcpy(s,
|
||||
msg_hash_to_str(
|
||||
MENU_ENUM_LABEL_VALUE_RGUI_MENU_COLOR_THEME_CLASSIC_YELLOW),
|
||||
len);
|
||||
break;
|
||||
case RGUI_THEME_CLASSIC_GREEN:
|
||||
strlcpy(s,
|
||||
msg_hash_to_str(
|
||||
MENU_ENUM_LABEL_VALUE_RGUI_MENU_COLOR_THEME_CLASSIC_GREEN),
|
||||
len);
|
||||
break;
|
||||
case RGUI_THEME_CLASSIC_BLUE:
|
||||
strlcpy(s,
|
||||
msg_hash_to_str(
|
||||
MENU_ENUM_LABEL_VALUE_RGUI_MENU_COLOR_THEME_CLASSIC_BLUE),
|
||||
len);
|
||||
break;
|
||||
case RGUI_THEME_CLASSIC_VIOLET:
|
||||
strlcpy(s,
|
||||
msg_hash_to_str(
|
||||
MENU_ENUM_LABEL_VALUE_RGUI_MENU_COLOR_THEME_CLASSIC_VIOLET),
|
||||
len);
|
||||
break;
|
||||
case RGUI_THEME_CLASSIC_GREY:
|
||||
strlcpy(s,
|
||||
msg_hash_to_str(
|
||||
MENU_ENUM_LABEL_VALUE_RGUI_MENU_COLOR_THEME_CLASSIC_GREY),
|
||||
len);
|
||||
break;
|
||||
case RGUI_THEME_LEGACY_RED:
|
||||
strlcpy(s,
|
||||
msg_hash_to_str(
|
||||
MENU_ENUM_LABEL_VALUE_RGUI_MENU_COLOR_THEME_LEGACY_RED),
|
||||
len);
|
||||
break;
|
||||
case RGUI_THEME_DARK_PURPLE:
|
||||
strlcpy(s,
|
||||
msg_hash_to_str(
|
||||
MENU_ENUM_LABEL_VALUE_RGUI_MENU_COLOR_THEME_DARK_PURPLE),
|
||||
len);
|
||||
break;
|
||||
case RGUI_THEME_MIDNIGHT_BLUE:
|
||||
strlcpy(s,
|
||||
msg_hash_to_str(
|
||||
MENU_ENUM_LABEL_VALUE_RGUI_MENU_COLOR_THEME_MIDNIGHT_BLUE),
|
||||
len);
|
||||
break;
|
||||
case RGUI_THEME_GOLDEN:
|
||||
strlcpy(s,
|
||||
msg_hash_to_str(
|
||||
MENU_ENUM_LABEL_VALUE_RGUI_MENU_COLOR_THEME_GOLDEN),
|
||||
len);
|
||||
break;
|
||||
case RGUI_THEME_ELECTRIC_BLUE:
|
||||
strlcpy(s,
|
||||
msg_hash_to_str(
|
||||
MENU_ENUM_LABEL_VALUE_RGUI_MENU_COLOR_THEME_ELECTRIC_BLUE),
|
||||
len);
|
||||
break;
|
||||
case RGUI_THEME_APPLE_GREEN:
|
||||
strlcpy(s,
|
||||
msg_hash_to_str(
|
||||
MENU_ENUM_LABEL_VALUE_RGUI_MENU_COLOR_THEME_APPLE_GREEN),
|
||||
len);
|
||||
break;
|
||||
case RGUI_THEME_VOLCANIC_RED:
|
||||
strlcpy(s,
|
||||
msg_hash_to_str(
|
||||
MENU_ENUM_LABEL_VALUE_RGUI_MENU_COLOR_THEME_VOLCANIC_RED),
|
||||
len);
|
||||
break;
|
||||
case RGUI_THEME_LAGOON:
|
||||
strlcpy(s,
|
||||
msg_hash_to_str(
|
||||
MENU_ENUM_LABEL_VALUE_RGUI_MENU_COLOR_THEME_LAGOON),
|
||||
len);
|
||||
break;
|
||||
case RGUI_THEME_BROGRAMMER:
|
||||
strlcpy(s,
|
||||
msg_hash_to_str(
|
||||
MENU_ENUM_LABEL_VALUE_RGUI_MENU_COLOR_THEME_BROGRAMMER),
|
||||
len);
|
||||
break;
|
||||
case RGUI_THEME_DRACULA:
|
||||
strlcpy(s,
|
||||
msg_hash_to_str(
|
||||
MENU_ENUM_LABEL_VALUE_RGUI_MENU_COLOR_THEME_DRACULA),
|
||||
len);
|
||||
break;
|
||||
case RGUI_THEME_FAIRYFLOSS:
|
||||
strlcpy(s,
|
||||
msg_hash_to_str(
|
||||
MENU_ENUM_LABEL_VALUE_RGUI_MENU_COLOR_THEME_FAIRYFLOSS),
|
||||
len);
|
||||
break;
|
||||
case RGUI_THEME_FLATUI:
|
||||
strlcpy(s,
|
||||
msg_hash_to_str(
|
||||
MENU_ENUM_LABEL_VALUE_RGUI_MENU_COLOR_THEME_FLATUI),
|
||||
len);
|
||||
break;
|
||||
case RGUI_THEME_GRUVBOX_DARK:
|
||||
strlcpy(s,
|
||||
msg_hash_to_str(
|
||||
MENU_ENUM_LABEL_VALUE_RGUI_MENU_COLOR_THEME_GRUVBOX_DARK),
|
||||
len);
|
||||
break;
|
||||
case RGUI_THEME_GRUVBOX_LIGHT:
|
||||
strlcpy(s,
|
||||
msg_hash_to_str(
|
||||
MENU_ENUM_LABEL_VALUE_RGUI_MENU_COLOR_THEME_GRUVBOX_LIGHT),
|
||||
len);
|
||||
break;
|
||||
case RGUI_THEME_HACKING_THE_KERNEL:
|
||||
strlcpy(s,
|
||||
msg_hash_to_str(
|
||||
MENU_ENUM_LABEL_VALUE_RGUI_MENU_COLOR_THEME_HACKING_THE_KERNEL),
|
||||
len);
|
||||
break;
|
||||
case RGUI_THEME_NORD:
|
||||
strlcpy(s,
|
||||
msg_hash_to_str(
|
||||
MENU_ENUM_LABEL_VALUE_RGUI_MENU_COLOR_THEME_NORD),
|
||||
len);
|
||||
break;
|
||||
case RGUI_THEME_NOVA:
|
||||
strlcpy(s,
|
||||
msg_hash_to_str(
|
||||
MENU_ENUM_LABEL_VALUE_RGUI_MENU_COLOR_THEME_NOVA),
|
||||
len);
|
||||
break;
|
||||
case RGUI_THEME_ONE_DARK:
|
||||
strlcpy(s,
|
||||
msg_hash_to_str(
|
||||
MENU_ENUM_LABEL_VALUE_RGUI_MENU_COLOR_THEME_ONE_DARK),
|
||||
len);
|
||||
break;
|
||||
case RGUI_THEME_PALENIGHT:
|
||||
strlcpy(s,
|
||||
msg_hash_to_str(
|
||||
MENU_ENUM_LABEL_VALUE_RGUI_MENU_COLOR_THEME_PALENIGHT),
|
||||
len);
|
||||
break;
|
||||
case RGUI_THEME_SOLARIZED_DARK:
|
||||
strlcpy(s,
|
||||
msg_hash_to_str(
|
||||
MENU_ENUM_LABEL_VALUE_RGUI_MENU_COLOR_THEME_SOLARIZED_DARK),
|
||||
len);
|
||||
break;
|
||||
case RGUI_THEME_SOLARIZED_LIGHT:
|
||||
strlcpy(s,
|
||||
msg_hash_to_str(
|
||||
MENU_ENUM_LABEL_VALUE_RGUI_MENU_COLOR_THEME_SOLARIZED_LIGHT),
|
||||
len);
|
||||
break;
|
||||
case RGUI_THEME_TANGO_DARK:
|
||||
strlcpy(s,
|
||||
msg_hash_to_str(
|
||||
MENU_ENUM_LABEL_VALUE_RGUI_MENU_COLOR_THEME_TANGO_DARK),
|
||||
len);
|
||||
break;
|
||||
case RGUI_THEME_TANGO_LIGHT:
|
||||
strlcpy(s,
|
||||
msg_hash_to_str(
|
||||
MENU_ENUM_LABEL_VALUE_RGUI_MENU_COLOR_THEME_TANGO_LIGHT),
|
||||
len);
|
||||
break;
|
||||
case RGUI_THEME_ZENBURN:
|
||||
strlcpy(s,
|
||||
msg_hash_to_str(
|
||||
MENU_ENUM_LABEL_VALUE_RGUI_MENU_COLOR_THEME_ZENBURN),
|
||||
len);
|
||||
break;
|
||||
case RGUI_THEME_ANTI_ZENBURN:
|
||||
strlcpy(s,
|
||||
msg_hash_to_str(
|
||||
MENU_ENUM_LABEL_VALUE_RGUI_MENU_COLOR_THEME_ANTI_ZENBURN),
|
||||
len);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
static void setting_get_string_representation_uint_xmb_icon_theme(
|
||||
rarch_setting_t *setting,
|
||||
char *s, size_t len)
|
||||
@ -7611,7 +7821,22 @@ static bool setting_append_list(
|
||||
SD_FLAG_NONE
|
||||
);
|
||||
|
||||
/* These colors are hints. The menu driver is not required to use them. */
|
||||
CONFIG_UINT(
|
||||
list, list_info,
|
||||
&settings->uints.menu_rgui_color_theme,
|
||||
MENU_ENUM_LABEL_RGUI_MENU_COLOR_THEME,
|
||||
MENU_ENUM_LABEL_VALUE_RGUI_MENU_COLOR_THEME,
|
||||
rgui_color_theme,
|
||||
&group_info,
|
||||
&subgroup_info,
|
||||
parent_group,
|
||||
general_write_handler,
|
||||
general_read_handler);
|
||||
(*list)[list_info->index - 1].action_ok = &setting_action_ok_uint;
|
||||
(*list)[list_info->index - 1].get_string_representation =
|
||||
&setting_get_string_representation_uint_rgui_menu_color_theme;
|
||||
menu_settings_list_current_add_range(list, list_info, 0, RGUI_THEME_LAST-1, 1, true, true);
|
||||
|
||||
CONFIG_HEX(
|
||||
list, list_info,
|
||||
&settings->uints.menu_entry_normal_color,
|
||||
@ -7653,7 +7878,7 @@ static bool setting_append_list(
|
||||
general_read_handler);
|
||||
settings_data_list_current_add_flags(list, list_info, SD_FLAG_ALLOW_INPUT);
|
||||
settings_data_list_current_add_flags(list, list_info, SD_FLAG_ADVANCED);
|
||||
|
||||
|
||||
CONFIG_HEX(
|
||||
list, list_info,
|
||||
&settings->uints.menu_bg_dark_color,
|
||||
@ -7667,7 +7892,7 @@ static bool setting_append_list(
|
||||
general_read_handler);
|
||||
settings_data_list_current_add_flags(list, list_info, SD_FLAG_ALLOW_INPUT);
|
||||
settings_data_list_current_add_flags(list, list_info, SD_FLAG_ADVANCED);
|
||||
|
||||
|
||||
CONFIG_HEX(
|
||||
list, list_info,
|
||||
&settings->uints.menu_bg_light_color,
|
||||
@ -7681,7 +7906,7 @@ static bool setting_append_list(
|
||||
general_read_handler);
|
||||
settings_data_list_current_add_flags(list, list_info, SD_FLAG_ALLOW_INPUT);
|
||||
settings_data_list_current_add_flags(list, list_info, SD_FLAG_ADVANCED);
|
||||
|
||||
|
||||
CONFIG_HEX(
|
||||
list, list_info,
|
||||
&settings->uints.menu_border_dark_color,
|
||||
@ -7695,7 +7920,7 @@ static bool setting_append_list(
|
||||
general_read_handler);
|
||||
settings_data_list_current_add_flags(list, list_info, SD_FLAG_ALLOW_INPUT);
|
||||
settings_data_list_current_add_flags(list, list_info, SD_FLAG_ADVANCED);
|
||||
|
||||
|
||||
CONFIG_HEX(
|
||||
list, list_info,
|
||||
&settings->uints.menu_border_light_color,
|
||||
|
35
msg_hash.h
35
msg_hash.h
@ -483,6 +483,40 @@ enum msg_hash_enums
|
||||
|
||||
MENU_LABEL(MATERIALUI_ICONS_ENABLE),
|
||||
|
||||
MENU_ENUM_LABEL_VALUE_RGUI_MENU_COLOR_THEME_CUSTOM,
|
||||
MENU_ENUM_LABEL_VALUE_RGUI_MENU_COLOR_THEME_CLASSIC_RED,
|
||||
MENU_ENUM_LABEL_VALUE_RGUI_MENU_COLOR_THEME_CLASSIC_ORANGE,
|
||||
MENU_ENUM_LABEL_VALUE_RGUI_MENU_COLOR_THEME_CLASSIC_YELLOW,
|
||||
MENU_ENUM_LABEL_VALUE_RGUI_MENU_COLOR_THEME_CLASSIC_GREEN,
|
||||
MENU_ENUM_LABEL_VALUE_RGUI_MENU_COLOR_THEME_CLASSIC_BLUE,
|
||||
MENU_ENUM_LABEL_VALUE_RGUI_MENU_COLOR_THEME_CLASSIC_VIOLET,
|
||||
MENU_ENUM_LABEL_VALUE_RGUI_MENU_COLOR_THEME_CLASSIC_GREY,
|
||||
MENU_ENUM_LABEL_VALUE_RGUI_MENU_COLOR_THEME_LEGACY_RED,
|
||||
MENU_ENUM_LABEL_VALUE_RGUI_MENU_COLOR_THEME_DARK_PURPLE,
|
||||
MENU_ENUM_LABEL_VALUE_RGUI_MENU_COLOR_THEME_MIDNIGHT_BLUE,
|
||||
MENU_ENUM_LABEL_VALUE_RGUI_MENU_COLOR_THEME_GOLDEN,
|
||||
MENU_ENUM_LABEL_VALUE_RGUI_MENU_COLOR_THEME_ELECTRIC_BLUE,
|
||||
MENU_ENUM_LABEL_VALUE_RGUI_MENU_COLOR_THEME_APPLE_GREEN,
|
||||
MENU_ENUM_LABEL_VALUE_RGUI_MENU_COLOR_THEME_VOLCANIC_RED,
|
||||
MENU_ENUM_LABEL_VALUE_RGUI_MENU_COLOR_THEME_LAGOON,
|
||||
MENU_ENUM_LABEL_VALUE_RGUI_MENU_COLOR_THEME_BROGRAMMER,
|
||||
MENU_ENUM_LABEL_VALUE_RGUI_MENU_COLOR_THEME_DRACULA,
|
||||
MENU_ENUM_LABEL_VALUE_RGUI_MENU_COLOR_THEME_FAIRYFLOSS,
|
||||
MENU_ENUM_LABEL_VALUE_RGUI_MENU_COLOR_THEME_FLATUI,
|
||||
MENU_ENUM_LABEL_VALUE_RGUI_MENU_COLOR_THEME_GRUVBOX_DARK,
|
||||
MENU_ENUM_LABEL_VALUE_RGUI_MENU_COLOR_THEME_GRUVBOX_LIGHT,
|
||||
MENU_ENUM_LABEL_VALUE_RGUI_MENU_COLOR_THEME_HACKING_THE_KERNEL,
|
||||
MENU_ENUM_LABEL_VALUE_RGUI_MENU_COLOR_THEME_NORD,
|
||||
MENU_ENUM_LABEL_VALUE_RGUI_MENU_COLOR_THEME_NOVA,
|
||||
MENU_ENUM_LABEL_VALUE_RGUI_MENU_COLOR_THEME_ONE_DARK,
|
||||
MENU_ENUM_LABEL_VALUE_RGUI_MENU_COLOR_THEME_PALENIGHT,
|
||||
MENU_ENUM_LABEL_VALUE_RGUI_MENU_COLOR_THEME_SOLARIZED_DARK,
|
||||
MENU_ENUM_LABEL_VALUE_RGUI_MENU_COLOR_THEME_SOLARIZED_LIGHT,
|
||||
MENU_ENUM_LABEL_VALUE_RGUI_MENU_COLOR_THEME_TANGO_DARK,
|
||||
MENU_ENUM_LABEL_VALUE_RGUI_MENU_COLOR_THEME_TANGO_LIGHT,
|
||||
MENU_ENUM_LABEL_VALUE_RGUI_MENU_COLOR_THEME_ZENBURN,
|
||||
MENU_ENUM_LABEL_VALUE_RGUI_MENU_COLOR_THEME_ANTI_ZENBURN,
|
||||
|
||||
MENU_ENUM_LABEL_VALUE_OZONE_COLOR_THEME_BASIC_WHITE,
|
||||
MENU_ENUM_LABEL_VALUE_OZONE_COLOR_THEME_BASIC_BLACK,
|
||||
|
||||
@ -852,6 +886,7 @@ enum msg_hash_enums
|
||||
MENU_LABEL(TIMEDATE_ENABLE),
|
||||
MENU_LABEL(TIMEDATE_STYLE),
|
||||
MENU_LABEL(BATTERY_LEVEL_ENABLE),
|
||||
MENU_LABEL(RGUI_MENU_COLOR_THEME),
|
||||
MENU_LABEL(XMB_MENU_COLOR_THEME),
|
||||
MENU_LABEL(OZONE_MENU_COLOR_THEME),
|
||||
MENU_LABEL(MATERIALUI_MENU_COLOR_THEME),
|
||||
|
Loading…
x
Reference in New Issue
Block a user