From 8e0926449f62fd8a4daffd00c729cc2a78c03c40 Mon Sep 17 00:00:00 2001 From: Trivial-Man Date: Thu, 13 Jul 2017 22:48:37 -0600 Subject: [PATCH] Fix LuaPictureBox Got left out when fixing other files. Sorry. --- .../tools/Lua/LuaPictureBox.cs | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/BizHawk.Client.EmuHawk/tools/Lua/LuaPictureBox.cs b/BizHawk.Client.EmuHawk/tools/Lua/LuaPictureBox.cs index 44cc72b43d..ff3db73575 100644 --- a/BizHawk.Client.EmuHawk/tools/Lua/LuaPictureBox.cs +++ b/BizHawk.Client.EmuHawk/tools/Lua/LuaPictureBox.cs @@ -2,9 +2,8 @@ using System.Drawing; using System.Windows.Forms; -using LuaInterface; +using NLua; using System.Collections.Generic; -using System.IO; namespace BizHawk.Client.EmuHawk { @@ -381,5 +380,17 @@ namespace BizHawk.Client.EmuHawk var p = PointToClient(Control.MousePosition); return p; } + + private void DoLuaClick(object sender, EventArgs e) + { + LuaWinform parent = Parent as LuaWinform; + parent?.DoLuaEvent(Handle); + } + + protected override void OnClick(EventArgs e) + { + DoLuaClick(this, e); + base.OnClick(e); + } } -} +} \ No newline at end of file