shtiker: Support more display resolutions

This commit is contained in:
John Cote 2021-07-06 13:22:22 -04:00
parent dc3e915b71
commit fc6572b8fa

View file

@ -38,11 +38,18 @@ class DisplaySettingsDialog(DirectFrame, StateData.StateData):
self.isLoaded = 1
self.anyChanged = 0
self.apiChanged = 0
self.screenSizes = ((640, 480),
screenSizes = [(640, 480),
(800, 600),
(1024, 768),
(1280, 1024),
(1600, 1200))
(1600, 1200)]
displayInfo = base.pipe.getDisplayInformation()
for i in range(displayInfo.getTotalDisplayModes()):
width = displayInfo.getDisplayModeWidth(i)
height = displayInfo.getDisplayModeHeight(i)
if (width, height) not in screenSizes:
screenSizes.append((width, height))
self.screenSizes = sorted(screenSizes)
guiButton = loader.loadModel('phase_3/models/gui/quit_button')
gui = loader.loadModel('phase_3.5/models/gui/friendslist_gui')
nameShopGui = loader.loadModel('phase_3/models/gui/nameshop_gui')