From 471f97bd586bf8597d82be01b0c9bc4a9090992b Mon Sep 17 00:00:00 2001 From: James R Date: Sun, 31 Dec 2023 19:22:08 -0800 Subject: [PATCH] Menus/Data Options: move Replay and Discord settings into drawers on main Data Options menu --- src/k_menu.h | 17 ++++++------ src/menus/CMakeLists.txt | 2 -- src/menus/options-data-1.c | 36 ++++++++++++++++++++----- src/menus/options-data-discord.c | 45 -------------------------------- src/menus/options-data-replays.c | 31 ---------------------- 5 files changed, 37 insertions(+), 94 deletions(-) delete mode 100644 src/menus/options-data-discord.c delete mode 100644 src/menus/options-data-replays.c diff --git a/src/k_menu.h b/src/k_menu.h index 71591418a..d9e0cec81 100644 --- a/src/k_menu.h +++ b/src/k_menu.h @@ -339,11 +339,18 @@ typedef enum { dopt_screenshot = 0, dopt_addon, + dopt_spacer1, dopt_replay, + dopt_rprecord, + dopt_rpsync, #ifdef HAVE_DISCORDRPC dopt_discord, + dopt_drp, + dopt_drpstreamer, + dopt_drpjoins, + dopt_drpinvites, #endif - dopt_spacer, + dopt_spacer2, dopt_erase, } dopt_e; @@ -431,14 +438,6 @@ extern menu_t OPTIONS_DataScreenshotDef; extern menuitem_t OPTIONS_DataAddon[]; extern menu_t OPTIONS_DataAddonDef; -extern menuitem_t OPTIONS_DataReplay[]; -extern menu_t OPTIONS_DataReplayDef; - -#ifdef HAVE_DISCORDRPC -extern menuitem_t OPTIONS_DataDiscord[]; -extern menu_t OPTIONS_DataDiscordDef; -#endif - extern menuitem_t OPTIONS_DataErase[]; extern menu_t OPTIONS_DataEraseDef; diff --git a/src/menus/CMakeLists.txt b/src/menus/CMakeLists.txt index 736758a3d..728d29303 100644 --- a/src/menus/CMakeLists.txt +++ b/src/menus/CMakeLists.txt @@ -11,10 +11,8 @@ target_sources(SRB2SDL2 PRIVATE options-1.c options-data-1.c options-data-addons.c - options-data-discord.c options-data-erase-1.c options-data-erase-profile.c - options-data-replays.c options-data-screenshots.c options-gameplay-1.c options-gameplay-item-toggles.c diff --git a/src/menus/options-data-1.c b/src/menus/options-data-1.c index 693203e65..97393948a 100644 --- a/src/menus/options-data-1.c +++ b/src/menus/options-data-1.c @@ -2,26 +2,48 @@ /// \brief Data Options -- see dopt_e #include "../k_menu.h" +#include "../discord.h" // discord rpc cvars // data options menu -- see dopt_e menuitem_t OPTIONS_Data[] = { - {IT_STRING | IT_SUBMENU, "Media Options...", "Set options relative to screenshot and movie capture.", + {IT_STRING | IT_SUBMENU, "Video Recording...", "Set options relative to screenshot and movie capture.", NULL, {.submenu = &OPTIONS_DataScreenshotDef}, 0, 0}, - {IT_STRING | IT_SUBMENU, "Addon Options...", "Set options relative to the addons menu.", + {IT_STRING | IT_SUBMENU, "Addons...", "Set options relative to the addons menu.", NULL, {.submenu = &OPTIONS_DataAddonDef}, 0, 0}, - {IT_STRING | IT_SUBMENU, "Replay Options...", "Set options relative to replays.", - NULL, {.submenu = &OPTIONS_DataReplayDef}, 0, 0}, + {IT_SPACE | IT_NOTHING, NULL, NULL, + NULL, {NULL}, 0, 0}, + + {IT_HEADER, "Replays...", NULL, + NULL, {NULL}, 0, 0}, + + {IT_STRING | IT_CVAR, "Record Replays", "Select when to save replays.", + NULL, {.cvar = &cv_recordmultiplayerdemos}, 0, 0}, + + {IT_STRING | IT_CVAR, "Net Consistency Quality", "For filesize, how often do we write position data in online replays?", + NULL, {.cvar = &cv_netdemosyncquality}, 0, 0}, #ifdef HAVE_DISCORDRPC - {IT_STRING | IT_SUBMENU, "Discord Options...", "Set options relative to Discord Rich Presence.", - NULL, {.submenu = &OPTIONS_DataDiscordDef}, 0, 0}, + {IT_HEADER, "Discord Rich Presence...", NULL, + NULL, {NULL}, 0, 0}, + + {IT_STRING | IT_CVAR, "Rich Presence", "Allow Discord to display game info on your status.", + NULL, {.cvar = &cv_discordrp}, 0, 0}, + + {IT_STRING | IT_CVAR, "Streamer Mode", "Prevents the logging of some account information such as your tag in the console.", + NULL, {.cvar = &cv_discordstreamer}, 0, 0}, + + {IT_STRING | IT_CVAR, "Allow Ask to Join", "Allow other people to request joining your game from Discord.", + NULL, {.cvar = &cv_discordasks}, 0, 0}, + + {IT_STRING | IT_CVAR, "Allow Invites", "Set who is allowed to generate Discord invites to your game.", + NULL, {.cvar = &cv_discordinvites}, 0, 0}, #endif - {IT_SPACE | IT_NOTHING, NULL, NULL, + {IT_SPACE | IT_DYBIGSPACE, NULL, NULL, NULL, {NULL}, 0, 0}, {IT_STRING | IT_SUBMENU, "\x85""Erase Data...", "Erase specific data. Be careful, what's deleted is gone forever!", diff --git a/src/menus/options-data-discord.c b/src/menus/options-data-discord.c deleted file mode 100644 index 5ba3c89ad..000000000 --- a/src/menus/options-data-discord.c +++ /dev/null @@ -1,45 +0,0 @@ -/// \file menus/options-data-discord.c -/// \brief Discord Rich Presence Options - -#include "../k_menu.h" -#include "../discord.h" // discord rpc cvars - -menuitem_t OPTIONS_DataDiscord[] = -{ - {IT_STRING | IT_CVAR, "Rich Presence", "Allow Discord to display game info on your status.", - NULL, {.cvar = &cv_discordrp}, 0, 0}, - - {IT_SPACE | IT_NOTHING, NULL, NULL, - NULL, {NULL}, 0, 0}, - - {IT_HEADER, "RICH PRESENCE SETTINGS", NULL, - NULL, {NULL}, 0, 0}, - - {IT_STRING | IT_CVAR, "Streamer Mode", "Prevents the logging of some account information such as your tag in the console.", - NULL, {.cvar = &cv_discordstreamer}, 0, 0}, - - {IT_STRING | IT_CVAR, "Allow Ask to Join", "Allow other people to request joining your game from Discord.", - NULL, {.cvar = &cv_discordasks}, 0, 0}, - - {IT_STRING | IT_CVAR, "Allow Invites", "Set who is allowed to generate Discord invites to your game.", - NULL, {.cvar = &cv_discordinvites}, 0, 0}, - -}; - -menu_t OPTIONS_DataDiscordDef = { - sizeof (OPTIONS_DataDiscord) / sizeof (menuitem_t), - &OPTIONS_DataDef, - 0, - OPTIONS_DataDiscord, - 48, 80, - SKINCOLOR_BLUEBERRY, 0, - MBF_DRAWBGWHILEPLAYING, - NULL, - 2, 5, - M_DrawGenericOptions, - M_DrawOptionsCogs, - M_OptionsTick, - NULL, - NULL, - NULL, -}; diff --git a/src/menus/options-data-replays.c b/src/menus/options-data-replays.c deleted file mode 100644 index 2b02a1b2c..000000000 --- a/src/menus/options-data-replays.c +++ /dev/null @@ -1,31 +0,0 @@ -/// \file menus/options-data-replays.c -/// \brief Replay Options - -#include "../k_menu.h" - -menuitem_t OPTIONS_DataReplay[] = -{ - {IT_STRING | IT_CVAR, "Record Replays", "Select when to save replays.", - NULL, {.cvar = &cv_recordmultiplayerdemos}, 0, 0}, - - {IT_STRING | IT_CVAR, "Net Consistency Quality", "For filesize, how often do we write position data in online replays?", - NULL, {.cvar = &cv_netdemosyncquality}, 0, 0}, -}; - -menu_t OPTIONS_DataReplayDef = { - sizeof (OPTIONS_DataReplay) / sizeof (menuitem_t), - &OPTIONS_DataDef, - 0, - OPTIONS_DataReplay, - 48, 80, - SKINCOLOR_BLUEBERRY, 0, - MBF_DRAWBGWHILEPLAYING, - NULL, - 2, 5, - M_DrawGenericOptions, - M_DrawOptionsCogs, - M_OptionsTick, - NULL, - NULL, - NULL, -};