diff --git a/ShiftOS.WinForms/Applications/Pong.cs b/ShiftOS.WinForms/Applications/Pong.cs index 5d09ca0..0ef4da3 100644 --- a/ShiftOS.WinForms/Applications/Pong.cs +++ b/ShiftOS.WinForms/Applications/Pong.cs @@ -115,11 +115,12 @@ namespace ShiftOS.WinForms.Applications paddleHuman.BackColor = SkinEngine.LoadedSkin.ControlTextColor; //Check if paddle upgrade has been bought and change paddles accordingly - if (ShiftoriumFrontend.UpgradeInstalled("pong_increased_paddle_size")) - { - paddleHuman.Height = 150; - paddleComputer.Height = 150; - } + //if (ShiftoriumFrontend.UpgradeInstalled("pong_increased_paddle_size")) + //{ + // paddleHuman.Height = 150; + // paddleComputer.Height = 150; + //} + //I don't know the point of this but I'm fucking 86ing it. - Michael //Set the computer player to move according to the ball's position. if (aiShouldIsbeEnabled) diff --git a/ShiftOS.WinForms/Applications/Terminal.cs b/ShiftOS.WinForms/Applications/Terminal.cs index c0fdf01..8d29cba 100644 --- a/ShiftOS.WinForms/Applications/Terminal.cs +++ b/ShiftOS.WinForms/Applications/Terminal.cs @@ -321,7 +321,6 @@ namespace ShiftOS.WinForms.Applications { if (SaveSystem.CurrentSave != null) { if (!ShiftoriumFrontend.UpgradeInstalled("window_manager")) { - rtbterm.Text = AppearanceManager.LastTerminalText; rtbterm.Select(rtbterm.TextLength, 0); } TerminalBackend.PrintPrompt(); diff --git a/ShiftOS.WinForms/Resources/Shiftorium.txt b/ShiftOS.WinForms/Resources/Shiftorium.txt index 2260198..82ee613 100644 --- a/ShiftOS.WinForms/Resources/Shiftorium.txt +++ b/ShiftOS.WinForms/Resources/Shiftorium.txt @@ -259,13 +259,6 @@ Category: "Device Drivers", Description: "With the free placement upgrade, you can place windows of any size anywhere on the desktop, which means theoretically you could add kernel coherence between ShiftOS and another GUI-based operating system and run their applications inside ShiftOS. This upgrade unlocks that.", }, - { - Name: "Pong Increased Paddle Size", - Cost: 1000, - Dependencies: "pong_upgrade", - Category: "Enhancements", - Description: "Having trouble keeping that darn ball in front of you? Well, with this upgrade, your paddle increases in height.... slightly.", - }, { Name: "WM 4 Windows", Cost: 150, diff --git a/ShiftOS.WinForms/WinformsWindowManager.cs b/ShiftOS.WinForms/WinformsWindowManager.cs index 4fcd185..8bff387 100644 --- a/ShiftOS.WinForms/WinformsWindowManager.cs +++ b/ShiftOS.WinForms/WinformsWindowManager.cs @@ -125,12 +125,6 @@ namespace ShiftOS.WinForms public override void SetupWindow(IShiftOSWindow form) { - if (!AppearanceManager.CanOpenWindow(form)) - { - Infobox.Show("{MULTIPLAYER_ONLY}", "{MULTIPLAYER_ONLY_EXP}"); - return; - } - foreach(var attr in form.GetType().GetCustomAttributes(true)) { if(attr is MultiplayerOnlyAttribute) diff --git a/ShiftOS_TheReturn/ConsoleEx.cs b/ShiftOS_TheReturn/ConsoleEx.cs index 69f6a18..90f9cc0 100644 --- a/ShiftOS_TheReturn/ConsoleEx.cs +++ b/ShiftOS_TheReturn/ConsoleEx.cs @@ -6,8 +6,14 @@ using System.Threading.Tasks; namespace ShiftOS.Engine { + /// + /// Provides extra eye candy data that can be used by ShiftOS terminals. + /// public static class ConsoleEx { + /// + /// Initializes the class, performing core configuration. + /// static ConsoleEx() { ForegroundColor = ConsoleColor.White; @@ -18,11 +24,29 @@ namespace ShiftOS.Engine Underline = false; } + /// + /// Gets or sets the foreground color of text in the Terminal. + /// public static ConsoleColor ForegroundColor { get; set; } + + /// + /// Gets or sets the background color of text in the Terminal. + /// public static ConsoleColor BackgroundColor { get; set; } + /// + /// Gets or sets whether text in the Terminal is bold. + /// public static bool Bold { get; set; } + + /// + /// Gets or sets whether text in the Terminal is italic. + /// public static bool Italic { get; set; } + + /// + /// Gets or sets whether text in the Terminal is underlined. + /// public static bool Underline { get; set; } } } diff --git a/ShiftOS_TheReturn/CrashHandler.cs b/ShiftOS_TheReturn/CrashHandler.cs index 734f1a9..ed42ea5 100644 --- a/ShiftOS_TheReturn/CrashHandler.cs +++ b/ShiftOS_TheReturn/CrashHandler.cs @@ -97,7 +97,6 @@ namespace ShiftOS.Engine { if(SaveSystem.CurrentSave != null) TerminalBackend.InvokeCommand("sos.save"); - AudioManager.Kill(); ServerManager.Disconnect(); while (Application.OpenForms.Count > 0) diff --git a/ShiftOS_TheReturn/Desktop.cs b/ShiftOS_TheReturn/Desktop.cs index b72f0cc..bc17a8e 100644 --- a/ShiftOS_TheReturn/Desktop.cs +++ b/ShiftOS_TheReturn/Desktop.cs @@ -37,6 +37,10 @@ using static ShiftOS.Engine.SkinEngine; namespace ShiftOS.Engine { + /// + /// Denotes that this class is launchable from the App Launcher. + /// + [AttributeUsage(AttributeTargets.Class, AllowMultiple = false)] public class LauncherAttribute : Attribute { /// @@ -54,10 +58,29 @@ namespace ShiftOS.Engine ID = upgradeID; } + /// + /// Gets or sets the name of the launcher item + /// public string Name { get; set; } + + /// + /// Gets or sets whether this entry requires a Shiftorium upgrade. + /// public bool RequiresUpgrade { get; set; } + + /// + /// Gets or sets the ID of the required upgrade. + /// public string ID { get; set; } + + /// + /// Gets or sets this item's category. + /// public string Category { get; private set; } + + /// + /// Gets whether or not the required upgrade is installed. + /// public bool UpgradeInstalled { get @@ -70,36 +93,110 @@ namespace ShiftOS.Engine } } - + /// + /// Provides core functionality for a typical ShiftOS desktop. + /// public interface IDesktop { + /// + /// Gets the name of the desktop. + /// string DesktopName { get; } + + /// + /// Performs most of the skinning and layout handling for the desktop. + /// void SetupDesktop(); + /// + /// Hides the currently-opened app launcher menu. + /// void HideAppLauncher(); + + /// + /// Populates the app launcher menu. + /// + /// All items to be placed in the menu. void PopulateAppLauncher(LauncherItem[] items); + + /// + /// Handles desktop-specific routines for showing ShiftOS windows. + /// + /// The calling window. void ShowWindow(IWindowBorder border); + + /// + /// Handles desktop-specific routines for closing ShiftOS windows. + /// + /// The calling window. void KillWindow(IWindowBorder border); + + /// + /// Populates the panel button list with all open windows. + /// void PopulatePanelButtons(); + + /// + /// Performs desktop-specific routines for minimizing a window. + /// + /// The calling window. void MinimizeWindow(IWindowBorder brdr); + + + /// + /// Performs desktop-specific routines for maximizing a window. + /// + /// The calling window. void MaximizeWindow(IWindowBorder brdr); + + + /// + /// Performs desktop-specific routines for restoring a window to its default state. + /// + /// The calling window. void RestoreWindow(IWindowBorder brdr); + + /// + /// Invokes an action on the UI thread. + /// + /// The action to invoke. void InvokeOnWorkerThread(Action act); + + /// + /// Calculates the screen size of the desktop. + /// + /// The desktop's screen size. Size GetSize(); + /// + /// Opens the app launcher at a specific point. + /// + /// Where the app launcher should be opened. void OpenAppLauncher(Point loc); + /// + /// Opens the desktop. + /// void Show(); + + /// + /// Closes the desktop. + /// void Close(); } public static class Desktop { + /// + /// The underlying desktop object. + /// private static IDesktop _desktop = null; - public static Size Size { get + public static Size Size + { + get { return _desktop.GetSize(); }