def __init__(self, parent): StatusElement.__init__(self, parent) self.error_icon = Image("launcher:res/16/error.png") self.warning_icon = Image("launcher:res/16/warning_3.png") self.notice_icon = Image("launcher:res/16/information.png") self.icons = [ self.error_icon, self.warning_icon, self.notice_icon, ] self.coordinates = [] self.warnings = [] self.game_notice = "" self.variant_notice = "" self.variant_warning = "" self.variant_error = "" self.joy_emu_conflict = "" self.using_joy_emu = False self.kickstart_file = "" self.x_kickstart_file_sha1 = "" self.update_available = "" self.__error = "" self.x_missing_files = "" self.download_page = "" self.download_file = "" self.amiga_model = "" self.amiga_model_calculated = "" self.chip_memory = "" self.chip_memory_calculated = 0 self.outdated_plugins = [] self.custom_config = set() self.custom_uae_config = set() self.settings_config_keys = set() plugin_manager = PluginManager.instance() for plugin in plugin_manager.plugins(): if plugin.outdated: self.outdated_plugins.append(plugin.name) ConfigBehavior(self, [ "x_game_notice", "x_variant_notice", "x_variant_warning", "x_variant_error", "x_joy_emu_conflict", "amiga_model", "x_kickstart_file_sha1", "kickstart_file", "download_page", "download_file", "x_missing_files", "__error", "chip_memory", "jit_compiler"]) SettingsBehavior(self, ["__update_available"]) LauncherConfig.add_listener(self) for key in JOYSTICK_KEYS: self.on_config(key, LauncherConfig.get(key)) for key in LauncherConfig.keys(): if LauncherConfig.is_custom_uae_option(key): self.on_config(key, LauncherConfig.get(key)) elif LauncherConfig.is_custom_option(key): self.on_config(key, LauncherConfig.get(key)) LauncherSettings.add_listener(self) for key in LauncherSettings.keys(): if LauncherConfig.is_config_only_option(key): self.on_setting(key, LauncherSettings.get(key))
def __init__(self, parent): StatusElement.__init__(self, parent) self.icon = Image("launcher:/data/16x16/user.png") self.text = gettext("N/A") self.active = False self.players = "" config = get_config(self) config.add_listener(self) self.on_config("players", config.get("players"))
def __init__(self, parent, language, icon, tool_tip=""): StatusElement.__init__(self, parent) self.set_min_width(32) self.icon = icon self.language = language self.languages = "" self.hide() if tool_tip: self.set_tooltip(tool_tip) config = get_config(self) config.add_listener(self) self.on_config("languages", config.get("languages"))
def __init__(self, parent): StatusElement.__init__(self, parent) # self.set_min_width(140) # self.layout = HorizontalLayout() self.protection_icon = Image("launcher:/data/16x16/lock.png") # self.unknown_icon = self.icon.grey_scale() self.disabled_icon = Image("launcher:/data/16x16/lock_open_green.png") # self.disabled_icon = self.disabled_icon.grey_scale() self.icon = self.protection_icon self.na_text = " " self.protection = "" self.text = self.na_text self.active = False config = get_config(self) config.add_listener(self) self.on_config("protection", config.get("protection"))
def __init__(self, parent): StatusElement.__init__(self, parent) # self.set_min_width(140) self.layout = HorizontalLayout() self.icon = Image("launcher:/data/16x16/world_link.png") self.right_icon = Image("launcher:/data/16x16/drop_down_arrow.png") self.right_icon_disabled = Image( "launcher:/data/16x16/drop_down_arrow_disabled.png") # self.inactive_icon = self.active_icon.grey_scale() self.text = gettext("Web Links") config = get_config(self) config.add_listener(self) self.on_config("protection", config.get("protection")) self.have = set() for key in url_keys: self.on_config(key, config.get(key))
def __init__(self, parent): StatusElement.__init__(self, parent) self.error_icon = Image("launcher:res/16x16/error.png") self.warning_icon = Image("launcher:res/16x16/warning_3.png") self.notice_icon = Image("launcher:res/16x16/information.png") self.icons = [self.error_icon, self.warning_icon, self.notice_icon] self.coordinates = [] self.warnings = [] self.game_notice = "" self.variant_notice = "" self.variant_warning = "" self.variant_error = "" self.joy_emu_conflict = "" self.using_joy_emu = False self.kickstart_file = "" self.x_kickstart_file_sha1 = "" self.update_available = "" self.__error = "" self.x_missing_files = "" self.download_page = "" self.download_file = "" self.platform = "" self.amiga_model = "" self.amiga_model_calculated = "" self.chip_memory = "" self.chip_memory_calculated = 0 self.outdated_plugins = [] self.custom_config = set() self.custom_uae_config = set() self.settings_config_keys = set() plugin_manager = PluginManager.instance() for plugin in plugin_manager.plugins(): if plugin.outdated: self.outdated_plugins.append(plugin.name) ConfigBehavior( self, [ "x_game_notice", "x_variant_notice", "x_variant_warning", "x_variant_error", "x_joy_emu_conflict", "amiga_model", "x_kickstart_file_sha1", "kickstart_file", "download_page", "download_file", "x_missing_files", "__error", "chip_memory", "jit_compiler", "platform", ], ) SettingsBehavior(self, ["__update_available"]) LauncherConfig.add_listener(self) for key in JOYSTICK_KEYS: self.on_config(key, LauncherConfig.get(key)) for key in LauncherConfig.keys(): if LauncherConfig.is_custom_uae_option(key): self.on_config(key, LauncherConfig.get(key)) elif LauncherConfig.is_custom_option(key): self.on_config(key, LauncherConfig.get(key)) LauncherSettings.add_listener(self) for key in LauncherSettings.keys(): if LauncherConfig.is_config_only_option(key): self.on_setting(key, LauncherSettings.get(key))