Move OSDManager to Client.Common and move types to own files

This commit is contained in:
YoshiRulz 2020-12-29 15:40:13 +10:00
parent 23a8387dc1
commit 0704db5940
No known key found for this signature in database
GPG Key ID: C4DE31C245353FB7
4 changed files with 42 additions and 29 deletions

View File

@ -0,0 +1,19 @@
using System.Drawing;
using BizHawk.Bizware.BizwareGL;
namespace BizHawk.Client.Common
{
/// <summary>
/// This is an old abstracted rendering class that the OSD system is using to get its work done.
/// We should probably just use a GuiRenderer (it was designed to do that) although wrapping it with
/// more information for OSDRendering could be helpful I suppose
/// </summary>
public interface IBlitter
{
StringRenderer GetFontType(string fontType);
void DrawString(string s, StringRenderer font, Color color, float x, float y);
SizeF MeasureString(string s, StringRenderer font);
Rectangle ClipBounds { get; set; }
}
}

View File

@ -6,37 +6,9 @@ using System.Collections.Generic;
using BizHawk.Bizware.BizwareGL;
using BizHawk.Emulation.Common;
using BizHawk.Client.Common;
namespace BizHawk.Client.EmuHawk
namespace BizHawk.Client.Common
{
/// <summary>
/// This is an old abstracted rendering class that the OSD system is using to get its work done.
/// We should probably just use a GuiRenderer (it was designed to do that) although wrapping it with
/// more information for OSDRendering could be helpful I suppose
/// </summary>
public interface IBlitter
{
StringRenderer GetFontType(string fontType);
void DrawString(string s, StringRenderer font, Color color, float x, float y);
SizeF MeasureString(string s, StringRenderer font);
Rectangle ClipBounds { get; set; }
}
public class UIMessage
{
public string Message { get; set; }
public DateTime ExpireAt { get; set; }
}
public class UIDisplay
{
public string Message { get; set; }
public MessagePosition Position { get; set; }
public Color ForeColor { get; set; }
public Color BackGround { get; set; }
}
public class OSDManager
{
private Config _config;

View File

@ -0,0 +1,12 @@
using System.Drawing;
namespace BizHawk.Client.Common
{
public class UIDisplay
{
public string Message { get; set; }
public MessagePosition Position { get; set; }
public Color ForeColor { get; set; }
public Color BackGround { get; set; }
}
}

View File

@ -0,0 +1,10 @@
using System;
namespace BizHawk.Client.Common
{
public class UIMessage
{
public string Message { get; set; }
public DateTime ExpireAt { get; set; }
}
}