Ultimate Fullscreen Unable to Save Resolution Settings
I'm messing around with my first ever Options screen, and it's 90% functional. The only problem I have is that while Ultimate Full Screen does change the resolution on the Options screen itself, when you leave Options, if you are still in Fullscreen, everything defaults back to normal resolution settings.
The way I am storing options is via the Named Variable Object, Global Values, and Global Events. Basically, a global event loads a Settings INI from the named variable object, and distributes those numbers into global variables to load into different frames of the game. For instance, if you're playing the game in Windowed, this looks like:
Code:
Options Frame:
- FullscreenBox: If Flag 0 is On
- NVO: Set key "windowed" to 1
- If Apply Button is Pressed: NVO: Save INI as Appdrive$ + "\" + Appdir$ + "\" + "gamesettings"
- If NVO is Done Saving: Set (global variable) loadSettings to 1
Global Event:
- loadSettings = 1: Set (global variable) Windowed to GetValue(NVO, "windowed")
- If (global variable) Windowed = 1
- Ultimate Fullscreen: Go Windowed, Apply Fullscreen settings to windowed size.
For those unfamiliar with NVO, the reason I am transferring values from the ini file into global values is because specific numbers cannot be pulled from NVO in conditions, only generic "key has a value" (without defining that value), or "key exists" conditions are included.
Windowed works great. The problem I am having specifically comes when Fullscreen settings are applied. I have 6 resolution options, including 1920x1080, 1600x900, 1366x768, 1280x720, 1024x576, and 960x540. Upon applying a fullscreen resolution in the Options screen, the UFO manually sets the size to the designated resolution, zooms in at the proper ratio, and centers the screen's position, all in a Global Event. For instance, for 1920, this looks like:
Code:
- Rez = 1920
- UFO is Fullscreen
- UFO: Set Manual Fullscreen Size to (1920,1080), Set game scale to 1, Set manual fullscreen position to 0,0.
While 1600x900 looks like:
Code:
- Rez = 1600
- UFO is Fullscreen
- UFO: Set Manual Fullscreen Size to (1600,900), Set game scale to 1.2, Set manual fullscreen position to 160,90.
Game Scale and fullscreen position assume a native resolution of 1920x1080, although I should probably swap these with UFO's "Game Rectangle Width" function in case anybody decides to run the game at 4K native (unnecessary but it will happen). That aside, while the numbers are saved in global values/events, and the Ultimate Fullscreen Object does exist in every frame, the only frame that accepts the resolution change is on the Options frame itself. The only thing I can think is that having added the UFO from the Options frame before pasting it into every other frame is what's caused this, however I did not have this problem with the NVO. I have tried copying the resolution code into other frames and haven't seen any effect. This is my first time using UFO and the example MFA doesn't really go into much detail for this.
TLDR: Anyone got any ideas how I can get the Ultimate Fullscreen Object's resolution and zoom settings to work across frames?