def __make_text(self): MENU.empty() text = config.load_text("settings", settings.get_language_code()) a = make_text(text[4:], pos=MENU_CORNER, vspace=DIST_APART) b = make_text( ( config.on_off(settings.SETTINGS['fullscreen']), config.on_off(settings.SETTINGS['color_blind']), settings.get_language_name(), config.percent_str(settings.SETTINGS['music_volume']), config.percent_str(settings.SETTINGS['sound_volume']), "", "", "" ), pos=(MENU_CORNER[0] + DIST_APART_STATUS, MENU_CORNER[1]), vspace=DIST_APART ) a[-1].center() self.hud_title = make_text(text[0], TITLE_LOCATION).center() self.menu = SETTINGS_KEYS(*zip(a, b)) MENU.add(self.hud_title, a, b)
def __toggle_color_blind_mode(self, toggle=None): ''' Turns Colorblind Mode on or off. By default it inverts the current boolean value, pass in toggle to explicitly assign a value. @param toggle: The state to change Colorblind mode to. If None, just ''' settings.toggle_color_blind_mode(); self.__change_image(self.menu.colorblind, config.on_off(settings.SETTINGS['color_blind']))
def __toggle_color_blind_mode(self, toggle=None): ''' Turns Colorblind Mode on or off. By default it inverts the current boolean value, pass in toggle to explicitly assign a value. @param toggle: The state to change Colorblind mode to. If None, just ''' settings.toggle_color_blind_mode() self.__change_image(self.menu.colorblind, config.on_off(settings.SETTINGS['color_blind']))
def __make_text(self): MENU.empty() text = config.load_text("settings", settings.get_language_code()) a = make_text(text[4:], pos=MENU_CORNER, vspace=DIST_APART) b = make_text((config.on_off(settings.SETTINGS['fullscreen']), config.on_off(settings.SETTINGS['color_blind']), settings.get_language_name(), config.percent_str(settings.SETTINGS['music_volume']), config.percent_str( settings.SETTINGS['sound_volume']), "", "", ""), pos=(MENU_CORNER[0] + DIST_APART_STATUS, MENU_CORNER[1]), vspace=DIST_APART) a[-1].center() self.hud_title = make_text(text[0], TITLE_LOCATION).center() self.menu = SETTINGS_KEYS(*zip(a, b)) MENU.add(self.hud_title, a, b)
def __toggle_fullscreen(self, toggle): #toggle doesn't really matter because it's the same both ways config.toggle_fullscreen() self.__change_image(self.menu.fullscreen, config.on_off(settings.SETTINGS['fullscreen']))