From fc6572b8fa59949f41742cf295ed8b6b2363e15d Mon Sep 17 00:00:00 2001 From: John Cote Date: Tue, 6 Jul 2021 13:22:22 -0400 Subject: [PATCH] shtiker: Support more display resolutions --- toontown/shtiker/DisplaySettingsDialog.py | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/toontown/shtiker/DisplaySettingsDialog.py b/toontown/shtiker/DisplaySettingsDialog.py index 90ebdf4..7e575fb 100644 --- a/toontown/shtiker/DisplaySettingsDialog.py +++ b/toontown/shtiker/DisplaySettingsDialog.py @@ -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')