This commit is contained in:
twinaphex 2016-11-25 22:43:42 +01:00
parent df6a7993b3
commit bc5b1b9d60
2 changed files with 10 additions and 16 deletions

View File

@ -633,18 +633,22 @@ static void mui_render_label_value(mui_handle_t *mui,
y + mui->line_height / 2 + label_offset,
width, height, color, TEXT_ALIGN_LEFT, 1.0f, false, 0);
if (string_is_equal(value, "disabled") || string_is_equal(value, "off"))
if (string_is_equal(value, "disabled") ||
(string_is_equal(value, msg_hash_to_str(MENU_ENUM_LABEL_VALUE_OFF))))
{
if (mui->textures.list[MUI_TEXTURE_SWITCH_OFF]) {
if (mui->textures.list[MUI_TEXTURE_SWITCH_OFF])
{
texture_switch = mui->textures.list[MUI_TEXTURE_SWITCH_OFF];
switch_is_on = false;
}
else
do_draw_text = true;
}
else if (string_is_equal(value, "enabled") || string_is_equal(value, "on"))
else if (string_is_equal(value, "enabled") ||
(string_is_equal(value, msg_hash_to_str(MENU_ENUM_LABEL_VALUE_ON))))
{
if (mui->textures.list[MUI_TEXTURE_SWITCH_ON]) {
if (mui->textures.list[MUI_TEXTURE_SWITCH_ON])
{
texture_switch = mui->textures.list[MUI_TEXTURE_SWITCH_ON];
switch_is_on = true;
}
@ -655,11 +659,6 @@ static void mui_render_label_value(mui_handle_t *mui,
{
enum msg_file_type type = msg_hash_to_file_type(msg_hash_calculate(value));
if (string_is_equal(value, msg_hash_to_str(MENU_ENUM_LABEL_VALUE_OFF)))
type = FILE_TYPE_BOOL_OFF;
else if (string_is_equal(value, msg_hash_to_str(MENU_ENUM_LABEL_VALUE_ON)))
type = FILE_TYPE_BOOL_ON;
switch (type)
{
case FILE_TYPE_COMPRESSED:

View File

@ -2012,7 +2012,7 @@ static void xmb_draw_items(xmb_handle_t *xmb,
menu_entry_get_value(i, list, entry_value, sizeof(entry_value));
if (string_is_equal(entry_value, "disabled") ||
string_is_equal(entry_value, "off"))
(string_is_equal(entry_value, msg_hash_to_str(MENU_ENUM_LABEL_VALUE_OFF))))
{
if (xmb->textures.list[XMB_TEXTURE_SWITCH_OFF])
texture_switch = xmb->textures.list[XMB_TEXTURE_SWITCH_OFF];
@ -2020,7 +2020,7 @@ static void xmb_draw_items(xmb_handle_t *xmb,
do_draw_text = true;
}
else if (string_is_equal(entry_value, "enabled") ||
string_is_equal(entry_value, "on"))
(string_is_equal(entry_value, msg_hash_to_str(MENU_ENUM_LABEL_VALUE_ON))))
{
if (xmb->textures.list[XMB_TEXTURE_SWITCH_ON])
texture_switch = xmb->textures.list[XMB_TEXTURE_SWITCH_ON];
@ -2031,11 +2031,6 @@ static void xmb_draw_items(xmb_handle_t *xmb,
{
enum msg_file_type type = msg_hash_to_file_type(msg_hash_calculate(entry_value));
if (string_is_equal(entry_value, msg_hash_to_str(MENU_ENUM_LABEL_VALUE_OFF)))
type = FILE_TYPE_BOOL_OFF;
else if (string_is_equal(entry_value, msg_hash_to_str(MENU_ENUM_LABEL_VALUE_ON)))
type = FILE_TYPE_BOOL_ON;
switch (type)
{
case FILE_TYPE_COMPRESSED: