def __init__(self): super().__init__(100, 100, 100, 100) events.settingsevents.push_handlers(self) global x, y self.width = int(x * 0.75) self.height = int(y * 0.6) self.x = int((x / 2) - (self.width / 2)) self.y = int((y * 0.37) - (self.height / 2)) self.active = self._active = True self.posleft = int(-self.width) self.poscenter = int((x / 2) - (self.width / 2)) self.posright = int(x) fullscreenLabel = Label("Fullscreen", font_size=25, anchor_x="left", anchor_y="center", color=(255, 255, 255, 255)) fullscreenLabel.x = self.width * 0.05 fullscreenLabel.y = self.height * 0.9 fullscreenButton = SettingsToggleButton(cfg.configuration, section = "Core", option = "fullscreen", command = director.window.set_fullscreen) fullscreenButton.x = self.width * 0.9 fullscreenButton.y = self.height * 0.9 vsyncLabel = Label("VSync", font_size=25, anchor_x="left", anchor_y="center", color=(255, 255, 255, 255)) vsyncLabel.x = self.width * 0.05 vsyncLabel.y = self.height * 0.7 vsyncButton = SettingsToggleButton(cfg.configuration, section = "Core", option = "vsync", command = director.window.set_vsync) vsyncButton.x = self.width * 0.9 vsyncButton.y = self.height * 0.7 showfpsLabel = Label("Show FPS", font_size=25, anchor_x="left", anchor_y="center", color=(255, 255, 255, 255)) showfpsLabel.x = self.width * 0.05 showfpsLabel.y = self.height * 0.5 showfpsButton = SettingsToggleButton(cfg.configuration, section = "Core", option = "showfps", command = director.set_show_FPS) showfpsButton.x = self.width * 0.9 showfpsButton.y = self.height * 0.5 resInputLabel = Label("Resolution", font_size=25, anchor_x="left", anchor_y="center", color=(255, 255, 255, 255)) resInputLabel.x = self.width * 0.05 resInputLabel.y = self.height * 0.3 resInput = self.ResolutionInput(self) self.add(fullscreenButton) self.add(fullscreenLabel) self.add(vsyncButton) self.add(vsyncLabel) self.add(showfpsButton) self.add(showfpsLabel) self.add(resInput) self.add(resInputLabel)
def __init__(self): super().__init__(0, 0, 255, 255) events.settingsevents.push_handlers(self) global x, y self.width = int(x * 0.75) self.height = int(y * 0.6) self.posleft = int(-self.width) self.poscenter = int((x / 2) - (self.width / 2)) self.posright = int(x) self.x = self.posright self.y = int((y * 0.37) - (self.height / 2)) self.active = self._active = False miscInfo = Label("Coming Soon", anchor_x="center", anchor_y="center", font_size=35, multiline=True, width=(self.width * 0.8), align="center") miscInfo.x = self.width / 2 miscInfo.y = self.height / 2 self.add(miscInfo)