From 41504bdc15d6c7512b5fe1a111529d8a39587f61 Mon Sep 17 00:00:00 2001 From: Michael Date: Tue, 20 Jun 2017 18:02:13 -0400 Subject: inactive border colors --- ShiftOS_TheReturn/Skinning.cs | 68 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 68 insertions(+) (limited to 'ShiftOS_TheReturn') diff --git a/ShiftOS_TheReturn/Skinning.cs b/ShiftOS_TheReturn/Skinning.cs index e00a2ef..e0a1a2b 100644 --- a/ShiftOS_TheReturn/Skinning.cs +++ b/ShiftOS_TheReturn/Skinning.cs @@ -574,6 +574,15 @@ namespace ShiftOS.Engine [ShifterDescription("The color of the titlebar's background.")] public Color TitleBackgroundColor = TitleBG; + [ShifterMeta("Windows")] + [ShifterCategory("Titlebar")] + [ShifterName("Title Inactive Background Color")] + [RequiresUpgrade("shift_titlebar;shift_states")] + [ShifterDescription("The color of the titlebar's background when the window isn't active.")] + public Color TitleInactiveBackgroundColor = Skin.DefaultBackground; + + + [ShifterMeta("Windows")] [ShifterCategory("Window border")] [ShifterName("Left Border Background")] @@ -581,6 +590,14 @@ namespace ShiftOS.Engine [ShifterDescription("The background color for the left border.")] public Color BorderLeftBackground = TitleBG; + [ShifterMeta("Windows")] + [ShifterCategory("Window border")] + [ShifterName("Left Border Inactive Background")] + [RequiresUpgrade("shift_window_borders;shift_states")] + [ShifterDescription("The background color for the left border when the window is inactive.")] + public Color BorderInactiveLeftBackground = DefaultBackground; + + [ShifterMeta("Windows")] [ShifterCategory("Window border")] [ShifterName("Right Border Background")] @@ -588,6 +605,14 @@ namespace ShiftOS.Engine [ShifterDescription("The background color for the right border.")] public Color BorderRightBackground = TitleBG; + [ShifterMeta("Windows")] + [ShifterCategory("Window border")] + [ShifterName("Right Border Inactive Background")] + [RequiresUpgrade("shift_window_borders;shift_states")] + [ShifterDescription("The background color for the right border when the window is inactive.")] + public Color BorderInactiveRightBackground = DefaultBackground; + + [ShifterMeta("Desktop")] [ShifterCategory("Panel buttons")] [RequiresUpgrade("shift_panel_buttons")] @@ -602,6 +627,14 @@ namespace ShiftOS.Engine [ShifterDescription("The background color for the bottom border.")] public Color BorderBottomBackground = TitleBG; + [ShifterMeta("Windows")] + [ShifterCategory("Window border")] + [ShifterName("Bottom Border Inactive Background")] + [RequiresUpgrade("shift_window_borders;shift_states")] + [ShifterDescription("The background color for the bottom border when the window is inactive.")] + public Color BorderInactiveBottomBackground = DefaultBackground; + + [ShifterMeta("Desktop")] [ShifterCategory("Panel buttons")] [ShifterName("Panel button holder from left")] @@ -609,6 +642,14 @@ namespace ShiftOS.Engine [RequiresUpgrade("shift_panel_buttons")] public int PanelButtonHolderFromLeft = 100; + [ShifterMeta("Windows")] + [ShifterCategory("Window border")] + [ShifterName("Bottom Left Border Inactive Background")] + [RequiresUpgrade("shift_window_borders;shift_states")] + [ShifterDescription("The background color for the bottom left border when the window is inactive.")] + public Color BorderInactiveBottomLeftBackground = DefaultBackground; + + [ShifterMeta("Windows")] [ShifterCategory("Window border")] [ShifterName("Bottom Left Border Background")] @@ -616,6 +657,7 @@ namespace ShiftOS.Engine [ShifterDescription("The background color for the bottom left border.")] public Color BorderBottomLeftBackground = TitleBG; + [ShifterMeta("Windows")] [ShifterCategory("Window border")] [ShifterName("Bottom Right Border Background")] @@ -623,6 +665,14 @@ namespace ShiftOS.Engine [ShifterDescription("The background color for the bottom right border.")] public Color BorderBottomRightBackground = TitleBG; + [ShifterMeta("Windows")] + [ShifterCategory("Window border")] + [ShifterName("Bottom Right Border Inactive Background")] + [RequiresUpgrade("shift_window_borders;shift_states")] + [ShifterDescription("The background color for the bottom right border when the window is inactive.")] + public Color BorderInactiveBottomRightBackground = DefaultBackground; + + [ShifterMeta("Windows")] [ShifterCategory("Title Buttons")] [ShifterName("Close Button Color")] @@ -1148,6 +1198,15 @@ namespace ShiftOS.Engine [ShifterDescription("What color should be used for the left title corner?")] public Color TitleLeftCornerBackground = TitleBG; + [ShifterMeta("Windows")] + [ShifterCategory("Titlebar")] + [RequiresUpgrade("shift_titlebar;shift_states")] + [ShifterFlag("ShowTitleCorners", true)] + [ShifterName("Title left inactive background color")] + [ShifterDescription("What color should be used for the left title corner when the window is inactive?")] + public Color TitleInactiveLeftCornerBackground = DefaultBackground; + + [ShifterMeta("Windows")] [ShifterCategory("Titlebar")] [RequiresUpgrade("shift_titlebar")] @@ -1156,6 +1215,15 @@ namespace ShiftOS.Engine [ShifterDescription("What color should be used for the right title corner?")] public Color TitleRightCornerBackground = TitleBG; + [ShifterMeta("Windows")] + [ShifterCategory("Titlebar")] + [RequiresUpgrade("shift_titlebar;shift_states")] + [ShifterFlag("ShowTitleCorners", true)] + [ShifterName("Title right inactive background color")] + [ShifterDescription("What color should be used for the right title corner when the window is inactive?")] + public Color TitleInactiveRightCornerBackground = DefaultBackground; + + [ShifterMeta("Windows")] [ShifterCategory("Titlebar")] [RequiresUpgrade("shift_titlebar")] -- cgit v1.2.3 From 153057c7be952a94ab63a790662a10eee7b68e3d Mon Sep 17 00:00:00 2001 From: Michael Date: Tue, 20 Jun 2017 18:53:28 -0400 Subject: Opt-in multistate borders --- ShiftOS.WinForms/Applications/Artpad.Designer.cs | 1 - ShiftOS.WinForms/WindowBorder.cs | 132 +++++++++++++---------- ShiftOS_TheReturn/Skinning.cs | 7 ++ 3 files changed, 80 insertions(+), 60 deletions(-) (limited to 'ShiftOS_TheReturn') diff --git a/ShiftOS.WinForms/Applications/Artpad.Designer.cs b/ShiftOS.WinForms/Applications/Artpad.Designer.cs index c5a313d..f30839a 100644 --- a/ShiftOS.WinForms/Applications/Artpad.Designer.cs +++ b/ShiftOS.WinForms/Applications/Artpad.Designer.cs @@ -2058,7 +2058,6 @@ namespace ShiftOS.WinForms.Applications this.Label4.TabIndex = 11; this.Label4.Text = "Colors"; this.Label4.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; - this.Label4.Click += new System.EventHandler(this.Label4_Click); // // line6 // diff --git a/ShiftOS.WinForms/WindowBorder.cs b/ShiftOS.WinForms/WindowBorder.cs index 7aefd42..0ee1289 100644 --- a/ShiftOS.WinForms/WindowBorder.cs +++ b/ShiftOS.WinForms/WindowBorder.cs @@ -262,6 +262,74 @@ namespace ShiftOS.WinForms } } + public void SetDefaultBorders() + { + pnltitle.BackColor = LoadedSkin.TitleBackgroundColor; + pnltitle.BackgroundImage = GetImage("titlebar"); + pnltitleleft.BackColor = LoadedSkin.TitleLeftCornerBackground; + pnltitleright.BackColor = LoadedSkin.TitleRightCornerBackground; + pnltitleleft.BackgroundImage = GetImage("titleleft"); + pnltitleleft.BackgroundImageLayout = GetImageLayout("titleleft"); + pnltitleright.BackgroundImage = GetImage("titleright"); + pnltitleright.BackgroundImageLayout = GetImageLayout("titleright"); + pnltitle.BackgroundImageLayout = GetImageLayout("titlebar"); //RETARD ALERT. WHY WASN'T THIS THERE WHEN IMAGELAYOUTS WERE FIRST IMPLEMENTED? + + pnlleft.BackColor = LoadedSkin.BorderLeftBackground; + pnlleft.BackgroundImage = GetImage("leftborder"); + pnlleft.BackgroundImageLayout = GetImageLayout("leftborder"); + + pnlright.BackColor = LoadedSkin.BorderRightBackground; + pnlright.BackgroundImage = GetImage("rightborder"); + pnlright.BackgroundImageLayout = GetImageLayout("rightborder"); + + pnlbottom.BackColor = LoadedSkin.BorderBottomBackground; + pnlbottom.BackgroundImage = GetImage("bottomborder"); + pnlbottom.BackgroundImageLayout = GetImageLayout("bottomborder"); + + pnlbottomr.BackColor = LoadedSkin.BorderBottomRightBackground; + pnlbottomr.BackgroundImage = GetImage("bottomrborder"); + pnlbottomr.BackgroundImageLayout = GetImageLayout("bottomrborder"); + + pnlbottoml.BackColor = LoadedSkin.BorderBottomLeftBackground; + pnlbottoml.BackgroundImage = GetImage("bottomlborder"); + pnlbottoml.BackgroundImageLayout = GetImageLayout("bottomlborder"); + + } + + public void SetInactiveBorders() + { + pnltitle.BackColor = LoadedSkin.TitleInactiveBackgroundColor; + pnltitle.BackgroundImage = GetImage("titlebarinactive"); + pnltitleleft.BackColor = LoadedSkin.TitleInactiveLeftCornerBackground; + pnltitleright.BackColor = LoadedSkin.TitleInactiveRightCornerBackground; + pnltitleleft.BackgroundImage = GetImage("titleleftinactive"); + pnltitleleft.BackgroundImageLayout = GetImageLayout("titleleftinactive"); + pnltitleright.BackgroundImage = GetImage("titlerightinactive"); + pnltitleright.BackgroundImageLayout = GetImageLayout("titlerightinactive"); + pnltitle.BackgroundImageLayout = GetImageLayout("titlebarinactive"); //RETARD ALERT. WHY WASN'T THIS THERE WHEN IMAGELAYOUTS WERE FIRST IMPLEMENTED? + + pnlleft.BackColor = LoadedSkin.BorderInactiveLeftBackground; + pnlleft.BackgroundImage = GetImage("leftborderinactive"); + pnlleft.BackgroundImageLayout = GetImageLayout("leftborderinactive"); + + pnlright.BackColor = LoadedSkin.BorderInactiveRightBackground; + pnlright.BackgroundImage = GetImage("rightborderinactive"); + pnlright.BackgroundImageLayout = GetImageLayout("rightborderinactive"); + + pnlbottom.BackColor = LoadedSkin.BorderInactiveBottomBackground; + pnlbottom.BackgroundImage = GetImage("bottomborderinactive"); + pnlbottom.BackgroundImageLayout = GetImageLayout("bottomborderinactive"); + + pnlbottomr.BackColor = LoadedSkin.BorderInactiveBottomRightBackground; + pnlbottomr.BackgroundImage = GetImage("bottomrborderinactive"); + pnlbottomr.BackgroundImageLayout = GetImageLayout("bottomrborderinactive"); + + pnlbottoml.BackColor = LoadedSkin.BorderInactiveBottomLeftBackground; + pnlbottoml.BackgroundImage = GetImage("bottomlborderinactive"); + pnlbottoml.BackgroundImageLayout = GetImageLayout("bottomlborderinactive"); + + } + /// /// Setups the skin. /// @@ -271,68 +339,14 @@ namespace ShiftOS.WinForms //Border colors and images... if (IsFocused) { - pnltitle.BackColor = LoadedSkin.TitleBackgroundColor; - pnltitle.BackgroundImage = GetImage("titlebar"); - pnltitleleft.BackColor = LoadedSkin.TitleLeftCornerBackground; - pnltitleright.BackColor = LoadedSkin.TitleRightCornerBackground; - pnltitleleft.BackgroundImage = GetImage("titleleft"); - pnltitleleft.BackgroundImageLayout = GetImageLayout("titleleft"); - pnltitleright.BackgroundImage = GetImage("titleright"); - pnltitleright.BackgroundImageLayout = GetImageLayout("titleright"); - pnltitle.BackgroundImageLayout = GetImageLayout("titlebar"); //RETARD ALERT. WHY WASN'T THIS THERE WHEN IMAGELAYOUTS WERE FIRST IMPLEMENTED? - - pnlleft.BackColor = LoadedSkin.BorderLeftBackground; - pnlleft.BackgroundImage = GetImage("leftborder"); - pnlleft.BackgroundImageLayout = GetImageLayout("leftborder"); - - pnlright.BackColor = LoadedSkin.BorderRightBackground; - pnlright.BackgroundImage = GetImage("rightborder"); - pnlright.BackgroundImageLayout = GetImageLayout("rightborder"); - - pnlbottom.BackColor = LoadedSkin.BorderBottomBackground; - pnlbottom.BackgroundImage = GetImage("bottomborder"); - pnlbottom.BackgroundImageLayout = GetImageLayout("bottomborder"); - - pnlbottomr.BackColor = LoadedSkin.BorderBottomRightBackground; - pnlbottomr.BackgroundImage = GetImage("bottomrborder"); - pnlbottomr.BackgroundImageLayout = GetImageLayout("bottomrborder"); - - pnlbottoml.BackColor = LoadedSkin.BorderBottomLeftBackground; - pnlbottoml.BackgroundImage = GetImage("bottomlborder"); - pnlbottoml.BackgroundImageLayout = GetImageLayout("bottomlborder"); + SetDefaultBorders(); } else { - pnltitle.BackColor = LoadedSkin.TitleInactiveBackgroundColor; - pnltitle.BackgroundImage = GetImage("titlebarinactive"); - pnltitleleft.BackColor = LoadedSkin.TitleInactiveLeftCornerBackground; - pnltitleright.BackColor = LoadedSkin.TitleInactiveRightCornerBackground; - pnltitleleft.BackgroundImage = GetImage("titleleftinactive"); - pnltitleleft.BackgroundImageLayout = GetImageLayout("titleleftinactive"); - pnltitleright.BackgroundImage = GetImage("titlerightinactive"); - pnltitleright.BackgroundImageLayout = GetImageLayout("titlerightinactive"); - pnltitle.BackgroundImageLayout = GetImageLayout("titlebarinactive"); //RETARD ALERT. WHY WASN'T THIS THERE WHEN IMAGELAYOUTS WERE FIRST IMPLEMENTED? - - pnlleft.BackColor = LoadedSkin.BorderInactiveLeftBackground; - pnlleft.BackgroundImage = GetImage("leftborderinactive"); - pnlleft.BackgroundImageLayout = GetImageLayout("leftborderinactive"); - - pnlright.BackColor = LoadedSkin.BorderInactiveRightBackground; - pnlright.BackgroundImage = GetImage("rightborderinactive"); - pnlright.BackgroundImageLayout = GetImageLayout("rightborderinactive"); - - pnlbottom.BackColor = LoadedSkin.BorderInactiveBottomBackground; - pnlbottom.BackgroundImage = GetImage("bottomborderinactive"); - pnlbottom.BackgroundImageLayout = GetImageLayout("bottomborderinactive"); - - pnlbottomr.BackColor = LoadedSkin.BorderInactiveBottomRightBackground; - pnlbottomr.BackgroundImage = GetImage("bottomrborderinactive"); - pnlbottomr.BackgroundImageLayout = GetImageLayout("bottomrborderinactive"); - - pnlbottoml.BackColor = LoadedSkin.BorderInactiveBottomLeftBackground; - pnlbottoml.BackgroundImage = GetImage("bottomlborderinactive"); - pnlbottoml.BackgroundImageLayout = GetImageLayout("bottomlborderinactive"); - + if (LoadedSkin.RenderInactiveBorders) + SetInactiveBorders(); + else + SetDefaultBorders(); } diff --git a/ShiftOS_TheReturn/Skinning.cs b/ShiftOS_TheReturn/Skinning.cs index e0a1a2b..656da30 100644 --- a/ShiftOS_TheReturn/Skinning.cs +++ b/ShiftOS_TheReturn/Skinning.cs @@ -634,6 +634,13 @@ namespace ShiftOS.Engine [ShifterDescription("The background color for the bottom border when the window is inactive.")] public Color BorderInactiveBottomBackground = DefaultBackground; + [ShifterMeta("Windows")] + [ShifterCategory("Window border")] + [ShifterName("Use Inactive Border Assets?")] + [RequiresUpgrade("shift_window_borders;shift_states")] + [ShifterDescription("Do you want to use separate colors and images for inactive Window Borders?")] + public bool RenderInactiveBorders = false; + [ShifterMeta("Desktop")] [ShifterCategory("Panel buttons")] -- cgit v1.2.3 From bae58df258e259b5d35187d26630662287875c69 Mon Sep 17 00:00:00 2001 From: Michael Date: Tue, 20 Jun 2017 19:01:40 -0400 Subject: inactive border images --- ShiftOS_TheReturn/Skinning.cs | 74 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 74 insertions(+) (limited to 'ShiftOS_TheReturn') diff --git a/ShiftOS_TheReturn/Skinning.cs b/ShiftOS_TheReturn/Skinning.cs index 656da30..e7ebbc7 100644 --- a/ShiftOS_TheReturn/Skinning.cs +++ b/ShiftOS_TheReturn/Skinning.cs @@ -1190,6 +1190,14 @@ namespace ShiftOS.Engine [RequiresUpgrade("skinning;shift_titlebar")] public byte[] TitleBarBackground = null; + [ShifterMeta("Windows")] + [ShifterCategory("Titlebar")] + [ShifterName("Titlebar inactive background image")] + [Image("titlebarinactive")] + [RequiresUpgrade("skinning;shift_titlebar;shift_states")] + public byte[] TitleBarInactiveBackground = null; + + [ShifterMeta("Windows")] [ShifterCategory("Titlebar")] [RequiresUpgrade("shift_titlebar")] @@ -1256,6 +1264,16 @@ namespace ShiftOS.Engine [Image("titleleft")] public byte[] TitleLeftBG = null; + [ShifterMeta("Windows")] + [ShifterCategory("Titlebar")] + [RequiresUpgrade("skinning;shift_titlebar;shift_states")] + [ShifterFlag("ShowTitleCorners", true)] + [ShifterName("Title left corner inactive background image")] + [ShifterDescription("Select an image to appear as the background texture for the left titlebar corner when the window is inactive.")] + [Image("titleleftinactive")] + public byte[] TitleLeftInactiveBG = null; + + [ShifterMeta("Windows")] [ShifterCategory("Titlebar")] [RequiresUpgrade("skinning;shift_titlebar")] @@ -1265,6 +1283,15 @@ namespace ShiftOS.Engine [Image("titleright")] public byte[] TitleRightBG = null; + [ShifterMeta("Windows")] + [ShifterCategory("Titlebar")] + [RequiresUpgrade("skinning;shift_titlebar;shift_states")] + [ShifterFlag("ShowTitleCorners", true)] + [ShifterName("Title right corner inactive background image")] + [ShifterDescription("Select an image to appear as the background texture for the right titlebar corner when the window is inactive.")] + [Image("titlerightinactive")] + public byte[] TitleRightInactiveBG = null; + [ShifterMeta("System")] [ShifterCategory("General")] @@ -1280,6 +1307,15 @@ namespace ShiftOS.Engine [ShifterDescription("Select an image to appear on the bottom border.")] public byte[] BottomBorderBG = null; + [ShifterMeta("Windows")] + [ShifterCategory("Window border")] + [RequiresUpgrade("skinning;shift_window_borders;shift_states")] + [Image("bottomborderinactive")] + [ShifterName("Bottom Border Inactive Image")] + [ShifterDescription("Select an image to appear on the bottom border when the window is inactive. ")] + public byte[] BottomBorderInactiveBG = null; + + [ShifterMeta("Windows")] [ShifterCategory("Window border")] [RequiresUpgrade("skinning;shift_window_borders")] @@ -1296,6 +1332,25 @@ namespace ShiftOS.Engine [ShifterDescription("Select an image to appear on the bottom left border.")] public byte[] BottomLBorderBG = null; + + [ShifterMeta("Windows")] + [ShifterCategory("Window border")] + [RequiresUpgrade("skinning;shift_window_borders;shift_states")] + [Image("bottomrborderinactive")] + [ShifterName("Bottom Right Border Inactive Image")] + [ShifterDescription("Select an image to appear on the bottom right border when the window is inactive.")] + public byte[] BottomRBorderInactiveBG = null; + + [ShifterMeta("Windows")] + [ShifterCategory("Window border")] + [RequiresUpgrade("skinning;shift_window_borders;shift_states")] + [Image("bottomlborderinactive")] + [ShifterName("Bottom Left Border Inactive Image")] + [ShifterDescription("Select an image to appear on the bottom left border when the window is inactive.")] + public byte[] BottomLBorderInactiveBG = null; + + + [ShifterMeta("Windows")] [ShifterCategory("Window border")] [RequiresUpgrade("skinning;shift_window_borders")] @@ -1312,6 +1367,25 @@ namespace ShiftOS.Engine [ShifterDescription("Select an image to appear on the right border.")] public byte[] RightBorderBG = null; + + [ShifterMeta("Windows")] + [ShifterCategory("Window border")] + [RequiresUpgrade("skinning;shift_window_borders;shift_states")] + [Image("leftborderinactive")] + [ShifterName("Left Border Inactive Image")] + [ShifterDescription("Select an image to appear on the left border when the window is inactive.")] + public byte[] LeftBorderInactiveBG = null; + + [ShifterMeta("Windows")] + [ShifterCategory("Window border")] + [RequiresUpgrade("skinning;shift_window_borders;shift_states")] + [Image("rightborderinactive")] + [ShifterName("Right Border Inactive Image")] + [ShifterDescription("Select an image to appear on the right border when the window is inactive.")] + public byte[] RightBorderInactiveBG = null; + + + [ShifterMeta("Windows")] [ShifterCategory("Window border")] [RequiresUpgrade("shift_window_borders")] -- cgit v1.2.3 From a8547db07c321ae7c42e260ce99c8fc5e8cfb66f Mon Sep 17 00:00:00 2001 From: Michael Date: Wed, 21 Jun 2017 08:26:30 -0400 Subject: Methinks I fixed audio... but I'm not sure.. --- ShiftOS_TheReturn/AudioManager.cs | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'ShiftOS_TheReturn') diff --git a/ShiftOS_TheReturn/AudioManager.cs b/ShiftOS_TheReturn/AudioManager.cs index 0950b55..85e1371 100644 --- a/ShiftOS_TheReturn/AudioManager.cs +++ b/ShiftOS_TheReturn/AudioManager.cs @@ -125,10 +125,14 @@ namespace ShiftOS.Engine } if (play) { - while(_out.PlaybackState == PlaybackState.Playing) + try { - Thread.Sleep(10); + while (_out.PlaybackState == PlaybackState.Playing) + { + Thread.Sleep(10); + } } + catch { } ShiftOS.Engine.AudioManager.Stop(); _out = new WaveOut(); var mp3 = new WaveFileReader(str); -- cgit v1.2.3