From 3d43450bb02be4942dd16d4066c5ffa577cbb277 Mon Sep 17 00:00:00 2001 From: adelikat Date: Thu, 7 Aug 2014 23:52:19 +0000 Subject: [PATCH] Input Roll - stuff --- .../CustomControls/GDITextRenderer.cs | 8 ++++---- BizHawk.Client.EmuHawk/tools/TAStudio/InputRoll.cs | 11 ++++++----- 2 files changed, 10 insertions(+), 9 deletions(-) diff --git a/BizHawk.Client.EmuHawk/CustomControls/GDITextRenderer.cs b/BizHawk.Client.EmuHawk/CustomControls/GDITextRenderer.cs index 3c74104281..fc9fef20b3 100644 --- a/BizHawk.Client.EmuHawk/CustomControls/GDITextRenderer.cs +++ b/BizHawk.Client.EmuHawk/CustomControls/GDITextRenderer.cs @@ -215,7 +215,7 @@ namespace BizHawk.Client.EmuHawk.CustomControls SetBkColor(_hdc, rgb); } - public void DrawRectangle(int nLeftRect,int nTopRect,int nRightRect,int nBottomRect) + public void DrawRectangle(int nLeftRect, int nTopRect, int nRightRect, int nBottomRect) { Rectangle(_hdc, nLeftRect, nTopRect, nRightRect, nBottomRect); } @@ -228,9 +228,9 @@ namespace BizHawk.Client.EmuHawk.CustomControls private IntPtr _brush = IntPtr.Zero; - public void FillRectangle(int nLeftRect,int nTopRect,int nRightRect,int nBottomRect) + public void FillRectangle(int x,int y, int w, int h) { - var r = new GDIRect(new Rectangle(nLeftRect, nTopRect, nRightRect, nBottomRect)); + var r = new GDIRect(new Rectangle(x, y, x + w, y + h)); FillRect(_hdc, ref r, _brush); } @@ -285,7 +285,7 @@ namespace BizHawk.Client.EmuHawk.CustomControls [DllImport("gdi32.dll")] private static extern int Rectangle(IntPtr hdc, int nLeftRect, int nTopRect, int nRightRect, int nBottomRect); - [DllImport("gdi32.dll")] + [DllImport("user32.dll")] private static extern int FillRect(IntPtr hDC, [In] ref GDIRect lprc, IntPtr hbr); [DllImport("gdi32.dll")] diff --git a/BizHawk.Client.EmuHawk/tools/TAStudio/InputRoll.cs b/BizHawk.Client.EmuHawk/tools/TAStudio/InputRoll.cs index acb21297b3..cf90cf1aba 100644 --- a/BizHawk.Client.EmuHawk/tools/TAStudio/InputRoll.cs +++ b/BizHawk.Client.EmuHawk/tools/TAStudio/InputRoll.cs @@ -134,11 +134,12 @@ namespace BizHawk.Client.EmuHawk { var start = StartBg; - //ntr.SetBrush(Color.White); - ntr.SetBrush(Color.Aqua); - ntr.DrawRectangle(start.X, start.Y, Width, Height); - - ntr.FillRectangle(start.X, start.Y, Width-50, Height-50); + + //ntr.SetBrush(Color.White); + ntr.DrawRectangle(StartBg.X, StartBg.Y, Width, Height); + + //ntr.SetBrush(Color.Aqua); + //ntr.FillRectangle(start.X, start.Y, 50, 50); if (HorizontalOrientation) {