From fdc30ccd12415d3c4e56075d2a432c0653787fab Mon Sep 17 00:00:00 2001 From: Trivial-Man Date: Thu, 29 Jun 2017 19:52:40 -0600 Subject: [PATCH] LuaPictureBox: Add GetMouse A simple function that gets the point the mouse cursor is at relative to the LuaPictureBox's upper left corner --- BizHawk.Client.EmuHawk/tools/Lua/LuaPictureBox.cs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/BizHawk.Client.EmuHawk/tools/Lua/LuaPictureBox.cs b/BizHawk.Client.EmuHawk/tools/Lua/LuaPictureBox.cs index 9221cd3bfe..44cc72b43d 100644 --- a/BizHawk.Client.EmuHawk/tools/Lua/LuaPictureBox.cs +++ b/BizHawk.Client.EmuHawk/tools/Lua/LuaPictureBox.cs @@ -375,5 +375,11 @@ namespace BizHawk.Client.EmuHawk boxBackground = Graphics.FromImage(Image); boxBackground.DrawString(message, font, new SolidBrush(forecolor ?? Color.Black), x, y); } + + public Point GetMouse() + { + var p = PointToClient(Control.MousePosition); + return p; + } } -} \ No newline at end of file +}