From 158a462d1807cedddf30d34c06469d2a8ca8f64b Mon Sep 17 00:00:00 2001 From: UnknownShadow200 Date: Mon, 20 Dec 2021 09:37:05 +1100 Subject: [PATCH] Fix last commit --- src/LScreens.c | 2 +- src/Menus.c | 17 ++++++----------- 2 files changed, 7 insertions(+), 12 deletions(-) diff --git a/src/LScreens.c b/src/LScreens.c index d2dddfd12..b3238fc66 100644 --- a/src/LScreens.c +++ b/src/LScreens.c @@ -1452,7 +1452,7 @@ static void SettingsScreen_Init(struct LScreen* s_) { #if defined CC_BUILD_MOBILE LLabel_Init(s_, &s->lblExtra, "Force landscape"); LCheckbox_Init(s_, &s->cbExtra); - s->cbOrientlock.OnClick = SettingsScreen_LockOrientation; + s->cbExtra.OnClick = SettingsScreen_LockOrientation; #else LLabel_Init(s_, &s->lblExtra, "Close this after game starts"); LCheckbox_Init(s_, &s->cbExtra); diff --git a/src/Menus.c b/src/Menus.c index b3bca8894..84bb3be5f 100644 --- a/src/Menus.c +++ b/src/Menus.c @@ -3076,9 +3076,6 @@ static void MiscOptionsScreen_SetPhysics(const cc_string* v) { Physics_SetEnabled(Menu_SetBool(v, OPT_BLOCK_PHYSICS)); } -static void MiscOptionsScreen_GetAutoClose(cc_string* v) { Menu_GetBool(v, Options_GetBool(OPT_AUTO_CLOSE_LAUNCHER, false)); } -static void MiscOptionsScreen_SetAutoClose(const cc_string* v) { Menu_SetBool(v, OPT_AUTO_CLOSE_LAUNCHER); } - static void MiscOptionsScreen_GetInvert(cc_string* v) { Menu_GetBool(v, Camera.Invert); } static void MiscOptionsScreen_SetInvert(const cc_string* v) { Camera.Invert = Menu_SetBool(v, OPT_INVERT_MOUSE); } @@ -3089,7 +3086,7 @@ static void MiscOptionsScreen_SetSensitivity(const cc_string* v) { } static void MiscSettingsScreen_InitWidgets(struct MenuOptionsScreen* s) { - static const struct MenuOptionDesc buttons[8] = { + static const struct MenuOptionDesc buttons[7] = { { -1, -100, "Reach distance", MenuOptionsScreen_Input, MiscOptionsScreen_GetReach, MiscOptionsScreen_SetReach }, { -1, -50, "Music volume", MenuOptionsScreen_Input, @@ -3101,15 +3098,13 @@ static void MiscSettingsScreen_InitWidgets(struct MenuOptionsScreen* s) { { 1, -100, "Block physics", MenuOptionsScreen_Bool, MiscOptionsScreen_GetPhysics, MiscOptionsScreen_SetPhysics }, - { 1, -50, "Auto close launcher", MenuOptionsScreen_Bool, - MiscOptionsScreen_GetAutoClose, MiscOptionsScreen_SetAutoClose }, { 1, 0, "Invert mouse", MenuOptionsScreen_Bool, MiscOptionsScreen_GetInvert, MiscOptionsScreen_SetInvert }, { 1, 50, "Mouse sensitivity", MenuOptionsScreen_Input, MiscOptionsScreen_GetSensitivity, MiscOptionsScreen_SetSensitivity } }; - s->numCore = 8; - s->maxVertices += 8 * BUTTONWIDGET_MAX; + s->numCore = 7; + s->maxVertices += 7 * BUTTONWIDGET_MAX; MenuOptionsScreen_InitButtons(s, buttons, Array_Elems(buttons), Menu_SwitchOptions); /* Disable certain options */ @@ -3118,14 +3113,14 @@ static void MiscSettingsScreen_InitWidgets(struct MenuOptionsScreen* s) { } void MiscOptionsScreen_Show(void) { - static struct MenuInputDesc descs[9]; + static struct MenuInputDesc descs[8]; MenuInput_Float(descs[0], 1, 1024, 5); MenuInput_Int(descs[1], 0, 100, DEFAULT_MUSIC_VOLUME); MenuInput_Int(descs[2], 0, 100, DEFAULT_SOUNDS_VOLUME); #ifdef CC_BUILD_WIN - MenuInput_Int(descs[7], 1, 200, 40); + MenuInput_Int(descs[6], 1, 200, 40); #else - MenuInput_Int(descs[7], 1, 200, 30); + MenuInput_Int(descs[6], 1, 200, 30); #endif MenuOptionsScreen_Show(descs, NULL, 0, MiscSettingsScreen_InitWidgets);