@ -142,6 +142,12 @@ void Menu::InitializeSettingsWindow(){
} , GameSettings : : VSyncEnabled ( ) ) END ;
} , GameSettings : : VSyncEnabled ( ) ) END ;
auto vsyncToggleLabel = settingsList - > ADD ( " VSync Toggle Label " , MenuLabel ) ( geom2d : : rect < float > { { 22.f , 100 } , { windowSize . x / 2 - 36.f , 16.f } } , " VSync " , 1.f , ComponentAttr : : SHADOW | ComponentAttr : : LEFT_ALIGN ) END ;
auto vsyncToggleLabel = settingsList - > ADD ( " VSync Toggle Label " , MenuLabel ) ( geom2d : : rect < float > { { 22.f , 100 } , { windowSize . x / 2 - 36.f , 16.f } } , " VSync " , 1.f , ComponentAttr : : SHADOW | ComponentAttr : : LEFT_ALIGN ) END ;
auto autoPauseToggle = settingsList - > ADD ( " Auto Pause Checkbox " , Checkbox ) ( geom2d : : rect < float > { { 4.f , 120 } , { 16.f , 16.f } } , [ ] ( ToggleFuncData data ) {
GameSettings : : SetAutoPause ( data . checked ) ;
return true ;
} , GameSettings : : AutoPauseEnabled ( ) ) END ;
auto autoPauseToggleLabel = settingsList - > ADD ( " Auto Pause Toggle Label " , MenuLabel ) ( geom2d : : rect < float > { { 22.f , 120 } , { windowSize . x / 2 - 36.f , 16.f } } , " Pause if Hit When \n Window Unfocused " , 1.f , ComponentAttr : : SHADOW | ComponentAttr : : LEFT_ALIGN ) END ;
settingsList - > ADD ( " Terrain Collision Boxes Checkbox " , Checkbox ) ( geom2d : : rect < float > { { windowSize . x / 2 + 4.f , 60 } , { 16.f , 16.f } } , [ ] ( ToggleFuncData data ) {
settingsList - > ADD ( " Terrain Collision Boxes Checkbox " , Checkbox ) ( geom2d : : rect < float > { { windowSize . x / 2 + 4.f , 60 } , { 16.f , 16.f } } , [ ] ( ToggleFuncData data ) {
GameSettings : : SetTerrainCollisionBoxes ( data . checked ) ;
GameSettings : : SetTerrainCollisionBoxes ( data . checked ) ;
return true ;
return true ;
@ -169,7 +175,7 @@ void Menu::InitializeSettingsWindow(){
fullscreenToggleLabel - > Disable ( ) ;
fullscreenToggleLabel - > Disable ( ) ;
# endif
# endif
settingsList - > ADD ( " Button Set Toggle Box " , MenuIconButton ) ( geom2d : : rect < float > { { windowSize . x / 2.f - windowSize . x / 8.f - 6.f , 12 0.f } , { windowSize . x / 4.f , 16.f } } , GFX [ " themes/xb.png " ] . Decal ( ) , [ ] ( MenuFuncData data ) {
settingsList - > ADD ( " Button Set Toggle Box " , MenuIconButton ) ( geom2d : : rect < float > { { windowSize . x / 2.f - windowSize . x / 8.f - 6.f , 14 0.f } , { windowSize . x / 4.f , 16.f } } , GFX [ " themes/xb.png " ] . Decal ( ) , [ ] ( MenuFuncData data ) {
switch ( GameSettings : : GetIconType ( ) ) {
switch ( GameSettings : : GetIconType ( ) ) {
case IconType : : XB : {
case IconType : : XB : {
GameSettings : : SetIconType ( IconType : : PS ) ;
GameSettings : : SetIconType ( IconType : : PS ) ;
@ -215,13 +221,13 @@ void Menu::InitializeSettingsWindow(){
} ;
} ;
# pragma endregion
# pragma endregion
settingsList - > ADD ( " Keyboard Bindings Button " , MenuComponent ) ( geom2d : : rect < float > { { 28 , 14 0.f } , vf2d { settingsList - > rect . size . x - 12 - 56 , 24 } } , " Keyboard Bindings " , [ & ] ( MenuFuncData data ) {
settingsList - > ADD ( " Keyboard Bindings Button " , MenuComponent ) ( geom2d : : rect < float > { { 28 , 16 0.f } , vf2d { settingsList - > rect . size . x - 12 - 56 , 24 } } , " Keyboard Bindings " , [ & ] ( MenuFuncData data ) {
ChangeKeybindDisplayType ( KEY ) ;
ChangeKeybindDisplayType ( KEY ) ;
Component < MenuLabel > ( INPUT_KEY_DISPLAY , " Keyboard Mapping Label " ) - > SetLabel ( " Keyboard Mappings " ) ;
Component < MenuLabel > ( INPUT_KEY_DISPLAY , " Keyboard Mapping Label " ) - > SetLabel ( " Keyboard Mappings " ) ;
Menu : : OpenMenu ( INPUT_KEY_DISPLAY ) ;
Menu : : OpenMenu ( INPUT_KEY_DISPLAY ) ;
return true ;
return true ;
} , vf2d { 1.5f , 2.f } ) END ;
} , vf2d { 1.5f , 2.f } ) END ;
settingsList - > ADD ( " Controller Bindings Button " , MenuComponent ) ( geom2d : : rect < float > { { 28 , 16 8.f } , vf2d { settingsList - > rect . size . x - 12 - 56 , 24 } } , " Controller Bindings " , [ & ] ( MenuFuncData data ) {
settingsList - > ADD ( " Controller Bindings Button " , MenuComponent ) ( geom2d : : rect < float > { { 28 , 18 8.f } , vf2d { settingsList - > rect . size . x - 12 - 56 , 24 } } , " Controller Bindings " , [ & ] ( MenuFuncData data ) {
ChangeKeybindDisplayType ( CONTROLLER ) ;
ChangeKeybindDisplayType ( CONTROLLER ) ;
Component < MenuLabel > ( INPUT_KEY_DISPLAY , " Keyboard Mapping Label " ) - > SetLabel ( " Controller Mappings " ) ;
Component < MenuLabel > ( INPUT_KEY_DISPLAY , " Keyboard Mapping Label " ) - > SetLabel ( " Controller Mappings " ) ;
STEAMINPUT (
STEAMINPUT (
@ -287,20 +293,19 @@ void Menu::InitializeSettingsWindow(){
. right = " Keyboard Play Auto-Aim Checkbox " , } } ,
. right = " Keyboard Play Auto-Aim Checkbox " , } } ,
{ " VSync Checkbox " , {
{ " VSync Checkbox " , {
. up = " Controller Rumble Checkbox " ,
. up = " Controller Rumble Checkbox " ,
. down = " Button Set Toggle B ox" ,
. down = " Auto Pause Checkb ox" ,
. left = " Fullscreen Toggle Checkbox " ,
. left = " Fullscreen Toggle Checkbox " ,
. right = " Fullscreen Toggle Checkbox " , } } ,
. right = " Fullscreen Toggle Checkbox " , } } ,
{ " Auto Pause Checkbox " , {
. up = " VSync Checkbox " ,
. down = " Button Set Toggle Box " , } } ,
{ " Fullscreen Toggle Checkbox " , {
{ " Fullscreen Toggle Checkbox " , {
. up = " Keyboard Play Auto-Aim Checkbox " ,
. up = " Keyboard Play Auto-Aim Checkbox " ,
. down = " Button Set Toggle Box " ,
. down = " Auto Pause Checkb ox" ,
. left = " VSync Checkbox " ,
. left = " VSync Checkbox " ,
. right = " VSync Checkbox " , } } ,
. right = " VSync Checkbox " , } } ,
{ " Button Set Toggle Box " , {
{ " Button Set Toggle Box " , {
# ifdef __EMSCRIPTEN__
. up = " Auto Pause Checkbox " ,
. up = " VSync Checkbox " ,
# else
. up = " Fullscreen Toggle Checkbox " ,
# endif
. down = " Keyboard Bindings Button " , } } ,
. down = " Keyboard Bindings Button " , } } ,
{ " Keyboard Bindings Button " , {
{ " Keyboard Bindings Button " , {
. up = " Button Set Toggle Box " ,
. up = " Button Set Toggle Box " ,