diff options
| author | Michael <[email protected]> | 2017-08-05 22:57:40 -0400 |
|---|---|---|
| committer | Michael <[email protected]> | 2017-08-05 22:57:40 -0400 |
| commit | 97a5a97370bc8f4d721791457d551c6bd2b0b67c (patch) | |
| tree | cf4bcc05af8f6153fd35fcd2e6a2f6e21945b27a /ShiftOS.Frontend/GraphicsSubsystem | |
| parent | f4d11fcdad5fdfc7c25cf3c6f96516b2330dca1c (diff) | |
| download | shiftos_thereturn-97a5a97370bc8f4d721791457d551c6bd2b0b67c.tar.gz shiftos_thereturn-97a5a97370bc8f4d721791457d551c6bd2b0b67c.tar.bz2 shiftos_thereturn-97a5a97370bc8f4d721791457d551c6bd2b0b67c.zip | |
skin loader and ui tint
Diffstat (limited to 'ShiftOS.Frontend/GraphicsSubsystem')
| -rw-r--r-- | ShiftOS.Frontend/GraphicsSubsystem/GraphicsContext.cs | 2 | ||||
| -rw-r--r-- | ShiftOS.Frontend/GraphicsSubsystem/UIManager.cs | 12 |
2 files changed, 12 insertions, 2 deletions
diff --git a/ShiftOS.Frontend/GraphicsSubsystem/GraphicsContext.cs b/ShiftOS.Frontend/GraphicsSubsystem/GraphicsContext.cs index 217eb33..2a33331 100644 --- a/ShiftOS.Frontend/GraphicsSubsystem/GraphicsContext.cs +++ b/ShiftOS.Frontend/GraphicsSubsystem/GraphicsContext.cs @@ -168,6 +168,8 @@ namespace ShiftOS.Frontend.GraphicsSubsystem gfx.InterpolationMode = System.Drawing.Drawing2D.InterpolationMode.HighQualityBicubic; gfx.PixelOffsetMode = System.Drawing.Drawing2D.PixelOffsetMode.HighQuality; gfx.TextRenderingHint = System.Drawing.Text.TextRenderingHint.AntiAliasGridFit; + gfx.CompositingMode = System.Drawing.Drawing2D.CompositingMode.SourceOver; + gfx.CompositingQuality = System.Drawing.Drawing2D.CompositingQuality.HighQuality; gfx.DrawString(text, font, System.Drawing.Brushes.Black, new System.Drawing.RectangleF(0, 0, bmp.Width, bmp.Height), sFormat); } diff --git a/ShiftOS.Frontend/GraphicsSubsystem/UIManager.cs b/ShiftOS.Frontend/GraphicsSubsystem/UIManager.cs index 18e924a..dc47e93 100644 --- a/ShiftOS.Frontend/GraphicsSubsystem/UIManager.cs +++ b/ShiftOS.Frontend/GraphicsSubsystem/UIManager.cs @@ -92,7 +92,7 @@ namespace ShiftOS.Frontend.GraphicsSubsystem } } - batch.Draw(_target, new Rectangle(ctrl.X, ctrl.Y, ctrl.Width, ctrl.Height), Color.White); + batch.Draw(_target, new Rectangle(ctrl.X, ctrl.Y, ctrl.Width, ctrl.Height), _game.UITint); } } } @@ -240,6 +240,11 @@ namespace ShiftOS.Frontend.GraphicsSubsystem } + public static void SetUITint(Color color) + { + _game.UITint = color; + } + public static bool ExperimentalEffects = true; @@ -250,10 +255,13 @@ namespace ShiftOS.Frontend.GraphicsSubsystem { if (SkinEngine.LoadedSkin == null) SkinEngine.Init(); + + batch.Draw(SkinTextures["DesktopColor"], new Rectangle(0, 0, Viewport.Width, Viewport.Height), _game.UITint); + graphics.Clear(SkinEngine.LoadedSkin.DesktopColor.ToMonoColor()); if (SkinTextures.ContainsKey("desktopbackground")) { - batch.Draw(SkinTextures["desktopbackground"], new Rectangle(0, 0, Viewport.Width, Viewport.Height), Color.White); + batch.Draw(SkinTextures["desktopbackground"], new Rectangle(0, 0, Viewport.Width, Viewport.Height), _game.UITint); } } |
