def set_resolution(width, height): Config.set_resolution(width, height) SaveManager.set_entry('preferences', 'resolution', [width, height]) GUI.clear() MainMenuGUI.init() MainMenuGUI.remove_buttons() SettingsGUI.init()
def exit_in_menu(): for scene in SceneManager.scenes.values(): for obj in scene.objects: for component in obj.get_components(NetworkingController): component.client.shutdown() for component in obj.get_components(ChatController): component.client.shutdown() GUI.clear() load_scene('scenes/main_menu.json') MainMenuGUI.init()
def start_game(): load_scene('scenes/scene1.json') SaveManager.add_profile('village1', {'seen_tardis': False}) GUI.clear() GameGUI.init()