public static void LoadSkin() { LoadedSkin = JsonConvert.DeserializeObject <Skin>(Utils.ReadAllText(Paths.GetPath("skin.json"))); SkinLoaded?.Invoke(); Desktop.ResetPanelButtons(); Desktop.PopulateAppLauncher(); }
// Decorates a window with a border, then shows the window, as a dialog box. public static void SetupDialog(IShiftOSWindow form) { if (form == null) { //NULLLLLLLLL throw new ArgumentNullException("form"); } if (winmgr == null) { //ASGDFHASDGF throw new EngineModuleDisabledException(); } winmgr.SetupDialog(form); Desktop.ResetPanelButtons(); }
// Closes the specified window. SHOCKED YOU ARE I KNOW, HOW COULD YOU HAVE GUESSED public static void Close(IShiftOSWindow win) { if (win == null) { //NOPE SHOULDNT BE NULL throw new ArgumentNullException("win"); } if (winmgr == null) { //WHY IS THIS NULL throw new EngineModuleDisabledException(); } winmgr.Close(win); Desktop.ResetPanelButtons(); }
// Decorates a window with a border, then shows the window. public static void SetupWindow(IShiftOSWindow form) { if (form == null) { //YOU GET THE POINT THIS REALLY SHOULDNT BE NULL throw new ArgumentNullException("form"); } if (winmgr == null) { //SAME HERE throw new EngineModuleDisabledException(); } winmgr.SetupWindow(form); Desktop.ResetPanelButtons(); }
/// <summary> /// Buy an upgrade, deducting the specified amount of Codepoints. /// </summary> /// <param name="id">The upgrade ID to buy</param> /// <param name="cost">The amount of Codepoints to deduct</param> /// <returns>True if the upgrade was installed successfully, false if the user didn't have enough Codepoints or the upgrade wasn' found.</returns> public static bool Buy(string id, ulong cost) { if (SaveSystem.CurrentSave.Codepoints >= cost) { SaveSystem.CurrentSave.Upgrades[id] = true; TerminalBackend.InvokeCommand("sos.save"); SaveSystem.TransferCodepointsToVoid(cost); Installed?.Invoke(); Desktop.ResetPanelButtons(); Desktop.PopulateAppLauncher(); return(true); } else { if (!Silent) { Console.WriteLine($"{{SHIFTORIUM_NOTENOUGHCP}}: {cost} > {SaveSystem.CurrentSave.Codepoints}"); } return(false); } }
public static void SetupDialog(IShiftOSWindow form) { winmgr.SetupDialog(form); Desktop.ResetPanelButtons(); }
public static void Close(IShiftOSWindow win) { winmgr.Close(win); Desktop.ResetPanelButtons(); }