Merge branch 'polish-menu-options' into 'master'

More Menu Polish: organizing

See merge request KartKrew/Kart!1762
This commit is contained in:
Oni 2024-01-03 01:29:11 +00:00
commit 336b430f79
20 changed files with 226 additions and 157 deletions

View file

@ -156,6 +156,7 @@ struct consvar_t //NULL, NULL, 0, NULL, NULL |, 0, NULL, NULL, 0, 0, NULL
INT32 flags; // flags see cvflags_t above
CV_PossibleValue_t *PossibleValue; // table of possible values
void (*func)(void); // called on change, if CV_CALL set
INT32 step_amount;
const char *description;
INT32 value; // for INT32 and fixed_t
const char *string; // value in string
@ -217,7 +218,7 @@ struct CVarList;
#define CVAR_INIT consvar_t
#else
#define CVAR_INIT( ... ) \
{ __VA_ARGS__, NULL, 0, NULL, NULL, {0, {NULL}}, 0U, (char)0, NULL }
{ __VA_ARGS__, 0, NULL, 0, NULL, NULL, {0, {NULL}}, 0U, (char)0, NULL }
#endif
extern consvar_t *consvar_vars; // list of registered console variables

View file

@ -92,6 +92,12 @@ struct consvar_t::Builder
return *this;
}
Builder& step_amount(INT32 step_amount)
{
var_.step_amount = step_amount;
return *this;
}
Builder& save()
{
var_.flags |= CV_SAVE;
@ -739,7 +745,7 @@ consvar_t cv_overtime = UnsavedNetVar("overtime", "Yes").yes_no();
extern CV_PossibleValue_t pointlimit_cons_t[];
void PointLimit_OnChange(void);
consvar_t cv_pointlimit = UnsavedNetVar("pointlimit", "Default").values(pointlimit_cons_t).onchange_noinit(PointLimit_OnChange);
consvar_t cv_pointlimit = UnsavedNetVar("pointlimit", "Auto").values(pointlimit_cons_t).onchange_noinit(PointLimit_OnChange);
void Schedule_OnChange(void);
consvar_t cv_schedule = UnsavedNetVar("schedule", "On").on_off().onchange(Schedule_OnChange);
@ -985,8 +991,8 @@ consvar_t cv_lossless_recorder = Player("lossless_recorder", "GIF").values(lossl
consvar_t cv_movie_resolution = Player("movie_resolution", "Medium").values(movie_resolution_cons_t);
static CV_PossibleValue_t movie_limit_cons_t[] = {{1, "MIN"}, {INT32_MAX, "MAX"}, {0, "Unlimited"}, {0, NULL}};
consvar_t cv_movie_duration = Player("movie_duration", "Unlimited").floating_point().values(movie_limit_cons_t);
consvar_t cv_movie_size = Player("movie_size", "25.0").floating_point().values(movie_limit_cons_t);
consvar_t cv_movie_duration = Player("movie_duration", "Unlimited").floating_point().values(movie_limit_cons_t).step_amount(FRACUNIT);
consvar_t cv_movie_size = Player("movie_size", "25.0").floating_point().values(movie_limit_cons_t).step_amount(FRACUNIT);
consvar_t cv_movie_fps = Player("movie_fps", "60").values(CV_Natural);
consvar_t cv_movie_showfps = Player("movie_showfps", "Yes").yes_no();

View file

@ -224,7 +224,7 @@ void CapsuleTest_OnChange(void)
CONS_Printf("Level must be restarted for capsuletest to have effect.\n");
}
CV_PossibleValue_t pointlimit_cons_t[] = {{1, "MIN"}, {MAXSCORE, "MAX"}, {0, "None"}, {-1, "Default"}, {0, NULL}};
CV_PossibleValue_t pointlimit_cons_t[] = {{1, "MIN"}, {MAXSCORE, "MAX"}, {0, "None"}, {-1, "Auto"}, {0, NULL}};
CV_PossibleValue_t numlaps_cons_t[] = {{0, "MIN"}, {MAX_LAPS, "MAX"}, {-1, "Map default"}, {0, NULL}};
CV_PossibleValue_t perfstats_cons_t[] = {

View file

@ -44,7 +44,7 @@ extern "C" {
#define IT_NOTHING 0 // space
#define IT_PATCH 16 // a patch or a string with big font
#define IT_STRING 32 // little string (spaced with 10)
#define IT_WHITESTRING 48 // little string in white
#define IT_LINKTEXT 48 // draw an arrow beside, like IT_SUBMENU
#define IT_DYBIGSPACE 64 // same as noting
#define IT_DYLITLSPACE (16+64) // little space
#define IT_STRING2 (32+64) // a simple string
@ -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;
@ -404,8 +411,8 @@ typedef enum
gopt_exitcountdown,
gopt_spacer1,
gopt_timelimit,
gopt_pointlimit,
gopt_startingbumpers,
gopt_karmacomeback,
gopt_spacer2,
gopt_itemtoggles
} gopt_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;

View file

@ -98,7 +98,7 @@ fixed_t M_DueFrac(tic_t start, tic_t duration)
}
#define SKULLXOFF -32
#define LINEHEIGHT 17
#define LINEHEIGHT 13
#define STRINGHEIGHT 9
#define FONTBHEIGHT 20
#define SMALLLINEHEIGHT 9
@ -1070,7 +1070,6 @@ void M_DrawGenericMenu(void)
break;
#endif
case IT_STRING:
case IT_WHITESTRING:
if (currentMenu->menuitems[i].mvar1)
y = currentMenu->y+currentMenu->menuitems[i].mvar1;
if (i == itemOn)
@ -4267,6 +4266,19 @@ static void M_DrawOptionsBoxTerm(INT32 x, INT32 top, INT32 bottom)
V_DrawFill(px, bottom + 3, BASEVIDWIDTH - (2 * px), 2, 31);
}
static void M_DrawLinkArrow(INT32 x, INT32 y, INT32 i)
{
UINT8 ch = currentMenu->menuitems[i].text[0];
V_DrawMenuString(
x + (i == itemOn ? 1 + skullAnimCounter/5 : 0),
y - 1,
// Use color of first character in text label
i == itemOn ? highlightflags : (((max(ch, 0x80) - 0x80) & 15) << V_CHARCOLORSHIFT),
"\x1D"
);
}
void M_DrawGenericOptions(void)
{
INT32 x = currentMenu->x - M_EaseWithTransition(Easing_Linear, 5 * 48), y = currentMenu->y, w, i, cursory = -100;
@ -4310,22 +4322,25 @@ box_found:
break;
case IT_HEADERTEXT:
collapse = (i != expand);
if (collapse)
if (i != expand)
{
collapse = true;
term = (boxy != 0);
}
else
{
if (collapse)
y += 2;
collapse = false;
if (menutransition.tics == menutransition.dest)
{
INT32 px = x - 20;
V_DrawFill(px, y + 6, BASEVIDWIDTH - (2 * px), 2, orangemap[0]);
V_DrawFill(px + 1, y + 7, BASEVIDWIDTH - (2 * px), 2, 31);
V_DrawFill(px, y + 4, BASEVIDWIDTH - (2 * px), 2, orangemap[0]);
V_DrawFill(px + 1, y + 5, BASEVIDWIDTH - (2 * px), 2, 31);
}
y += 2;
boxy = y;
boxt = optionsmenu.box.dist == expand ? M_DueFrac(optionsmenu.box.start, 5) : FRACUNIT;
@ -4383,46 +4398,44 @@ box_found:
break;
#endif
case IT_STRING:
case IT_WHITESTRING: {
case IT_LINKTEXT: {
boolean textBox = (currentMenu->menuitems[i].status & IT_TYPE) == IT_CVAR &&
(currentMenu->menuitems[i].status & IT_CVARTYPE) == IT_CV_STRING;
if (textBox)
{
if (opening)
y += LINEHEIGHT;
else
M_DrawTextBox(x, y, MAXSTRINGLENGTH, 1);
}
if (opening)
{
if ((currentMenu->menuitems[i].status & IT_TYPE) == IT_CVAR &&
(currentMenu->menuitems[i].status & IT_CVARTYPE) == IT_CV_STRING)
{
y += LINEHEIGHT;
}
y += STRINGHEIGHT;
break;
}
INT32 px = x + ((currentMenu->menuitems[i].status & IT_TYPE) == IT_SUBMENU ? 8 : 0);
INT32 px = x + ((currentMenu->menuitems[i].status & IT_TYPE) == IT_SUBMENU
|| (currentMenu->menuitems[i].status & IT_DISPLAY) == IT_LINKTEXT ? 8 : 0);
if (i == itemOn)
cursory = y;
if ((currentMenu->menuitems[i].status & IT_DISPLAY)==IT_STRING)
{
if (i == itemOn)
V_DrawMenuString(px + 1, y, highlightflags, currentMenu->menuitems[i].text);
else
V_DrawMenuString(px, y, 0, currentMenu->menuitems[i].text);
}
else
V_DrawMenuString(px, y, highlightflags, currentMenu->menuitems[i].text);
V_DrawMenuString(px, y, textBox ? V_GRAYMAP : 0, currentMenu->menuitems[i].text);
if ((currentMenu->menuitems[i].status & IT_DISPLAY) == IT_LINKTEXT)
M_DrawLinkArrow(x, y, i);
// Cvar specific handling
switch (currentMenu->menuitems[i].status & IT_TYPE)
{
case IT_SUBMENU: {
UINT8 ch = currentMenu->menuitems[i].text[0];
V_DrawMenuString(
x + (i == itemOn ? 1 + skullAnimCounter/5 : 0),
y - 1,
// Use color of first character in text label
i == itemOn ? highlightflags : (((max(ch, 0x80) - 0x80) & 15) << V_CHARCOLORSHIFT),
"\x1D"
);
if ((currentMenu->menuitems[i].status & IT_DISPLAY) != IT_LINKTEXT)
M_DrawLinkArrow(x, y, i);
break;
}
@ -4437,16 +4450,14 @@ box_found:
break;
case IT_CV_STRING:
{
M_DrawTextBox(x, y + 4, MAXSTRINGLENGTH, 1);
INT32 xoffs = 0;
INT32 xoffs = 6;
if (itemOn == i)
{
xoffs += 8;
V_DrawMenuString(x + (skullAnimCounter/5) + 7, y + 11, highlightflags, "\x1D");
xoffs = 8;
V_DrawMenuString(x + (skullAnimCounter/5) + 7, y + 9, highlightflags, "\x1D");
}
V_DrawString(x + xoffs + 8, y + 12, 0, cv->string);
V_DrawString(x + xoffs + 8, y + 9, 0, cv->string);
y += LINEHEIGHT;
}

View file

@ -83,6 +83,72 @@ void Dummystaff_OnChange(void)
// BASIC MENU HANDLING
// =========================================================================
static void M_AddFloatVar(consvar_t *cv, fixed_t step)
{
int minopt = 0;
int maxopt = 0;
int curopt = -1;
int i;
const CV_PossibleValue_t *values = cv->PossibleValue;
for (i = 0; values[i].strvalue; ++i)
{
if (cv->value == values[i].value)
{
curopt = i;
if (i > 1)
break;
}
else if (i > 1)
{
if (!minopt || values[minopt].value > values[i].value)
minopt = i;
if (!maxopt || values[maxopt].value < values[i].value)
maxopt = i;
}
}
if (curopt > 1 || curopt == (step > 0))
{
CV_Set(cv, step < 0 ? (maxopt ? values[maxopt].strvalue : "MAX") : (minopt ? values[minopt].strvalue : "MIN"));
return;
}
fixed_t n = cv->value;
if (step > 0)
{
if (values[1].value - n <= step)
{
CV_Set(cv, "MAX");
return;
}
n = n + step;
n -= n % step;
}
else
{
if (n - values[0].value <= -step)
{
CV_Set(cv, "MIN");
return;
}
fixed_t p = n % -step;
n -= p ? p : -step;
}
char s[20];
double f = FIXED_TO_FLOAT(n);
const char *d = M_Ftrim(f);
sprintf(s, "%ld%s", (long)f, *d ? d : ".0");
CV_Set(cv, s);
}
void M_ChangeCvarDirect(INT32 choice, consvar_t *cv)
{
// Backspace sets values to default value
@ -102,9 +168,7 @@ void M_ChangeCvarDirect(INT32 choice, consvar_t *cv)
}
else if (cv->flags & CV_FLOAT)
{
char s[20];
sprintf(s, "%f", FIXED_TO_FLOAT(cv->value) + (choice) * (1.0f / 16.0f));
CV_Set(cv, s);
M_AddFloatVar(cv, (cv->step_amount ? cv->step_amount : FRACUNIT/16) * choice);
}
else
{

View file

@ -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

View file

@ -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!",

View file

@ -7,7 +7,7 @@
menuitem_t OPTIONS_DataAddon[] =
{
{IT_HEADER, "MENU", NULL,
{IT_HEADER, "Addon List", NULL,
NULL, {NULL}, 0, 0},
{IT_STRING | IT_CVAR, "Identify Addons via", "Set whether to consider the extension or contents of a file.",
@ -16,10 +16,7 @@ menuitem_t OPTIONS_DataAddon[] =
{IT_STRING | IT_CVAR, "Show Unsupported Files", "Sets whether non-addon files should be shown.",
NULL, {.cvar = &cv_addons_showall}, 0, 0},
{IT_SPACE | IT_NOTHING, NULL, NULL,
NULL, {NULL}, 0, 0},
{IT_HEADER, "SEARCH", NULL,
{IT_HEADER, "Addon Search", NULL,
NULL, {NULL}, 0, 0},
{IT_STRING | IT_CVAR, "Matching", "Set where to check for the text pattern when looking up addons via name.",

View file

@ -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,
};

View file

@ -28,7 +28,7 @@ menuitem_t OPTIONS_DataErase[] =
{IT_SPACE | IT_NOTHING, NULL, NULL,
NULL, {NULL}, 0, 0},
{IT_STRING | IT_CALL, "Erase a Profile...", "Select a Profile to erase.",
{IT_LINKTEXT | IT_CALL, "Erase a Profile...", "Select a Profile to erase.",
NULL, {.routine = M_CheckProfileData}, 0, 0},
};

View file

@ -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,
};

View file

@ -10,17 +10,35 @@
menuitem_t OPTIONS_DataScreenshot[] =
{
#ifdef SRB2_CONFIG_ENABLE_WEBM_MOVIES
{IT_HEADER, "MOVIE RECORDING (F9)", NULL,
{IT_HEADER, "Movie Recording (F9)", NULL,
NULL, {NULL}, 0, 0},
{IT_STRING | IT_CVAR, "Real-Time Data", "If enabled, shows fps, duration and filesize of recording in real-time.",
NULL, {.cvar = &cv_movie_showfps}, 0, 0},
#endif
{IT_STRING | IT_CVAR, "Max. Duration (s)", "Automatically stop recording after this much time.",
NULL, {.cvar = &cv_movie_duration}, 0, 0},
{IT_STRING | IT_CVAR, "Max. File Size (MB)", "Automatically stop recording when the video file reaches this size.",
NULL, {.cvar = &cv_movie_size}, 0, 0},
{IT_SPACE | IT_NOTHING, NULL, NULL,
NULL, {NULL}, 0, 0},
{IT_HEADER, "LOSSLESS RECORDING (F10)", NULL,
{IT_STRING | IT_CVAR, "Real-Time Data", "If enabled, shows fps, duration and filesize of recording in real-time.",
NULL, {.cvar = &cv_movie_showfps}, 0, 0},
{IT_SPACE | IT_NOTHING, NULL, NULL,
NULL, {NULL}, 0, 0},
{IT_STRING | IT_CVAR, "Resolution", "Video resolution",
NULL, {.cvar = &cv_movie_resolution}, 0, 0},
{IT_STRING | IT_CVAR, "Max. FPS", "Video framerate",
NULL, {.cvar = &cv_movie_fps}, 0, 0},
{IT_STRING | IT_CVAR, "Record Audio", "Record audio.",
NULL, {.cvar = &cv_movie_sound}, 0, 0},
#endif
{IT_HEADER, "Lossless Recording (F10)", NULL,
NULL, {NULL}, 0, 0},
{IT_STRING | IT_CVAR, "Recording Format", "What file format will lossless recordings use?",

View file

@ -2,10 +2,14 @@
/// \brief Gameplay Options -- see gopt_e
#include "../k_menu.h"
#include "../m_cond.h"
menuitem_t OPTIONS_Gameplay[] =
{
{IT_HEADER, "Race...", NULL,
NULL, {NULL}, 0, 0},
{IT_STRING | IT_CVAR, "Game Speed", "Change Game Speed for the next map.",
NULL, {.cvar = &cv_kartspeed}, 0, 0},
@ -21,16 +25,21 @@ menuitem_t OPTIONS_Gameplay[] =
{IT_STRING | IT_CVAR, "Exit Countdown", "How long players have to finish after 1st place finishes.",
NULL, {.cvar = &cv_countdowntime}, 0, 0},
{IT_SPACE | IT_NOTHING, NULL, NULL,
{IT_HEADER, "Battle...", NULL,
NULL, {NULL}, 0, 0},
{IT_STRING | IT_CVAR, "Time Limit", "Change the time limit for Battle rounds.",
NULL, {.cvar = &cv_timelimit}, 0, 0},
{IT_STRING | IT_CVAR, "Point Limit", "How many strikes it takes to win a Battle.",
NULL, {.cvar = &cv_pointlimit}, 0, 0},
{IT_STRING | IT_CVAR, "Starting Bumpers", "Change how many bumpers player start with in Battle.",
NULL, {.cvar = &cv_kartbumpers}, 0, 0},
{IT_SPACE | IT_NOTHING, NULL, NULL,
{IT_SPACE | IT_DYBIGSPACE, NULL, NULL,
NULL, {NULL}, 0, 0},
{IT_STRING | IT_SUBMENU, "Random Item Toggles...", "Change which items to enable for your games.",
@ -38,6 +47,11 @@ menuitem_t OPTIONS_Gameplay[] =
};
static void init_routine(void)
{
OPTIONS_Gameplay[gopt_encore].status = M_SecretUnlocked(SECRET_ENCORE, true) ? IT_STRING | IT_CVAR : IT_DISABLED;
}
menu_t OPTIONS_GameplayDef = {
sizeof (OPTIONS_Gameplay) / sizeof (menuitem_t),
&OPTIONS_MainDef,
@ -51,7 +65,7 @@ menu_t OPTIONS_GameplayDef = {
M_DrawGenericOptions,
M_DrawOptionsCogs,
M_OptionsTick,
NULL,
init_routine,
NULL,
NULL,
};

View file

@ -10,7 +10,7 @@ menuitem_t OPTIONS_GameplayItems[] =
{IT_KEYHANDLER | IT_NOTHING, NULL, "Super Ring", NULL, {.routine = M_HandleItemToggles}, KITEM_SUPERRING, 0},
{IT_KEYHANDLER | IT_NOTHING, NULL, "Self-Propelled Bomb", NULL, {.routine = M_HandleItemToggles}, KITEM_SPB, 0},
{IT_KEYHANDLER | IT_NOTHING, NULL, NULL, NULL, {.routine = M_HandleItemToggles}, 255, 0}, // maybe KITEM_PUYO eventually?
{IT_KEYHANDLER | IT_NOTHING, NULL, "Toggle All", NULL, {.routine = M_HandleItemToggles}, 0, 0},
{IT_KEYHANDLER | IT_NOTHING, NULL, "Toggle All / Ring Box Only", NULL, {.routine = M_HandleItemToggles}, 0, 0},
{IT_KEYHANDLER | IT_NOTHING, NULL, "Sneaker", NULL, {.routine = M_HandleItemToggles}, KITEM_SNEAKER, 0},
{IT_KEYHANDLER | IT_NOTHING, NULL, "Sneaker x2", NULL, {.routine = M_HandleItemToggles}, KRITEM_DUALSNEAKER, 0},

View file

@ -12,6 +12,12 @@ menuitem_t OPTIONS_Server[] =
{IT_STRING | IT_CVAR | IT_CV_STRING, "Server Name", "Change the name of your server.",
NULL, {.cvar = &cv_servername}, 0, 0},
{IT_STRING | IT_CVAR | IT_CV_STRING, "Server Contact", "Where you should be contacted for Master Server moderation.",
NULL, {.cvar = &cv_server_contact}, 0, 0},
{IT_STRING | IT_CVAR, "Advertise", "Display your game in the Server Browser for other players.",
NULL, {.cvar = &cv_advertise}, 0, 0},
{IT_HEADER, "Progression...", NULL,
NULL, {NULL}, 0, 0},

View file

@ -12,6 +12,9 @@ menuitem_t OPTIONS_ServerAdvanced[] =
{IT_STRING | IT_CVAR | IT_CV_STRING, "Server Browser Address", "Default is \'https://ms.kartkrew.org/ms/api\'",
NULL, {.cvar = &cv_masterserver}, 0, 0},
{IT_STRING | IT_CVAR, "Debug Log", "Save technical info about communication with the Master Server.",
NULL, {.cvar = &cv_noticedownload}, 0, 0},
{IT_HEADER, "Network Connection", NULL,
NULL, {NULL}, 0, 0},

View file

@ -249,6 +249,9 @@ menuitem_t OPTIONS_Sound[] =
{IT_SPACE | IT_NOTHING, NULL, NULL,
NULL, {NULL}, 0, 0},
{IT_HEADER, "Advanced...", NULL,
NULL, {NULL}, 0, 0},
{IT_STRING | IT_CVAR, "Reverse L/R Channels", "Reverse left & right channels for Stereo playback.",
NULL, {.cvar = &stereoreverse}, 0, 0},

View file

@ -41,6 +41,9 @@ menuitem_t OPTIONS_Video[] =
{IT_NOTHING|IT_SPACE, NULL, NULL,
NULL, {NULL}, 0, 0},
{IT_HEADER, "Advanced...", NULL,
NULL, {NULL}, 0, 0},
{IT_STRING | IT_CVAR, "Draw Distance", "How far objects can be drawn. A tradeoff between performance & visibility.",
NULL, {.cvar = &cv_drawdist}, 0, 0},

View file

@ -13,7 +13,7 @@ menuitem_t OPTIONS_VideoOGL[] =
{IT_SPACE | IT_NOTHING, NULL, NULL,
NULL, {NULL}, 0, 0},
{IT_HEADER, "OPTIONS BELOW ARE OPENGL ONLY!", "Watch people get confused anyway!!",
{IT_HEADER, "OpenGL Options...", "Watch people get confused anyway!!",
NULL, {NULL}, 0, 0},
{IT_STRING | IT_CVAR, "3D Models", "Use 3D models instead of sprites when applicable.",