def change_value(self, factor=1): if self.selected == 0: self.volume_slider.change_value(SettingsState.SLIDER_DELTA * factor) Globals.set_volume(self.volume_slider.value) elif self.selected == 1: self.brightness_slider.change_value(SettingsState.SLIDER_DELTA * factor) Globals.set_brightness(SettingsState.MIN_BRIGHTNESS + self.brightness_slider.value)
def change_value(self, factor=1): if self.selected == 0: self.volume_slider.change_value( SettingsState.SLIDER_DELTA * factor) Globals.set_volume(self.volume_slider.value) elif self.selected == 1: self.brightness_slider.change_value( SettingsState.SLIDER_DELTA * factor) Globals.set_brightness(SettingsState.MIN_BRIGHTNESS + self.brightness_slider.value)
def initialize(self): pygame.init() Globals.WIDTH = 1000 Globals.HEIGHT = 600 Globals.SCREEN = pygame.display.set_mode( (Globals.WIDTH, Globals.HEIGHT)) SettingsManager.load() Globals.set_brightness(SettingsManager.BRIGHTNESS, save=False) Globals.set_volume(SettingsManager.VOLUME, save=False) pygame.display.set_caption('The Crazy Six - Field Day') Globals.STATE = Title() Globals.EVENT_MANAGER = EventManager()