(Menu) Implement touch/OK callbacks
This commit is contained in:
parent
48799b73d5
commit
a33280b08e
|
@ -6069,19 +6069,19 @@ unsigned menu_displaylist_build_list(file_list_t *list, enum menu_displaylist_ct
|
||||||
settings_t *settings = config_get_ptr();
|
settings_t *settings = config_get_ptr();
|
||||||
menu_displaylist_build_info_selective_t build_list[] = {
|
menu_displaylist_build_info_selective_t build_list[] = {
|
||||||
{MENU_ENUM_LABEL_VIDEO_FONT_ENABLE, PARSE_ONLY_BOOL, true },
|
{MENU_ENUM_LABEL_VIDEO_FONT_ENABLE, PARSE_ONLY_BOOL, true },
|
||||||
{MENU_ENUM_LABEL_FPS_SHOW, PARSE_ONLY_BOOL, true },
|
{MENU_ENUM_LABEL_FPS_SHOW, PARSE_ONLY_BOOL, false },
|
||||||
{MENU_ENUM_LABEL_FPS_UPDATE_INTERVAL, PARSE_ONLY_UINT, false },
|
{MENU_ENUM_LABEL_FPS_UPDATE_INTERVAL, PARSE_ONLY_UINT, false },
|
||||||
{MENU_ENUM_LABEL_FRAMECOUNT_SHOW, PARSE_ONLY_BOOL, true },
|
{MENU_ENUM_LABEL_FRAMECOUNT_SHOW, PARSE_ONLY_BOOL, false },
|
||||||
{MENU_ENUM_LABEL_STATISTICS_SHOW, PARSE_ONLY_BOOL, true },
|
{MENU_ENUM_LABEL_STATISTICS_SHOW, PARSE_ONLY_BOOL, false },
|
||||||
{MENU_ENUM_LABEL_MEMORY_SHOW, PARSE_ONLY_BOOL, true },
|
{MENU_ENUM_LABEL_MEMORY_SHOW, PARSE_ONLY_BOOL, false },
|
||||||
{MENU_ENUM_LABEL_VIDEO_FONT_PATH, PARSE_ONLY_PATH, true },
|
{MENU_ENUM_LABEL_VIDEO_FONT_PATH, PARSE_ONLY_PATH, false },
|
||||||
{MENU_ENUM_LABEL_VIDEO_FONT_SIZE, PARSE_ONLY_FLOAT, true},
|
{MENU_ENUM_LABEL_VIDEO_FONT_SIZE, PARSE_ONLY_FLOAT, false },
|
||||||
{MENU_ENUM_LABEL_VIDEO_MESSAGE_POS_X, PARSE_ONLY_FLOAT, true},
|
{MENU_ENUM_LABEL_VIDEO_MESSAGE_POS_X, PARSE_ONLY_FLOAT, false },
|
||||||
{MENU_ENUM_LABEL_VIDEO_MESSAGE_POS_Y, PARSE_ONLY_FLOAT, true},
|
{MENU_ENUM_LABEL_VIDEO_MESSAGE_POS_Y, PARSE_ONLY_FLOAT, false },
|
||||||
{MENU_ENUM_LABEL_VIDEO_MESSAGE_COLOR_RED, PARSE_ONLY_FLOAT, true},
|
{MENU_ENUM_LABEL_VIDEO_MESSAGE_COLOR_RED, PARSE_ONLY_FLOAT, false },
|
||||||
{MENU_ENUM_LABEL_VIDEO_MESSAGE_COLOR_GREEN, PARSE_ONLY_FLOAT, true},
|
{MENU_ENUM_LABEL_VIDEO_MESSAGE_COLOR_GREEN, PARSE_ONLY_FLOAT, false },
|
||||||
{MENU_ENUM_LABEL_VIDEO_MESSAGE_COLOR_BLUE, PARSE_ONLY_FLOAT, true},
|
{MENU_ENUM_LABEL_VIDEO_MESSAGE_COLOR_BLUE, PARSE_ONLY_FLOAT, false },
|
||||||
{MENU_ENUM_LABEL_VIDEO_MESSAGE_BGCOLOR_ENABLE, PARSE_ONLY_BOOL, true},
|
{MENU_ENUM_LABEL_VIDEO_MESSAGE_BGCOLOR_ENABLE, PARSE_ONLY_BOOL, false },
|
||||||
{MENU_ENUM_LABEL_VIDEO_MESSAGE_BGCOLOR_RED, PARSE_ONLY_UINT, false},
|
{MENU_ENUM_LABEL_VIDEO_MESSAGE_BGCOLOR_RED, PARSE_ONLY_UINT, false},
|
||||||
{MENU_ENUM_LABEL_VIDEO_MESSAGE_BGCOLOR_GREEN, PARSE_ONLY_UINT, false},
|
{MENU_ENUM_LABEL_VIDEO_MESSAGE_BGCOLOR_GREEN, PARSE_ONLY_UINT, false},
|
||||||
{MENU_ENUM_LABEL_VIDEO_MESSAGE_BGCOLOR_BLUE, PARSE_ONLY_UINT, false},
|
{MENU_ENUM_LABEL_VIDEO_MESSAGE_BGCOLOR_BLUE, PARSE_ONLY_UINT, false},
|
||||||
|
@ -6093,6 +6093,7 @@ unsigned menu_displaylist_build_list(file_list_t *list, enum menu_displaylist_ct
|
||||||
switch (build_list[i].enum_idx)
|
switch (build_list[i].enum_idx)
|
||||||
{
|
{
|
||||||
case MENU_ENUM_LABEL_FPS_UPDATE_INTERVAL:
|
case MENU_ENUM_LABEL_FPS_UPDATE_INTERVAL:
|
||||||
|
if (settings->bools.video_font_enable)
|
||||||
if (settings->bools.video_fps_show)
|
if (settings->bools.video_fps_show)
|
||||||
build_list[i].checked = true;
|
build_list[i].checked = true;
|
||||||
break;
|
break;
|
||||||
|
@ -6100,10 +6101,13 @@ unsigned menu_displaylist_build_list(file_list_t *list, enum menu_displaylist_ct
|
||||||
case MENU_ENUM_LABEL_VIDEO_MESSAGE_BGCOLOR_GREEN:
|
case MENU_ENUM_LABEL_VIDEO_MESSAGE_BGCOLOR_GREEN:
|
||||||
case MENU_ENUM_LABEL_VIDEO_MESSAGE_BGCOLOR_BLUE:
|
case MENU_ENUM_LABEL_VIDEO_MESSAGE_BGCOLOR_BLUE:
|
||||||
case MENU_ENUM_LABEL_VIDEO_MESSAGE_BGCOLOR_OPACITY:
|
case MENU_ENUM_LABEL_VIDEO_MESSAGE_BGCOLOR_OPACITY:
|
||||||
|
if (settings->bools.video_font_enable)
|
||||||
if (settings->bools.video_msg_bgcolor_enable)
|
if (settings->bools.video_msg_bgcolor_enable)
|
||||||
build_list[i].checked = true;
|
build_list[i].checked = true;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
|
if (settings->bools.video_font_enable)
|
||||||
|
build_list[i].checked = true;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -8448,6 +8448,7 @@ static bool setting_append_list(
|
||||||
general_write_handler,
|
general_write_handler,
|
||||||
general_read_handler,
|
general_read_handler,
|
||||||
SD_FLAG_ADVANCED);
|
SD_FLAG_ADVANCED);
|
||||||
|
(*list)[list_info->index - 1].action_ok = &setting_bool_action_left_with_refresh;
|
||||||
(*list)[list_info->index - 1].action_left = &setting_bool_action_left_with_refresh;
|
(*list)[list_info->index - 1].action_left = &setting_bool_action_left_with_refresh;
|
||||||
(*list)[list_info->index - 1].action_right = &setting_bool_action_right_with_refresh;
|
(*list)[list_info->index - 1].action_right = &setting_bool_action_right_with_refresh;
|
||||||
|
|
||||||
|
@ -8732,6 +8733,7 @@ static bool setting_append_list(
|
||||||
general_write_handler,
|
general_write_handler,
|
||||||
general_read_handler,
|
general_read_handler,
|
||||||
SD_FLAG_CMD_APPLY_AUTO);
|
SD_FLAG_CMD_APPLY_AUTO);
|
||||||
|
(*list)[list_info->index - 1].action_ok = &setting_bool_action_left_with_refresh;
|
||||||
(*list)[list_info->index - 1].action_left = &setting_bool_action_left_with_refresh;
|
(*list)[list_info->index - 1].action_left = &setting_bool_action_left_with_refresh;
|
||||||
(*list)[list_info->index - 1].action_right = &setting_bool_action_right_with_refresh;
|
(*list)[list_info->index - 1].action_right = &setting_bool_action_right_with_refresh;
|
||||||
menu_settings_list_current_add_cmd(list, list_info, CMD_EVENT_REWIND_TOGGLE);
|
menu_settings_list_current_add_cmd(list, list_info, CMD_EVENT_REWIND_TOGGLE);
|
||||||
|
@ -9257,6 +9259,7 @@ static bool setting_append_list(
|
||||||
general_write_handler,
|
general_write_handler,
|
||||||
general_read_handler,
|
general_read_handler,
|
||||||
SD_FLAG_NONE);
|
SD_FLAG_NONE);
|
||||||
|
(*list)[list_info->index - 1].action_ok = &setting_bool_action_left_with_refresh;
|
||||||
(*list)[list_info->index - 1].action_left = &setting_bool_action_left_with_refresh;
|
(*list)[list_info->index - 1].action_left = &setting_bool_action_left_with_refresh;
|
||||||
(*list)[list_info->index - 1].action_right = &setting_bool_action_right_with_refresh;
|
(*list)[list_info->index - 1].action_right = &setting_bool_action_right_with_refresh;
|
||||||
|
|
||||||
|
@ -9618,6 +9621,7 @@ static bool setting_append_list(
|
||||||
(*list)[list_info->index - 1].action_ok = &setting_action_ok_uint;
|
(*list)[list_info->index - 1].action_ok = &setting_action_ok_uint;
|
||||||
(*list)[list_info->index - 1].get_string_representation =
|
(*list)[list_info->index - 1].get_string_representation =
|
||||||
&setting_get_string_representation_uint_aspect_ratio_index;
|
&setting_get_string_representation_uint_aspect_ratio_index;
|
||||||
|
(*list)[list_info->index - 1].action_ok = setting_uint_action_left_with_refresh;
|
||||||
(*list)[list_info->index - 1].action_left = setting_uint_action_left_with_refresh;
|
(*list)[list_info->index - 1].action_left = setting_uint_action_left_with_refresh;
|
||||||
(*list)[list_info->index - 1].action_right = setting_uint_action_right_with_refresh;
|
(*list)[list_info->index - 1].action_right = setting_uint_action_right_with_refresh;
|
||||||
|
|
||||||
|
@ -9865,6 +9869,7 @@ static bool setting_append_list(
|
||||||
general_write_handler,
|
general_write_handler,
|
||||||
general_read_handler,
|
general_read_handler,
|
||||||
SD_FLAG_NONE);
|
SD_FLAG_NONE);
|
||||||
|
(*list)[list_info->index - 1].action_ok = setting_bool_action_left_with_refresh;
|
||||||
(*list)[list_info->index - 1].action_left = setting_bool_action_left_with_refresh;
|
(*list)[list_info->index - 1].action_left = setting_bool_action_left_with_refresh;
|
||||||
(*list)[list_info->index - 1].action_right = setting_bool_action_right_with_refresh;
|
(*list)[list_info->index - 1].action_right = setting_bool_action_right_with_refresh;
|
||||||
menu_settings_list_current_add_cmd(
|
menu_settings_list_current_add_cmd(
|
||||||
|
@ -10023,6 +10028,7 @@ static bool setting_append_list(
|
||||||
general_read_handler,
|
general_read_handler,
|
||||||
SD_FLAG_NONE
|
SD_FLAG_NONE
|
||||||
);
|
);
|
||||||
|
(*list)[list_info->index - 1].action_ok = setting_bool_action_left_with_refresh;
|
||||||
(*list)[list_info->index - 1].action_left = setting_bool_action_left_with_refresh;
|
(*list)[list_info->index - 1].action_left = setting_bool_action_left_with_refresh;
|
||||||
(*list)[list_info->index - 1].action_right = setting_bool_action_right_with_refresh;
|
(*list)[list_info->index - 1].action_right = setting_bool_action_right_with_refresh;
|
||||||
|
|
||||||
|
@ -10074,6 +10080,7 @@ static bool setting_append_list(
|
||||||
general_write_handler,
|
general_write_handler,
|
||||||
general_read_handler,
|
general_read_handler,
|
||||||
SD_FLAG_NONE);
|
SD_FLAG_NONE);
|
||||||
|
(*list)[list_info->index - 1].action_ok = setting_bool_action_left_with_refresh;
|
||||||
(*list)[list_info->index - 1].action_left = setting_bool_action_left_with_refresh;
|
(*list)[list_info->index - 1].action_left = setting_bool_action_left_with_refresh;
|
||||||
(*list)[list_info->index - 1].action_right = setting_bool_action_right_with_refresh;
|
(*list)[list_info->index - 1].action_right = setting_bool_action_right_with_refresh;
|
||||||
|
|
||||||
|
@ -11542,6 +11549,7 @@ static bool setting_append_list(
|
||||||
general_read_handler,
|
general_read_handler,
|
||||||
SD_FLAG_NONE
|
SD_FLAG_NONE
|
||||||
);
|
);
|
||||||
|
(*list)[list_info->index - 1].action_ok = setting_bool_action_left_with_refresh;
|
||||||
(*list)[list_info->index - 1].action_left = setting_bool_action_left_with_refresh;
|
(*list)[list_info->index - 1].action_left = setting_bool_action_left_with_refresh;
|
||||||
(*list)[list_info->index - 1].action_right = setting_bool_action_right_with_refresh;
|
(*list)[list_info->index - 1].action_right = setting_bool_action_right_with_refresh;
|
||||||
|
|
||||||
|
@ -11658,6 +11666,9 @@ static bool setting_append_list(
|
||||||
general_read_handler,
|
general_read_handler,
|
||||||
SD_FLAG_NONE
|
SD_FLAG_NONE
|
||||||
);
|
);
|
||||||
|
(*list)[list_info->index - 1].action_ok = &setting_bool_action_left_with_refresh;
|
||||||
|
(*list)[list_info->index - 1].action_left = &setting_bool_action_left_with_refresh;
|
||||||
|
(*list)[list_info->index - 1].action_right = &setting_bool_action_right_with_refresh;
|
||||||
|
|
||||||
CONFIG_PATH(
|
CONFIG_PATH(
|
||||||
list, list_info,
|
list, list_info,
|
||||||
|
@ -11784,6 +11795,7 @@ static bool setting_append_list(
|
||||||
general_read_handler,
|
general_read_handler,
|
||||||
SD_FLAG_NONE
|
SD_FLAG_NONE
|
||||||
);
|
);
|
||||||
|
(*list)[list_info->index - 1].action_ok = &setting_bool_action_left_with_refresh;
|
||||||
(*list)[list_info->index - 1].action_left = &setting_bool_action_left_with_refresh;
|
(*list)[list_info->index - 1].action_left = &setting_bool_action_left_with_refresh;
|
||||||
(*list)[list_info->index - 1].action_right = &setting_bool_action_right_with_refresh;
|
(*list)[list_info->index - 1].action_right = &setting_bool_action_right_with_refresh;
|
||||||
|
|
||||||
|
@ -11870,6 +11882,7 @@ static bool setting_append_list(
|
||||||
general_read_handler,
|
general_read_handler,
|
||||||
SD_FLAG_NONE
|
SD_FLAG_NONE
|
||||||
);
|
);
|
||||||
|
(*list)[list_info->index - 1].action_ok = &setting_bool_action_left_with_refresh;
|
||||||
(*list)[list_info->index - 1].action_left = &setting_bool_action_left_with_refresh;
|
(*list)[list_info->index - 1].action_left = &setting_bool_action_left_with_refresh;
|
||||||
(*list)[list_info->index - 1].action_right = &setting_bool_action_right_with_refresh;
|
(*list)[list_info->index - 1].action_right = &setting_bool_action_right_with_refresh;
|
||||||
(*list)[list_info->index - 1].change_handler = overlay_enable_toggle_change_handler;
|
(*list)[list_info->index - 1].change_handler = overlay_enable_toggle_change_handler;
|
||||||
|
@ -15189,6 +15202,7 @@ static bool setting_append_list(
|
||||||
general_read_handler,
|
general_read_handler,
|
||||||
SD_FLAG_NONE
|
SD_FLAG_NONE
|
||||||
);
|
);
|
||||||
|
(*list)[list_info->index - 1].action_ok = setting_bool_action_left_with_refresh;
|
||||||
(*list)[list_info->index - 1].action_left = setting_bool_action_left_with_refresh;
|
(*list)[list_info->index - 1].action_left = setting_bool_action_left_with_refresh;
|
||||||
(*list)[list_info->index - 1].action_right = setting_bool_action_right_with_refresh;
|
(*list)[list_info->index - 1].action_right = setting_bool_action_right_with_refresh;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue