Added custom window positioning, sizing, and added configuration file loading before the game window is constructed .
This commit is contained in:
@@ -115,9 +115,12 @@ void Menu::InitializeSettingsWindow(){
|
||||
settingsWindow->ADD("Keyboard Play Auto-Aim Label",MenuLabel)(geom2d::rect<float>{{windowSize.x/2+22.f,104},{windowSize.x/2-24.f,16.f}},"Aim Assist\n(No Mouse Players)",1.f,ComponentAttr::SHADOW|ComponentAttr::LEFT_ALIGN)END;
|
||||
#ifndef __EMSCRIPTEN__
|
||||
settingsWindow->ADD("Fullscreen Toggle Checkbox",Checkbox)(geom2d::rect<float>{{windowSize.x/2+4.f,124},{16.f,16.f}},[](ToggleFuncData data){
|
||||
game->SetFullscreen(data.checked,{});
|
||||
if(data.checked){ //When going to fullscreen mode, the windowed mode positioning needs to be saved to be restored later.
|
||||
GameSettings::SetWindowPos(game->GetActualWindowPos());
|
||||
}
|
||||
game->SetFullscreen(data.checked,GameSettings::GetWindowPos());
|
||||
return true;
|
||||
},false)END;
|
||||
},game->IsFullscreen())END;
|
||||
settingsWindow->ADD("Fullscreen Toggle Label",MenuLabel)(geom2d::rect<float>{{windowSize.x/2+22.f,124},{windowSize.x/2-24.f,16.f}},"Fullscreen",1.f,ComponentAttr::SHADOW|ComponentAttr::LEFT_ALIGN)END;
|
||||
#endif
|
||||
|
||||
|
||||
Reference in New Issue
Block a user