From d0f56ac98de4ab68f311d2fb839979f34814e047 Mon Sep 17 00:00:00 2001 From: zeromus Date: Sun, 9 Aug 2015 10:50:24 -0500 Subject: [PATCH] lua - add client.SetGameExtraPadding(left,top,right,bottom) --- .../tools/Lua/Libraries/EmuLuaLibrary.Client.cs | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/BizHawk.Client.EmuHawk/tools/Lua/Libraries/EmuLuaLibrary.Client.cs b/BizHawk.Client.EmuHawk/tools/Lua/Libraries/EmuLuaLibrary.Client.cs index f49e72ba75..73967db45e 100644 --- a/BizHawk.Client.EmuHawk/tools/Lua/Libraries/EmuLuaLibrary.Client.cs +++ b/BizHawk.Client.EmuHawk/tools/Lua/Libraries/EmuLuaLibrary.Client.cs @@ -151,6 +151,16 @@ namespace BizHawk.Client.EmuHawk return Global.Config.TargetZoomFactor; } + [LuaMethodAttributes( + "SetGameExtraPadding", + "Sets the extra padding added to the 'emu' surface so that you can draw HUD elements in predictable placements" + )] + public static void SetGameExtraPadding(int left, int top, int right, int bottom) + { + GlobalWin.DisplayManager.GameExtraPadding = new System.Windows.Forms.Padding(left, top, right, bottom); + GlobalWin.MainForm.FrameBufferResized(); + } + [LuaMethodAttributes( "ispaused", "Returns true if emulator is paused, otherwise, false"