diff options
| author | william341 <[email protected]> | 2017-05-28 12:37:00 -0700 |
|---|---|---|
| committer | GitHub <[email protected]> | 2017-05-28 12:37:00 -0700 |
| commit | 771c20cfb3a703e0f1550fdcf9eb07b78298c944 (patch) | |
| tree | 59cb532e15ebff313fdba2be264d78ec0033f407 /ShiftOS_TheReturn/ConsoleEx.cs | |
| parent | 496b0cbf8659c99203f48210fd39c572400ae623 (diff) | |
| parent | c7ba7d733c756d196f98dd4533289a1ef4db715f (diff) | |
| download | shiftos_thereturn-771c20cfb3a703e0f1550fdcf9eb07b78298c944.tar.gz shiftos_thereturn-771c20cfb3a703e0f1550fdcf9eb07b78298c944.tar.bz2 shiftos_thereturn-771c20cfb3a703e0f1550fdcf9eb07b78298c944.zip | |
Merge pull request #1 from shiftos-game/master
welp, no longer a dev.
Diffstat (limited to 'ShiftOS_TheReturn/ConsoleEx.cs')
| -rw-r--r-- | ShiftOS_TheReturn/ConsoleEx.cs | 59 |
1 files changed, 59 insertions, 0 deletions
diff --git a/ShiftOS_TheReturn/ConsoleEx.cs b/ShiftOS_TheReturn/ConsoleEx.cs new file mode 100644 index 0000000..74483dc --- /dev/null +++ b/ShiftOS_TheReturn/ConsoleEx.cs @@ -0,0 +1,59 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace ShiftOS.Engine +{ + /// <summary> + /// Provides extra eye candy data that can be used by ShiftOS terminals. + /// </summary> + public static class ConsoleEx + { + /// <summary> + /// Initializes the <see cref="ConsoleEx"/> class, performing core configuration. + /// </summary> + static ConsoleEx() + { + ForegroundColor = ConsoleColor.White; + BackgroundColor = ConsoleColor.Black; + + Bold = false; + Italic = false; + Underline = false; + } + + /// <summary> + /// Gets or sets the foreground color of text in the Terminal. + /// </summary> + public static ConsoleColor ForegroundColor { get; set; } + + /// <summary> + /// Gets or sets the background color of text in the Terminal. + /// </summary> + public static ConsoleColor BackgroundColor { get; set; } + + /// <summary> + /// Gets or sets whether text in the Terminal is bold. + /// </summary> + public static bool Bold { get; set; } + + /// <summary> + /// Gets or sets whether text in the Terminal is italic. + /// </summary> + public static bool Italic { get; set; } + + /// <summary> + /// Gets or sets whether text in the Terminal is underlined. + /// </summary> + public static bool Underline { get; set; } + + internal static void Flush() + { + OnFlush?.Invoke(); + } + + public static Action OnFlush; + } +} |
