Menu: move mindelay option to Profiles/Accessibility

This commit is contained in:
James R 2023-12-26 18:53:13 -08:00 committed by toaster
parent 48fcc38691
commit 595d078a83
2 changed files with 15 additions and 9 deletions

View file

@ -30,12 +30,6 @@ menuitem_t OPTIONS_Gameplay[] =
{IT_STRING | IT_CVAR, "Starting Bumpers", "Change how many bumpers player start with in Battle.", {IT_STRING | IT_CVAR, "Starting Bumpers", "Change how many bumpers player start with in Battle.",
NULL, {.cvar = &cv_kartbumpers}, 0, 0}, NULL, {.cvar = &cv_kartbumpers}, 0, 0},
{IT_SPACE | IT_NOTHING, NULL, NULL,
NULL, {NULL}, 0, 0},
{IT_STRING | IT_CVAR, "Minimum Input Delay", "Practice for online play! Higher = more delay, 0 = instant response.",
NULL, {.cvar = &cv_mindelay}, 0, 0},
{IT_SPACE | IT_NOTHING, NULL, NULL, {IT_SPACE | IT_NOTHING, NULL, NULL,
NULL, {NULL}, 0, 0}, NULL, {NULL}, 0, 0},

View file

@ -3,8 +3,11 @@
#include "../v_draw.hpp" #include "../v_draw.hpp"
#include "../command.h"
#include "../k_menu.h" #include "../k_menu.h"
extern "C" consvar_t cv_mindelay;
using srb2::Draw; using srb2::Draw;
namespace namespace
@ -57,14 +60,23 @@ menuitem_t OPTIONS_ProfileAccessibility[] = {
{IT_STRING | IT_CVAR, "Rumble", "For gamepad users - should your device rumble?", {IT_STRING | IT_CVAR, "Rumble", "For gamepad users - should your device rumble?",
NULL, {.cvar = &cv_dummyprofilerumble}, 0, 0}, NULL, {.cvar = &cv_dummyprofilerumble}, 0, 0},
{IT_STRING | IT_CVAR, "Kickstart Accel", "Hold A to auto-accel. Tap it to cancel.", {IT_SPACE | IT_NOTHING, NULL, NULL,
NULL, {.cvar = &cv_dummyprofilekickstart}, 0, 0}, NULL, {NULL}, 0, 0},
{IT_STRING | IT_CVAR, "Auto Roulette", "Item roulette auto-stops on a random result.", {IT_STRING | IT_CVAR, "Auto Roulette", "Item roulette auto-stops on a random result.",
NULL, {.cvar = &cv_dummyprofileautoroulette}, 0, 0}, NULL, {.cvar = &cv_dummyprofileautoroulette}, 0, 0},
{IT_STRING | IT_CVAR, "Kickstart Accel", "Hold A to auto-accel. Tap it to cancel.",
NULL, {.cvar = &cv_dummyprofilekickstart}, 0, 0},
{IT_STRING | IT_CVAR, "Lite Steer", "Hold DOWN on d-pad/keyboard for shallow turns.", {IT_STRING | IT_CVAR, "Lite Steer", "Hold DOWN on d-pad/keyboard for shallow turns.",
NULL, {.cvar = &cv_dummyprofilelitesteer}, 0, 0}, NULL, {.cvar = &cv_dummyprofilelitesteer}, 0, 0},
{IT_SPACE | IT_NOTHING, NULL, NULL,
NULL, {NULL}, 0, 0},
{IT_STRING | IT_CVAR, "Minimum Input Delay", "Practice for online play! 0 = instant response.",
NULL, {.cvar = &cv_mindelay}, 0, 0},
}; };
menu_t OPTIONS_ProfileAccessibilityDef = { menu_t OPTIONS_ProfileAccessibilityDef = {
@ -72,7 +84,7 @@ menu_t OPTIONS_ProfileAccessibilityDef = {
&OPTIONS_EditProfileDef, &OPTIONS_EditProfileDef,
0, 0,
OPTIONS_ProfileAccessibility, OPTIONS_ProfileAccessibility,
145, 80, 145, 72,
SKINCOLOR_ULTRAMARINE, 0, SKINCOLOR_ULTRAMARINE, 0,
MBF_DRAWBGWHILEPLAYING, MBF_DRAWBGWHILEPLAYING,
"FILE", "FILE",