@ -108,18 +108,18 @@ void Menu::InitializeSettingsWindow(){
settingsList - > ADD ( " Show Max HP Checkbox " , Checkbox ) ( geom2d : : rect < float > { { 4.f , 40 } , { 16.f , 16.f } } , [ ] ( ToggleFuncData data ) {
GameSettings : : SetMaxHealthDisplay ( data . checked ) ;
return true ;
} , false ) END ;
} , GameSettings : : ShowMaxHealth ( ) ) END ;
settingsList - > ADD ( " Show Max HP Label " , MenuLabel ) ( geom2d : : rect < float > { { 22.f , 40 } , { windowSize . x / 2 - 24.f , 16.f } } , " Show Max Health " , 1.f , ComponentAttr : : SHADOW | ComponentAttr : : LEFT_ALIGN ) END ;
settingsList - > ADD ( " Show Max Mana Checkbox " , Checkbox ) ( geom2d : : rect < float > { { windowSize . x / 2 + 4.f , 40 } , { 16.f , 16.f } } , [ ] ( ToggleFuncData data ) {
GameSettings : : SetMaxManaDisplay ( data . checked ) ;
return true ;
} , false ) END ;
} , GameSettings : : ShowMaxMana ( ) ) END ;
settingsList - > ADD ( " Show Max Mana Label " , MenuLabel ) ( geom2d : : rect < float > { { windowSize . x / 2 + 22.f , 40 } , { windowSize . x / 2 - 24.f , 16.f } } , " Show Max Mana " , 1.f , ComponentAttr : : SHADOW | ComponentAttr : : LEFT_ALIGN ) END ;
settingsList - > ADD ( " Screen Shake Checkbox " , Checkbox ) ( geom2d : : rect < float > { { 4.f , 60 } , { 16.f , 16.f } } , [ ] ( ToggleFuncData data ) {
GameSettings : : SetScreenShake ( data . checked ) ;
return true ;
} , true ) END ;
} , GameSettings : : ScreenShakeEnabled ( ) ) END ;
settingsList - > ADD ( " Screen Shake Label " , MenuLabel ) ( geom2d : : rect < float > { { 22.f , 60 } , { windowSize . x / 2 - 24.f , 16.f } } , " Screen Shake " , 1.f , ComponentAttr : : SHADOW | ComponentAttr : : LEFT_ALIGN ) END ;
settingsList - > ADD ( " Controller Rumble Checkbox " , Checkbox ) ( geom2d : : rect < float > { { 4.f , 80 } , { 16.f , 16.f } } , [ ] ( ToggleFuncData data ) {
if ( Menu : : IsCurrentlyActive ( SETTINGS ) ) {
@ -132,18 +132,25 @@ void Menu::InitializeSettingsWindow(){
}
}
return true ;
} , true ) END ;
} , GameSettings : : RumbleEnabled ( ) ) END ;
settingsList - > ADD ( " Controller Rumble Label " , MenuLabel ) ( geom2d : : rect < float > { { 22.f , 80 } , { windowSize . x / 2 - 24.f , 16.f } } , " Gamepad Rumble " , 1.f , ComponentAttr : : SHADOW | ComponentAttr : : LEFT_ALIGN ) END ;
auto vsyncToggle = settingsList - > ADD ( " VSync Checkbox " , Checkbox ) ( geom2d : : rect < float > { { 4.f , 100 } , { 16.f , 16.f } } , [ ] ( ToggleFuncData data ) {
game - > SetVSync ( data . checked ) ;
GameSettings : : SetVSync ( data . checked ) ;
return true ;
} , 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 ;
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 ) ;
return true ;
} , true ) END ;
} , GameSettings : : TerrainCollisionBoxesEnabled ( ) ) END ;
settingsList - > ADD ( " Terrain Collision Boxes Label " , MenuLabel ) ( geom2d : : rect < float > { { windowSize . x / 2 + 22.f , 60 } , { windowSize . x / 2 - 36.f , 16.f } } , " Terrain Collision Boxes " , 1.f , ComponentAttr : : SHADOW | ComponentAttr : : LEFT_ALIGN ) END ;
settingsList - > ADD ( " Keyboard Play Auto-Aim Checkbox " , Checkbox ) ( geom2d : : rect < float > { { windowSize . x / 2 + 4.f , 80 } , { 16.f , 16.f } } , [ ] ( ToggleFuncData data ) {
GameSettings : : SetKeyboardAutoAim ( data . checked ) ;
return true ;
} , false ) END ;
} , GameSettings : : KeyboardAutoAimEnabled ( ) ) END ;
settingsList - > ADD ( " Keyboard Play Auto-Aim Label " , MenuLabel ) ( geom2d : : rect < float > { { windowSize . x / 2 + 22.f , 80 } , { windowSize . x / 2 - 36.f , 16.f } } , " Aim Assist \n (No Mouse Players) " , 1.f , ComponentAttr : : SHADOW | ComponentAttr : : LEFT_ALIGN ) END ;
auto fullscreenToggle = settingsList - > ADD ( " Fullscreen Toggle Checkbox " , Checkbox ) ( geom2d : : rect < float > { { windowSize . x / 2 + 4.f , 100 } , { 16.f , 16.f } } , [ ] ( ToggleFuncData data ) {
@ -162,7 +169,7 @@ void Menu::InitializeSettingsWindow(){
fullscreenToggleLabel - > Disable ( ) ;
# endif
settingsList - > ADD ( " Button Set Toggle Box " , MenuIconButton ) ( geom2d : : rect < float > { { windowSize . x / 8.f , 100 } , { 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 , 120.f } , { windowSize . x / 4.f , 16.f } } , GFX [ " themes/xb.png " ] . Decal ( ) , [ ] ( MenuFuncData data ) {
switch ( GameSettings : : GetIconType ( ) ) {
case IconType : : XB : {
GameSettings : : SetIconType ( IconType : : PS ) ;
@ -208,13 +215,13 @@ void Menu::InitializeSettingsWindow(){
} ;
# pragma endregion
settingsList - > ADD ( " Keyboard Bindings Button " , MenuComponent ) ( geom2d : : rect < float > { { 28 , 12 0.f } , vf2d { settingsList - > rect . size . x - 12 - 56 , 24 } } , " Keyboard Bindings " , [ & ] ( MenuFuncData data ) {
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 ) {
ChangeKeybindDisplayType ( KEY ) ;
Component < MenuLabel > ( INPUT_KEY_DISPLAY , " Keyboard Mapping Label " ) - > SetLabel ( " Keyboard Mappings " ) ;
Menu : : OpenMenu ( INPUT_KEY_DISPLAY ) ;
return true ;
} , vf2d { 1.5f , 2.f } ) END ;
settingsList - > ADD ( " Controller Bindings Button " , MenuComponent ) ( geom2d : : rect < float > { { 28 , 14 8.f } , vf2d { settingsList - > rect . size . x - 12 - 56 , 24 } } , " Controller Bindings " , [ & ] ( MenuFuncData data ) {
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 ) {
ChangeKeybindDisplayType ( CONTROLLER ) ;
Component < MenuLabel > ( INPUT_KEY_DISPLAY , " Keyboard Mapping Label " ) - > SetLabel ( " Controller Mappings " ) ;
if ( SteamInput ( ) ) {
@ -275,25 +282,28 @@ void Menu::InitializeSettingsWindow(){
. right = " Terrain Collision Boxes Checkbox " , } } ,
{ " Controller Rumble Checkbox " , {
. up = " Screen Shake Checkbox " ,
. down = " Button Set Toggle B ox" ,
. down = " VSync Checkb ox" ,
. left = " Keyboard Play Auto-Aim Checkbox " ,
. right = " Keyboard Play Auto-Aim Checkbox " , } } ,
{ " Button Set Toggle B ox" , {
{ " VSync Checkb ox" , {
. up = " Controller Rumble Checkbox " ,
. down = " Keyboard Bindings Button " ,
. down = " Button Set Toggle Box " ,
. left = " Fullscreen Toggle Checkbox " ,
. right = " Fullscreen Toggle Checkbox " , } } ,
{ " Fullscreen Toggle Checkbox " , {
. up = " Keyboard Play Auto-Aim Checkbox " ,
. down = " Keyboard Bindings Button " ,
. left = " Button Set Toggle B ox" ,
. right = " Button Set Toggle B ox" , } } ,
{ " Keyboard Bindings Button " , {
. down = " Button Set Toggle Box " ,
. left = " VSync Checkb ox" ,
. right = " VSync Checkb ox" , } } ,
{ " Button Set Toggle Box " , {
# ifdef __EMSCRIPTEN__
. up = " Button Set Toggle B ox" ,
. up = " VSync Checkb ox" ,
# else
. up = " Fullscreen Toggle Checkbox " ,
# endif
. down = " Keyboard Bindings Button " , } } ,
{ " Keyboard Bindings Button " , {
. up = " Button Set Toggle Box " ,
. down = " Controller Bindings Button " , } } ,
{ " Controller Bindings Button " , {
. up = " Keyboard Bindings Button " ,