[WIP] Converted old options menu screens to MoonScreens

This commit is contained in:
KiritoDev 2021-05-03 23:28:40 -05:00
parent 6af8138201
commit 0fcf880472
1 changed files with 56 additions and 57 deletions

View File

@ -52,19 +52,31 @@ static const u8 toggleStr[][20] = {
};
static const u8 menuStr[][32] = {
"TEXT_OPT_HIGHLIGHT",
"TEXT_OPT_BUTTON1",
"TEXT_OPT_BUTTON2",
"TEXT_OPT_OPTIONS",
"TEXT_OPT_CAMERA",
"TEXT_OPT_CONTROLS",
"TEXT_OPT_VIDEO",
"TEXT_OPT_AUDIO",
"TEXT_EXIT_GAME",
"TEXT_OPT_CHEATS",
"TEXT_OPT_GAME"
"TEXT_OPT_HIGHLIGHT", //
"TEXT_OPT_BUTTON1", //
"TEXT_OPT_BUTTON2", //
"TEXT_OPT_OPTIONS", //
"TEXT_OPT_CAMERA", //
"TEXT_OPT_CONTROLS", //
"TEXT_OPT_VIDEO", // *
"TEXT_OPT_AUDIO", // *
"TEXT_EXIT_GAME", //
"TEXT_OPT_CHEATS", //
"TEXT_OPT_GAME" // *
};
// optsCameraStr[9],
// optsCameraStr[6],
// optsCameraStr[7],
// optsCameraStr[2],
// optsCameraStr[3],
// optsCameraStr[0],
// optsCameraStr[1],
// optsCameraStr[4],
// optsCameraStr[5],
// optsCameraStr[8],
static const u8 optsCameraStr[][32] = {
"TEXT_OPT_CAMX",
"TEXT_OPT_CAMY",
@ -265,7 +277,7 @@ static struct Option optsControls[] = {
DEF_OPT_SCROLL( bindStr[17], &configRumbleStrength, 0, 100, 1)
};
static struct Option optsVideo[] = {
static struct Option optsVideo[] = { // *
#ifndef TARGET_SWITCH
DEF_OPT_TOGGLE( optsVideoStr[0], &configWindow.fullscreen ),
DEF_OPT_TOGGLE( optsVideoStr[5], &configWindow.vsync ),
@ -278,7 +290,7 @@ static struct Option optsVideo[] = {
#endif
};
static struct Option optsGame[] = {
static struct Option optsGame[] = { // *
DEF_OPT_CHOICE( optsGameStr[0], &configLanguage, NULL ),
DEF_OPT_TOGGLE( optsGameStr[1], &configPrecacheRes ),
#ifdef TARGET_SWITCH
@ -286,7 +298,7 @@ static struct Option optsGame[] = {
#endif
};
static struct Option optsAudio[] = {
static struct Option optsAudio[] = { // *
DEF_OPT_SCROLL( optsAudioStr[0], &configMasterVolume, 0, MAX_VOLUME, 1 ),
DEF_OPT_SCROLL( optsAudioStr[1], &configMusicVolume, 0, MAX_VOLUME, 1),
DEF_OPT_SCROLL( optsAudioStr[2], &configSfxVolume, 0, MAX_VOLUME, 1),
@ -320,27 +332,14 @@ static struct SubMenu menuCheats = DEF_SUBMENU( menuStr[9], optsCheats );
/* main options menu definition */
static struct Option optsMain[] = {
DEF_OPT_SUBMENU( menuStr[10], &menuGame ),
#ifdef BETTERCAMERA
DEF_OPT_SUBMENU( menuStr[4], &menuCamera ),
#endif
DEF_OPT_SUBMENU( menuStr[5], &menuControls ),
DEF_OPT_SUBMENU( menuStr[6], &menuVideo ),
DEF_OPT_SUBMENU( menuStr[7], &menuAudio ),
DEF_OPT_BUTTON ( menuStr[8], optmenu_act_exit ),
// NOTE: always keep cheats the last option here because of the half-assed way I toggle them
DEF_OPT_SUBMENU( menuStr[9], &menuCheats )
};
static struct SubMenu mainOptions[] = {
#ifdef BETTERCAMERA
DEF_SUBMENU( menuStr[4], optsCamera ),
#endif
// DEF_SUBMENU( menuStr[10], optsGame ),
DEF_SUBMENU( menuStr[5], optsControls ),
DEF_SUBMENU( menuStr[6], optsVideo ),
DEF_SUBMENU( menuStr[7], optsAudio ),
DEF_SUBMENU( menuStr[9], optsCheats )
};
/* implementation */