Implemented fullscreen toggle and window window repositioning and resizing. Release Build 7357.

This commit is contained in:
2024-02-19 01:56:04 -06:00
parent d5bd8655a9
commit 0408250088
6 changed files with 115 additions and 9 deletions
+11 -1
View File
@@ -233,8 +233,10 @@ const void SaveFile::SaveGame(){
void SaveFile::LoadFile(){
utils::datafile loadFile;
utils::datafile loadSystemFile;
std::string loadFilename="save_file_path"_S+std::format("save.{:04}",saveFileID);
std::string loadSystemFilename="save_file_path"_S+"system.conf";
if(std::filesystem::exists(loadFilename)){
utils::datafile::Read(loadFile,"save_file_path"_S+std::format("save.{:04}",saveFileID));
@@ -287,7 +289,7 @@ void SaveFile::LoadFile(){
if(loadFile.HasProperty("Controller Rumble"))GameSettings::SetRumble(loadFile["Controller Rumble"].GetBool());
if(loadFile.HasProperty("Terrain Collision Boxes"))GameSettings::SetTerrainCollisionBoxes(loadFile["Terrain Collision Boxes"].GetBool());
if(loadFile.HasProperty("Keyboard Auto-Aim"))GameSettings::SetKeyboardAutoAim(loadFile["Keyboard Auto-Aim"].GetBool());
if(loadFile.HasProperty("Fullscreen"))game->SetFullScreen(loadFile["Fullscreen"].GetBool());
if(loadFile.HasProperty("Fullscreen"))game->SetFullscreen(loadFile["Fullscreen"].GetBool(),{});
#pragma region Load Keyboard/Controller mappings
//NOTE: We are shadowing code from InputKeyboardWindow! If at some point the retrival method for getting input displays changes, we likely will be changing the code here as well!
@@ -329,6 +331,14 @@ void SaveFile::LoadFile(){
}
#pragma endregion
#pragma region Load System Settings
if(std::filesystem::exists(loadSystemFilename)){
utils::datafile::Read(loadSystemFile,loadSystemFilename);
//if(loadSystemFile.HasProperty("Window Pos"))
//if(loadSystemFile.HasProperty("Window Size"))
}
#pragma endregion
GameState::ChangeState(States::OVERWORLD_MAP,0.5f);
}else{
std::cout<<std::format("WARNING! File {} does not exist for loading!","save_file_path"_S+std::format("save.{:04}",saveFileID))<<std::endl;