@ -97,12 +97,24 @@ void Menu::InitializeSettingsWindow(){
}
}
} ) END ;
settingsList - > ADD ( " Screen Shake Checkbox " , Checkbox ) ( geom2d : : rect < float > { { 4.f , 40 } , { 16.f , 16.f } } , [ ] ( ToggleFuncData data ) {
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 ;
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 ;
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 ;
settingsList - > ADD ( " Screen Shake Label " , MenuLabel ) ( geom2d : : rect < float > { { 22.f , 40 } , { 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 , 60 } , { 16.f , 16.f } } , [ ] ( ToggleFuncData data ) {
settingsList - > ADD ( " Screen Shake Label " , MenuLabel ) ( geom2d : : rect < float > { { 22.f , 6 0} , { 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 , 8 0} , { 16.f , 16.f } } , [ ] ( ToggleFuncData data ) {
if ( Menu : : IsCurrentlyActive ( SETTINGS ) ) {
GameSettings : : SetRumble ( data . checked ) ;
if ( GameSettings : : RumbleEnabled ( GameSettings : : OVERRIDE ) ) {
@ -114,20 +126,20 @@ void Menu::InitializeSettingsWindow(){
}
return true ;
} , true ) END ;
settingsList - > ADD ( " Controller Rumble Label " , MenuLabel ) ( geom2d : : rect < float > { { 22.f , 6 0} , { windowSize . x / 2 - 24.f , 16.f } } , " Gamepad Rumble " , 1.f , ComponentAttr : : SHADOW | ComponentAttr : : LEFT_ALIGN ) END ;
settingsList - > ADD ( " Controller Rumble Label " , MenuLabel ) ( geom2d : : rect < float > { { 22.f , 8 0} , { windowSize . x / 2 - 24.f , 16.f } } , " Gamepad Rumble " , 1.f , ComponentAttr : : SHADOW | ComponentAttr : : LEFT_ALIGN ) END ;
settingsList - > ADD ( " Terrain Collision Boxes Checkbox " , Checkbox ) ( geom2d : : rect < float > { { windowSize . x / 2 + 4.f , 4 0} , { 16.f , 16.f } } , [ ] ( ToggleFuncData data ) {
settingsList - > ADD ( " Terrain Collision Boxes Checkbox " , Checkbox ) ( geom2d : : rect < float > { { windowSize . x / 2 + 4.f , 6 0} , { 16.f , 16.f } } , [ ] ( ToggleFuncData data ) {
GameSettings : : SetTerrainCollisionBoxes ( data . checked ) ;
return true ;
} , true ) END ;
settingsList - > ADD ( " Terrain Collision Boxes Label " , MenuLabel ) ( geom2d : : rect < float > { { windowSize . x / 2 + 22.f , 4 0} , { windowSize . x / 2 - 24.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 , 6 0} , { 16.f , 16.f } } , [ ] ( ToggleFuncData data ) {
settingsList - > ADD ( " Terrain Collision Boxes Label " , MenuLabel ) ( geom2d : : rect < float > { { windowSize . x / 2 + 22.f , 6 0} , { windowSize . x / 2 - 24.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 , 8 0} , { 16.f , 16.f } } , [ ] ( ToggleFuncData data ) {
GameSettings : : SetKeyboardAutoAim ( data . checked ) ;
return true ;
} , false ) END ;
settingsList - > ADD ( " Keyboard Play Auto-Aim Label " , MenuLabel ) ( geom2d : : rect < float > { { windowSize . x / 2 + 22.f , 6 0} , { windowSize . x / 2 - 24.f , 16.f } } , " Aim Assist \n (No Mouse Players) " , 1.f , ComponentAttr : : SHADOW | ComponentAttr : : LEFT_ALIGN ) END ;
settingsList - > ADD ( " Keyboard Play Auto-Aim Label " , MenuLabel ) ( geom2d : : rect < float > { { windowSize . x / 2 + 22.f , 8 0} , { windowSize . x / 2 - 24.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 , 8 0} , { 16.f , 16.f } } , [ ] ( ToggleFuncData data ) {
auto fullscreenToggle = settingsList - > ADD ( " Fullscreen Toggle Checkbox " , Checkbox ) ( geom2d : : rect < float > { { windowSize . x / 2 + 4.f , 10 0} , { 16.f , 16.f } } , [ ] ( ToggleFuncData data ) {
if ( data . checked ) { //When going to fullscreen mode, the windowed mode positioning needs to be saved to be restored later.
GameSettings : : SetWindowPos ( game - > GetActualWindowPos ( ) ) ;
}
@ -137,13 +149,13 @@ void Menu::InitializeSettingsWindow(){
game - > SetFullscreen ( data . checked , GameSettings : : GetWindowPos ( ) ) ;
return true ;
} , game - > IsFullscreen ( ) ) END ;
auto fullscreenToggleLabel = settingsList - > ADD ( " Fullscreen Toggle Label " , MenuLabel ) ( geom2d : : rect < float > { { windowSize . x / 2 + 22.f , 8 0} , { windowSize . x / 2 - 24.f , 16.f } } , " Fullscreen " , 1.f , ComponentAttr : : SHADOW | ComponentAttr : : LEFT_ALIGN ) END ;
auto fullscreenToggleLabel = settingsList - > ADD ( " Fullscreen Toggle Label " , MenuLabel ) ( geom2d : : rect < float > { { windowSize . x / 2 + 22.f , 10 0} , { windowSize . x / 2 - 24.f , 16.f } } , " Fullscreen " , 1.f , ComponentAttr : : SHADOW | ComponentAttr : : LEFT_ALIGN ) END ;
# ifdef __EMSCRIPTEN__
fullscreenToggle - > Disable ( ) ;
fullscreenToggleLabel - > Disable ( ) ;
# endif
settingsList - > ADD ( " Button Set Toggle Box " , MenuIconButton ) ( geom2d : : rect < float > { { windowSize . x / 8.f , 8 0} , { 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 / 8.f , 10 0} , { windowSize . x / 4.f , 16.f } } , GFX [ " themes/xb.png " ] . Decal ( ) , [ ] ( MenuFuncData data ) {
switch ( GameSettings : : GetIconType ( ) ) {
case IconType : : XB : {
GameSettings : : SetIconType ( IconType : : PS ) ;
@ -189,13 +201,13 @@ void Menu::InitializeSettingsWindow(){
} ;
# pragma endregion
settingsList - > ADD ( " Keyboard Bindings Button " , MenuComponent ) ( geom2d : : rect < float > { { 28 , 10 0.f } , vf2d { settingsList - > rect . size . x - 12 - 56 , 24 } } , " Keyboard Bindings " , [ & ] ( MenuFuncData data ) {
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 ) {
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 , 12 8.f } , vf2d { settingsList - > rect . size . x - 12 - 56 , 24 } } , " Controller Bindings " , [ & ] ( MenuFuncData data ) {
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 ) {
ChangeKeybindDisplayType ( CONTROLLER ) ;
Component < MenuLabel > ( INPUT_KEY_DISPLAY , " Keyboard Mapping Label " ) - > SetLabel ( " Controller Mappings " ) ;
Menu : : OpenMenu ( INPUT_KEY_DISPLAY ) ;
@ -224,9 +236,19 @@ void Menu::InitializeSettingsWindow(){
. down = " SFX Slider " , } } ,
{ " SFX Slider " , {
. up = " BGM Slider " ,
. down = " Terrain Collision Boxes Checkbox " , } } ,
{ " Terrain Collision Boxes Checkbox " , {
. down = " Show Max Mana Checkbox " , } } ,
{ " Show Max HP Checkbox " , {
. up = " SFX Slider " ,
. down = " Screen Shake Checkbox " ,
. left = " Show Max Mana Checkbox " ,
. right = " Show Max Mana Checkbox " , } } ,
{ " Show Max Mana Checkbox " , {
. up = " SFX Slider " ,
. down = " Terrain Collision Boxes Checkbox " ,
. left = " Show Max HP Checkbox " ,
. right = " Show Max HP Checkbox " , } } ,
{ " Terrain Collision Boxes Checkbox " , {
. up = " Show Max Mana Checkbox " ,
. down = " Keyboard Play Auto-Aim Checkbox " ,
. left = " Screen Shake Checkbox " ,
. right = " Screen Shake Checkbox " , } } ,
@ -236,7 +258,7 @@ void Menu::InitializeSettingsWindow(){
. left = " Controller Rumble Checkbox " ,
. right = " Controller Rumble Checkbox " , } } ,
{ " Screen Shake Checkbox " , {
. up = " SFX Slider " ,
. up = " Show Max HP Checkbox " ,
. down = " Controller Rumble Checkbox " ,
. left = " Terrain Collision Boxes Checkbox " ,
. right = " Terrain Collision Boxes Checkbox " , } } ,