def __init__(self): self.mainlistener = MainListener(self) self.windows = WindowManager() # temporary aliases for compatibility with rest of the code self.open_popup = self.windows.open_popup self.open_error_popup = self.windows.open_error_popup # Main menu background image setup. available_images = glob.glob('content/gui/images/background/mainmenu/bg_*.png') self.bg_images = deque(available_images) latest_bg = horizons.globals.fife.get_uh_setting("LatestBackground") try: # If we know the current background from an earlier session, # show all other available ones before picking that one again. self.bg_images.remove(latest_bg) self.bg_images.append(latest_bg) except ValueError: pass self._background = Icon(position_technique='center:center') self.rotate_background() self._background.show() # Initialize menu dialogs and widgets that are accessed from `gui`. self.singleplayermenu = SingleplayerMenu(self.windows) self.multiplayermenu = MultiplayerMenu(self, self.windows) self.help_dialog = HelpDialog(self.windows) self.loadingscreen = LoadingScreen() self.settings_dialog = SettingsDialog(self.windows) self.mainmenu = MainMenu(self, self.windows) self.fps_display = FPSDisplay()
def __init__(self): #i18n this defines how each line in our help looks like. Default: '[C] = Chat' self.HELPSTRING_LAYOUT = _('[{key}] = {text}') #xgettext:python-format self.mainlistener = MainListener(self) self.current = None # currently active window self.widgets = LazyWidgetsDict(self.styles) # access widgets with their filenames without '.xml' self.keyconf = KeyConfig() # before build_help_strings self.build_help_strings() self.session = None self.current_dialog = None self.dialog_executed = False self.__pause_displayed = False self._background_image = self._get_random_background() self.subscribe()
def __init__(self): self.mainlistener = MainListener(self) self.current = None # currently active window self.widgets = LazyWidgetsDict( self.styles) # access widgets with their filenames without '.xml' self.session = None self.current_dialog = None self.dialog_executed = False self.__pause_displayed = False self._background_image = self._get_random_background() self.subscribe() self.singleplayermenu = SingleplayerMenu(self) self.multiplayermenu = MultiplayerMenu(self) self.help_dialog = HelpDialog(self)
def __init__(self): self.mainlistener = MainListener(self) self.windows = WindowManager() # temporary aliases for compatibility with rest of the code self.show_popup = self.windows.show_popup self.show_error_popup = self.windows.show_error_popup self._background = Icon(image=self._get_random_background(), position_technique='center:center') self._background.show() self.singleplayermenu = SingleplayerMenu(self.windows) self.multiplayermenu = MultiplayerMenu(self, self.windows) self.help_dialog = HelpDialog(self.windows) self.loadingscreen = LoadingScreen() self.settings_dialog = SettingsDialog(self.windows) self.mainmenu = MainMenu(self, self.windows) self.fps_display = FPSDisplay()
def __init__(self): self.mainlistener = MainListener(self) self.windows = WindowManager() # temporary aliases for compatibility with rest of the code self.open_popup = self.windows.open_popup self.open_error_popup = self.windows.open_error_popup self._background = Background() self._background.show() # Initialize menu dialogs and widgets that are accessed from `gui`. self.singleplayermenu = SingleplayerMenu(self.windows) self.multiplayermenu = MultiplayerMenu(self, self.windows) self.help_dialog = HelpDialog(self.windows) self.loadingscreen = LoadingScreen() self.settings_dialog = SettingsDialog(self.windows) self.mainmenu = MainMenu(self, self.windows) self.fps_display = FPSDisplay()
def __init__(self): self.mainlistener = MainListener(self) self.current = None # currently active window self.widgets = LazyWidgetsDict(self.styles) # access widgets with their filenames without '.xml' self.session = None self.current_dialog = None