def toggle_fullscreen(value): SaveManager.set_entry('preferences', 'fullscreen', value) Config.set_fullscreen(value)
from engine.scene_manager import SceneManager import pygame import sys from engine.input_manager import InputManager from engine.save_manager import SaveManager from engine.gui import GUI from user_components import NetworkingController, ChatController from scene_loader import load_scene from guis import MainMenuGUI SaveManager.load_profile('preferences', 'user_prefs.json') Config.set_resolution(*SaveManager.get_entry('preferences', 'resolution')) Config.set_fullscreen(SaveManager.get_entry('preferences', 'fullscreen')) GUI.set_cursor(SaveManager.get_entry('config', 'cursor')) InputManager.set_axis('Horizontal', { SaveManager.get_entry('preferences', 'right'): 1, SaveManager.get_entry('preferences', 'left'): -1, }) InputManager.set_axis('Vertical', { SaveManager.get_entry('preferences', 'up'): 1, SaveManager.get_entry('preferences', 'down'): -1, }) load_scene('scenes/main_menu.json') MainMenuGUI.init()