Fullscreen/Resolution
Posted: Tue Nov 26, 2013 10:07 pm
I am doing a small project in livecode for windows/mac use and I want to have an options menu where you can change the resolution of the game and if it is fullscreen or not, the way I planned on doing it was by having Options Menu's with 3 options: 1920x1080, 1600x900, 800x600, then a button to essentially apply these settings, the respective code is here:
Options Menu
Apply Button
I also have the same setup for fullscreen/windowed mode:
Options Menu
Apply Button
I am having some issues with this(hence posting on the forums ^^) and was hoping to get some help.
All help appreciated!
Alex
Options Menu
Code: Select all
global xOfRes, yOfRes
on menuPick pItemName
switch pItemName
case "800x600"
put 800 into xOfRes
put 600 into yOfRes
answer "800x600"
case "1600x900"
put 1600 into xOfRes
put 900 into yOfRes
case "1920x1080"
put 1920 into xOfRes
put 1080 into yOfRes
end switch
end menuPick
Code: Select all
global xOfRes, yOfRes
on mouseUp
revChangeWindowSize "xOfRes", "yOfRes"
end mouseUp
Options Menu
Code: Select all
global theScreenType
on menuPick pItemName
switch pItemName
case "Windowed"
put false into theScreenType
case "Fullscreen"
put true into theScreenType
end switch
end menuPick
Code: Select all
global theScreenType
on mouseUp
set the fullscreen of this stack to theScreenType
end mouseUp
All help appreciated!
Alex