From 435323489e669c6fe1d8a1f944e92406530b2f46 Mon Sep 17 00:00:00 2001 From: feos Date: Wed, 10 Feb 2016 20:05:54 +0300 Subject: [PATCH] lua: gui.defaultPixelFont() --- .../tools/Lua/Libraries/EmuLuaLibrary.Gui.cs | 24 +++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/BizHawk.Client.EmuHawk/tools/Lua/Libraries/EmuLuaLibrary.Gui.cs b/BizHawk.Client.EmuHawk/tools/Lua/Libraries/EmuLuaLibrary.Gui.cs index e15f452a45..f00d9cff7e 100644 --- a/BizHawk.Client.EmuHawk/tools/Lua/Libraries/EmuLuaLibrary.Gui.cs +++ b/BizHawk.Client.EmuHawk/tools/Lua/Libraries/EmuLuaLibrary.Gui.cs @@ -189,6 +189,30 @@ namespace BizHawk.Client.EmuHawk DefaultTextBackground = color; } + [LuaMethodAttributes( + "defaultPixelFont", + "Sets the default font to use in gui.pixelText(), \"gens\" by default" + )] + public void SetDefaultTextBackground(string fontfamily) + { + switch (fontfamily) + { + case "fceux": + case "0": + DefaultPixelFont = 0; + break; + case "gens": + case "1": + DefaultPixelFont = 1; + break; + default: + Log(string.Format("Unable to find font family: {0}", fontfamily)); + return; + } + } + + + [LuaMethodAttributes( "drawBezier", "Draws a Bezier curve using the table of coordinates provided in the given color"