From c81573594f509177214bbc9b64427c8aabdc30a6 Mon Sep 17 00:00:00 2001 From: AShifter Date: Sat, 25 Nov 2017 08:59:48 -0700 Subject: Add SaveSystem, FullScreen Terminal and stuff Git had a horrible seizure and removed our repo but Alex-TIMEHACK helped us get it back. --- ShiftOS.Engine/CodepointUpgrade.cs | 17 +++ ShiftOS.Engine/SaveSystem.cs | 75 +++++++++++++ ShiftOS.Engine/ShiftOS.Engine.csproj | 7 +- ShiftOS.Engine/UI/ShiftButton.Designer.cs | 11 +- ShiftOS.Engine/UI/ShiftButton.cs | 60 +++++++++- ShiftOS.Engine/UI/ShiftButton.resx | 123 +++++++++++++++++++++ ShiftOS.Engine/UI/ShiftStripRenderer.cs | 21 ++++ .../WindowManager/InfoboxTemplate.Designer.cs | 90 ++++++++------- ShiftOS.Engine/WindowManager/InfoboxTemplate.cs | 39 ++++--- ShiftOS.Engine/WindowManager/ShiftSkinData.cs | 47 +++++--- ShiftOS.Engine/WindowManager/ShiftWM.cs | 54 ++++----- ShiftOS.Engine/WindowManager/ShiftWindow.cs | 12 +- 12 files changed, 438 insertions(+), 118 deletions(-) create mode 100644 ShiftOS.Engine/CodepointUpgrade.cs create mode 100644 ShiftOS.Engine/UI/ShiftButton.resx create mode 100644 ShiftOS.Engine/UI/ShiftStripRenderer.cs (limited to 'ShiftOS.Engine') diff --git a/ShiftOS.Engine/CodepointUpgrade.cs b/ShiftOS.Engine/CodepointUpgrade.cs new file mode 100644 index 0000000..9f4f0f1 --- /dev/null +++ b/ShiftOS.Engine/CodepointUpgrade.cs @@ -0,0 +1,17 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using ShiftOS.Engine; + +namespace ShiftOS.Engine +{ + public class CodepointUpgrade + { + public interface ICodepointUpgrade + { + int codePoints { get; set; } + } + } +} diff --git a/ShiftOS.Engine/SaveSystem.cs b/ShiftOS.Engine/SaveSystem.cs index 59ddf4b..51924d0 100644 --- a/ShiftOS.Engine/SaveSystem.cs +++ b/ShiftOS.Engine/SaveSystem.cs @@ -16,6 +16,13 @@ namespace ShiftOS.Engine return Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData), "ShiftOS-Rewind"); } } + public static string dataDir + { + get + { + return gameDir + "\\Data"; + } + } public static string fontDir { get @@ -23,5 +30,73 @@ namespace ShiftOS.Engine return gameDir + "\\Fonts"; } } + public static string baseGameDir + { + get + { + return gameDir + "\\GameData"; + } + } + public static string homeDir + { + get + { + return baseGameDir + "\\Home"; + } + } + public static string desktopDir + { + get + { + return homeDir + "\\Desktop"; + } + } + public static string docDir + { + get + { + return homeDir + "\\Documents"; + } + } + public static string downloadsDir + { + get + { + return homeDir + "\\Downloads"; + } + } + public static string musicDir + { + get + { + return homeDir + "\\Music"; + } + } + public static string picDir + { + get { return homeDir + "\\Pictures"; } + } + public static class User + { + public static int codePoints + { + get + { + return 0; + } + set + { + + } + } + public static void AddToCodePoints(int amountToAdd) + { + codePoints += amountToAdd; + using (var fs = File.OpenWrite(dataDir + "\\userCodePoints.whoa")) + { + Whoa.Whoa.SerialiseObject(fs, codePoints); + } + } + } } } diff --git a/ShiftOS.Engine/ShiftOS.Engine.csproj b/ShiftOS.Engine/ShiftOS.Engine.csproj index faff407..fe4a06e 100644 --- a/ShiftOS.Engine/ShiftOS.Engine.csproj +++ b/ShiftOS.Engine/ShiftOS.Engine.csproj @@ -55,6 +55,7 @@ + @@ -78,11 +79,12 @@ - UserControl + Component ShiftButton.cs + UserControl @@ -107,6 +109,9 @@ FileOpener.cs + + ShiftButton.cs + InfoboxTemplate.cs diff --git a/ShiftOS.Engine/UI/ShiftButton.Designer.cs b/ShiftOS.Engine/UI/ShiftButton.Designer.cs index a84ba4a..c746a5e 100644 --- a/ShiftOS.Engine/UI/ShiftButton.Designer.cs +++ b/ShiftOS.Engine/UI/ShiftButton.Designer.cs @@ -2,7 +2,7 @@ { partial class ShiftButton { - /// + /// /// Required designer variable. /// private System.ComponentModel.IContainer components = null; @@ -22,14 +22,15 @@ #region Component Designer generated code - /// - /// Required method for Designer support - do not modify + /// + /// Required method for Designer support - do not modify /// the contents of this method with the code editor. /// private void InitializeComponent() { - components = new System.ComponentModel.Container(); - this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.SuspendLayout(); + this.ResumeLayout(false); + } #endregion diff --git a/ShiftOS.Engine/UI/ShiftButton.cs b/ShiftOS.Engine/UI/ShiftButton.cs index ebf6e2b..8e4104d 100644 --- a/ShiftOS.Engine/UI/ShiftButton.cs +++ b/ShiftOS.Engine/UI/ShiftButton.cs @@ -1,8 +1,6 @@ using System; using System.Collections.Generic; -using System.ComponentModel; using System.Drawing; -using System.Data; using System.Linq; using System.Text; using System.Threading.Tasks; @@ -10,11 +8,63 @@ using System.Windows.Forms; namespace ShiftOS.Engine.UI { - public partial class ShiftButton : UserControl + public partial class ShiftButton : Button { - public ShiftButton() + private static Font _normalFont = new Font("Lucida Console", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + + private static Color _back = System.Drawing.Color.Black; + private static Color _border = System.Drawing.Color.White; + private static Color _activeBorder = System.Drawing.Color.Black; + private static Color _fore = System.Drawing.Color.Black; + private static Padding _margin = new System.Windows.Forms.Padding(0, 0, 0, 0); + private static Padding _padding = new System.Windows.Forms.Padding(3, 3, 3, 3); + + private static Size _minSize = new System.Drawing.Size(75, 23); + + private bool _active; + + public ShiftButton(): base() + { + base.Font = _normalFont; + base.BackColor = _border; + base.ForeColor = _fore; + base.FlatAppearance.BorderColor = _back; + base.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + base.Margin = _margin; + base.Padding = _padding; + base.MinimumSize = _minSize; + } + + protected override void OnControlAdded(ControlEventArgs e) + { + base.OnControlAdded(e); + UseVisualStyleBackColor = false; + } + + protected override void OnMouseEnter(System.EventArgs e) + { + base.OnMouseEnter(e); + if (!_active) + base.FlatAppearance.BorderColor = _activeBorder; + } + + protected override void OnMouseLeave(System.EventArgs e) + { + base.OnMouseLeave(e); + if (!_active) + base.FlatAppearance.BorderColor = _border; + } + + public void SetStateActive() + { + _active = true; + base.FlatAppearance.BorderColor = _activeBorder; + } + + public void SetStateNormal() { - InitializeComponent(); + _active = false; + base.FlatAppearance.BorderColor = _border; } } } diff --git a/ShiftOS.Engine/UI/ShiftButton.resx b/ShiftOS.Engine/UI/ShiftButton.resx new file mode 100644 index 0000000..e5858cc --- /dev/null +++ b/ShiftOS.Engine/UI/ShiftButton.resx @@ -0,0 +1,123 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + False + + \ No newline at end of file diff --git a/ShiftOS.Engine/UI/ShiftStripRenderer.cs b/ShiftOS.Engine/UI/ShiftStripRenderer.cs new file mode 100644 index 0000000..7b8498f --- /dev/null +++ b/ShiftOS.Engine/UI/ShiftStripRenderer.cs @@ -0,0 +1,21 @@ +using System; +using System.Collections.Generic; +using System.Drawing; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows.Forms; + +namespace ShiftOS.Engine.UI +{ + public class ShiftStripRenderer : ToolStripProfessionalRenderer + { + protected override void OnRenderLabelBackground(ToolStripItemRenderEventArgs e) + { + using (var b = new SolidBrush(e.Item.BackColor)) + { + e.Graphics.FillRectangle(b, new Rectangle(Point.Empty, e.Item.Size)); + } + } + } +} diff --git a/ShiftOS.Engine/WindowManager/InfoboxTemplate.Designer.cs b/ShiftOS.Engine/WindowManager/InfoboxTemplate.Designer.cs index 58c191e..3279179 100644 --- a/ShiftOS.Engine/WindowManager/InfoboxTemplate.Designer.cs +++ b/ShiftOS.Engine/WindowManager/InfoboxTemplate.Designer.cs @@ -29,42 +29,14 @@ private void InitializeComponent() { this.components = new System.ComponentModel.Container(); - this.btnOpt1 = new System.Windows.Forms.Button(); - this.btnOpt2 = new System.Windows.Forms.Button(); this.pictureBox1 = new System.Windows.Forms.PictureBox(); this.changeSize = new System.Windows.Forms.Timer(this.components); - this.label1 = new System.Windows.Forms.Label(); + this.label1 = new System.Windows.Forms.TextBox(); + this.btnOpt2 = new ShiftOS.Engine.UI.ShiftButton(); + this.btnOpt1 = new ShiftOS.Engine.UI.ShiftButton(); ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit(); this.SuspendLayout(); // - // btnOpt1 - // - this.btnOpt1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.btnOpt1.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.btnOpt1.Font = new System.Drawing.Font("Lucida Console", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.btnOpt1.Location = new System.Drawing.Point(73, 170); - this.btnOpt1.Name = "btnOpt1"; - this.btnOpt1.Size = new System.Drawing.Size(117, 23); - this.btnOpt1.TabIndex = 0; - this.btnOpt1.Text = "button1"; - this.btnOpt1.UseVisualStyleBackColor = true; - this.btnOpt1.Click += new System.EventHandler(this.btnOpt1_Click); - // - // btnOpt2 - // - this.btnOpt2.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.btnOpt2.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.btnOpt2.Font = new System.Drawing.Font("Lucida Console", 9F); - this.btnOpt2.Location = new System.Drawing.Point(243, 170); - this.btnOpt2.Name = "btnOpt2"; - this.btnOpt2.Size = new System.Drawing.Size(117, 23); - this.btnOpt2.TabIndex = 1; - this.btnOpt2.Text = "button2"; - this.btnOpt2.UseVisualStyleBackColor = true; - this.btnOpt2.Click += new System.EventHandler(this.btnOpt2_Click); - // // pictureBox1 // this.pictureBox1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) @@ -83,22 +55,57 @@ // // label1 // - this.label1.AutoSize = true; - this.label1.Font = new System.Drawing.Font("Lucida Console", 9.25F); - this.label1.Location = new System.Drawing.Point(107, 48); + this.label1.BackColor = System.Drawing.Color.White; + this.label1.BorderStyle = System.Windows.Forms.BorderStyle.None; + this.label1.Font = new System.Drawing.Font("Lucida Console", 8.25F); + this.label1.Location = new System.Drawing.Point(90, 35); + this.label1.Multiline = true; this.label1.Name = "label1"; - this.label1.Size = new System.Drawing.Size(55, 13); - this.label1.TabIndex = 3; - this.label1.Text = "label1"; + this.label1.Size = new System.Drawing.Size(256, 125); + this.label1.TabIndex = 6; + // + // btnOpt2 + // + this.btnOpt2.BackColor = System.Drawing.SystemColors.Control; + this.btnOpt2.FlatAppearance.BorderColor = System.Drawing.Color.Black; + this.btnOpt2.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.btnOpt2.Font = new System.Drawing.Font("Lucida Console", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.btnOpt2.ForeColor = System.Drawing.Color.Black; + this.btnOpt2.Location = new System.Drawing.Point(229, 163); + this.btnOpt2.Margin = new System.Windows.Forms.Padding(0); + this.btnOpt2.MinimumSize = new System.Drawing.Size(75, 23); + this.btnOpt2.Name = "btnOpt2"; + this.btnOpt2.Padding = new System.Windows.Forms.Padding(3); + this.btnOpt2.Size = new System.Drawing.Size(117, 31); + this.btnOpt2.TabIndex = 5; + this.btnOpt2.Text = "shiftButton2"; + this.btnOpt2.UseVisualStyleBackColor = false; + // + // btnOpt1 + // + this.btnOpt1.BackColor = System.Drawing.SystemColors.Control; + this.btnOpt1.FlatAppearance.BorderColor = System.Drawing.Color.Black; + this.btnOpt1.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.btnOpt1.Font = new System.Drawing.Font("Lucida Console", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.btnOpt1.ForeColor = System.Drawing.Color.Black; + this.btnOpt1.Location = new System.Drawing.Point(90, 163); + this.btnOpt1.Margin = new System.Windows.Forms.Padding(0); + this.btnOpt1.MinimumSize = new System.Drawing.Size(75, 23); + this.btnOpt1.Name = "btnOpt1"; + this.btnOpt1.Padding = new System.Windows.Forms.Padding(3); + this.btnOpt1.Size = new System.Drawing.Size(117, 31); + this.btnOpt1.TabIndex = 4; + this.btnOpt1.Text = "shiftButton1"; + this.btnOpt1.UseVisualStyleBackColor = false; // // InfoboxTemplate // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.Controls.Add(this.label1); - this.Controls.Add(this.pictureBox1); this.Controls.Add(this.btnOpt2); this.Controls.Add(this.btnOpt1); + this.Controls.Add(this.pictureBox1); this.Name = "InfoboxTemplate"; this.Size = new System.Drawing.Size(438, 210); this.Load += new System.EventHandler(this.InfoboxTemplate_Load); @@ -109,11 +116,10 @@ } #endregion - - public System.Windows.Forms.Button btnOpt1; - public System.Windows.Forms.Button btnOpt2; public System.Windows.Forms.PictureBox pictureBox1; private System.Windows.Forms.Timer changeSize; - public System.Windows.Forms.Label label1; + private UI.ShiftButton btnOpt1; + private UI.ShiftButton btnOpt2; + public System.Windows.Forms.TextBox label1; } } diff --git a/ShiftOS.Engine/WindowManager/InfoboxTemplate.cs b/ShiftOS.Engine/WindowManager/InfoboxTemplate.cs index 5d55cf2..72bb530 100644 --- a/ShiftOS.Engine/WindowManager/InfoboxTemplate.cs +++ b/ShiftOS.Engine/WindowManager/InfoboxTemplate.cs @@ -23,32 +23,25 @@ namespace ShiftOS.Engine.WindowManager Cancel, Ok } - - int _buttonChoice; - int _buttonSelected; Stream _str; public InfoboxTemplate(ButtonType type) { InitializeComponent(); - switch (type) { case ButtonType.Ok: btnOpt1.Text = "OK"; btnOpt2.Hide(); - btnOpt1.Location = new Point(109, 134); - _buttonChoice = 1; + btnOpt1.Location = new Point(156, 163); break; case ButtonType.OkCancel: btnOpt1.Text = "OK"; btnOpt2.Text = "Cancel"; - _buttonChoice = 2; break; case ButtonType.YesNo: btnOpt1.Text = "Yes"; btnOpt2.Text = "No"; - _buttonChoice = 3; break; } } @@ -58,11 +51,12 @@ namespace ShiftOS.Engine.WindowManager switch (btnOpt1.Text) { case "OK": - ParentForm?.Close(); + btnOpt1.DialogResult = System.Windows.Forms.DialogResult.OK; + ParentForm?.Close(); break; case "Yes": - _buttonSelected = 2; - ParentForm?.Close(); + btnOpt1.DialogResult = System.Windows.Forms.DialogResult.Yes; + ParentForm?.Close(); break; } } @@ -72,11 +66,12 @@ namespace ShiftOS.Engine.WindowManager switch (btnOpt2.Text) { case "No": - _buttonSelected = 3; - break; + btnOpt2.DialogResult = System.Windows.Forms.DialogResult.No; + ParentForm?.Close(); + break; case "Cancel": - _buttonSelected = 4; - break; + btnOpt2.DialogResult = System.Windows.Forms.DialogResult.Cancel; + break; } } @@ -89,6 +84,16 @@ namespace ShiftOS.Engine.WindowManager } void InfoboxTemplate_Load(object sender, EventArgs e) - => Play(); - } + { + Play(); + SizeAndLoad(label1.Size.Width, label1.Size.Width); + } + private Size SizeAndLoad(int x, int y) + { + this.Size = new Size(x, y); + Left = (Screen.PrimaryScreen.Bounds.Width - Width) / 2; + Top = (Screen.PrimaryScreen.Bounds.Top - Height) / 2; + return Size; + } + } } \ No newline at end of file diff --git a/ShiftOS.Engine/WindowManager/ShiftSkinData.cs b/ShiftOS.Engine/WindowManager/ShiftSkinData.cs index 165f5bb..cfaf4be 100644 --- a/ShiftOS.Engine/WindowManager/ShiftSkinData.cs +++ b/ShiftOS.Engine/WindowManager/ShiftSkinData.cs @@ -5,19 +5,36 @@ namespace ShiftOS.Engine.WindowManager public abstract class ShiftSkinData { // ColorData - public static Color LeftTopCornerColor = Color.Empty; - public static Color TitleBarColor = Color.Empty; - public static Color RightTopCornerColor = Color.Empty; - public static Color BtnCloseColor = Color.Empty; - public static Color BtnMaxColor = Color.Empty; - public static Color BtnMinColor = Color.Empty; - public static Color BtnCloseHoverColor = Color.Empty; - public static Color BtnMaxHoverColor = Color.Empty; - public static Color BtnMinHoverColor = Color.Empty; - public static Color LeftSideColor = Color.Empty; - public static Color RightSideColor = Color.Empty; - public static Color LeftBottomCornerColor = Color.Empty; - public static Color BottomSideColor = Color.Empty; - public static Color RightBottomCornerColor = Color.Empty; - } + public static skinColors Colors = new skinColors(); + public static skinTextures Images = new skinTextures(); + } + + public class skinTextures + { + public skinTextures() + { + + } + } +} + +namespace ShiftOS.Engine.WindowManager +{ + public class skinColors + { + public Color LeftTopCornerColor; + public Color TitleBarColor; + public Color RightTopCornerColor; + public Color BtnCloseColor; + public Color BtnMaxColor; + public Color BtnMinColor; + public Color BtnCloseHoverColor; + public Color BtnMaxHoverColor; + public Color BtnMinHoverColor; + public Color LeftSideColor; + public Color RightSideColor; + public Color LeftBottomCornerColor; + public Color BottomSideColor; + public Color RightBottomCornerColor; + } } \ No newline at end of file diff --git a/ShiftOS.Engine/WindowManager/ShiftWM.cs b/ShiftOS.Engine/WindowManager/ShiftWM.cs index 4b57961..a910c0c 100644 --- a/ShiftOS.Engine/WindowManager/ShiftWM.cs +++ b/ShiftOS.Engine/WindowManager/ShiftWM.cs @@ -43,36 +43,36 @@ namespace ShiftOS.Engine.WindowManager app.Width = content.Width + app.leftSide.Width + app.rightSide.Width; app.Height = content.Height + app.bottomSide.Height + app.titleBar.Height; - if (ShiftSkinData.TitleBarColor == Color.Empty) + if (ShiftSkinData.Colors.TitleBarColor == Color.Empty) { - var borderColor = Color.FromArgb(64, 64, 64); - ShiftSkinData.BtnCloseColor = Color.Black; - ShiftSkinData.BtnCloseHoverColor = Color.FromArgb(40, 40, 40); - ShiftSkinData.BtnMaxColor = Color.Black; - ShiftSkinData.BtnMaxHoverColor = Color.FromArgb(40, 40, 40); - ShiftSkinData.BtnMinColor = Color.Black; - ShiftSkinData.BtnMinHoverColor = Color.FromArgb(40, 40, 40); - ShiftSkinData.LeftTopCornerColor = borderColor; - ShiftSkinData.TitleBarColor = borderColor; - ShiftSkinData.RightTopCornerColor = borderColor; - ShiftSkinData.LeftSideColor = borderColor; - ShiftSkinData.RightSideColor = borderColor; - ShiftSkinData.LeftBottomCornerColor = borderColor; - ShiftSkinData.BottomSideColor = borderColor; - ShiftSkinData.RightBottomCornerColor = borderColor; + Color borderColor = Color.FromArgb(64, 64, 64); + ShiftSkinData.Colors.BtnCloseColor = Color.Black; + ShiftSkinData.Colors.BtnCloseHoverColor = Color.FromArgb(40, 40, 40); + ShiftSkinData.Colors.BtnMaxColor = Color.Black; + ShiftSkinData.Colors.BtnMaxHoverColor = Color.FromArgb(40, 40, 40); + ShiftSkinData.Colors.BtnMinColor = Color.Black; + ShiftSkinData.Colors.BtnMinHoverColor = Color.FromArgb(40, 40, 40); + ShiftSkinData.Colors.LeftTopCornerColor = borderColor; + ShiftSkinData.Colors.TitleBarColor = borderColor; + ShiftSkinData.Colors.RightTopCornerColor = borderColor; + ShiftSkinData.Colors.LeftSideColor = borderColor; + ShiftSkinData.Colors.RightSideColor = borderColor; + ShiftSkinData.Colors.LeftBottomCornerColor = borderColor; + ShiftSkinData.Colors.BottomSideColor = borderColor; + ShiftSkinData.Colors.RightBottomCornerColor = borderColor; } - app.btnClose.BackColor = ShiftSkinData.BtnCloseColor; - app.btnMax.BackColor = ShiftSkinData.BtnMaxColor; - app.btnMin.BackColor = ShiftSkinData.BtnMinColor; - app.leftTopCorner.BackColor = ShiftSkinData.LeftTopCornerColor; - app.titleBar.BackColor = ShiftSkinData.TitleBarColor; - app.rightTopCorner.BackColor = ShiftSkinData.RightTopCornerColor; - app.leftSide.BackColor = ShiftSkinData.LeftSideColor; - app.rightSide.BackColor = ShiftSkinData.RightSideColor; - app.leftBottomCorner.BackColor = ShiftSkinData.LeftBottomCornerColor; - app.bottomSide.BackColor = ShiftSkinData.BottomSideColor; - app.rightBottomCorner.BackColor = ShiftSkinData.RightBottomCornerColor; + app.btnClose.BackColor = ShiftSkinData.Colors.BtnCloseColor; + app.btnMax.BackColor = ShiftSkinData.Colors.BtnMaxColor; + app.btnMin.BackColor = ShiftSkinData.Colors.BtnMinColor; + app.leftTopCorner.BackColor = ShiftSkinData.Colors.LeftTopCornerColor; + app.titleBar.BackColor = ShiftSkinData.Colors.TitleBarColor; + app.rightTopCorner.BackColor = ShiftSkinData.Colors.RightTopCornerColor; + app.leftSide.BackColor = ShiftSkinData.Colors.LeftSideColor; + app.rightSide.BackColor = ShiftSkinData.Colors.RightSideColor; + app.leftBottomCorner.BackColor = ShiftSkinData.Colors.LeftBottomCornerColor; + app.bottomSide.BackColor = ShiftSkinData.Colors.BottomSideColor; + app.rightBottomCorner.BackColor = ShiftSkinData.Colors.RightBottomCornerColor; // Icon Setup diff --git a/ShiftOS.Engine/WindowManager/ShiftWindow.cs b/ShiftOS.Engine/WindowManager/ShiftWindow.cs index e407e33..95ae4a9 100644 --- a/ShiftOS.Engine/WindowManager/ShiftWindow.cs +++ b/ShiftOS.Engine/WindowManager/ShiftWindow.cs @@ -52,23 +52,23 @@ namespace ShiftOS.Engine.WindowManager => Close(); void closebutton_MouseEnter(object sender, EventArgs e) - => btnClose.BackColor = ShiftSkinData.BtnCloseHoverColor; + => btnClose.BackColor = ShiftSkinData.Colors.BtnCloseHoverColor; void closebutton_MouseLeave(object sender, EventArgs e) - => btnClose.BackColor = ShiftSkinData.BtnCloseColor; + => btnClose.BackColor = ShiftSkinData.Colors.BtnCloseColor; void maximizebutton_MouseEnter(object sender, EventArgs e) - => btnMax.BackColor = ShiftSkinData.BtnMaxHoverColor; + => btnMax.BackColor = ShiftSkinData.Colors.BtnMaxHoverColor; void maximizebutton_MouseLeave(object sender, EventArgs e) - => btnMax.BackColor = ShiftSkinData.BtnMaxColor; + => btnMax.BackColor = ShiftSkinData.Colors.BtnMaxColor; void minimizebutton_MouseEnter(object sender, EventArgs e) - => btnMin.BackColor = ShiftSkinData.BtnMinHoverColor; + => btnMin.BackColor = ShiftSkinData.Colors.BtnMinHoverColor; void minimizebutton_MouseLeave(object sender, EventArgs e) - => btnMin.BackColor = ShiftSkinData.BtnMinColor; + => btnMin.BackColor = ShiftSkinData.Colors.BtnMinColor; /* private void closebutton_MouseDown(object sender, MouseEventArgs e) -- cgit v1.2.3