From 213e02ffef8a13bbeffc9ca60170d77728aaa20d Mon Sep 17 00:00:00 2001 From: adelikat Date: Mon, 30 Dec 2013 14:58:09 +0000 Subject: [PATCH] Lua - forms.textbox() - add a fixed width option --- .../tools/Lua/Libraries/EmuLuaLibrary.Forms.cs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/BizHawk.Client.EmuHawk/tools/Lua/Libraries/EmuLuaLibrary.Forms.cs b/BizHawk.Client.EmuHawk/tools/Lua/Libraries/EmuLuaLibrary.Forms.cs index 788b87cfa3..ca44fc905e 100644 --- a/BizHawk.Client.EmuHawk/tools/Lua/Libraries/EmuLuaLibrary.Forms.cs +++ b/BizHawk.Client.EmuHawk/tools/Lua/Libraries/EmuLuaLibrary.Forms.cs @@ -465,7 +465,7 @@ namespace BizHawk.Client.EmuHawk } } - public int forms_textbox(object form_handle, object caption = null, object width = null, object height = null, object boxtype = null, object X = null, object Y = null, bool multiline = false) + public int forms_textbox(object form_handle, object caption = null, object width = null, object height = null, object boxtype = null, object X = null, object Y = null, bool multiline = false, bool fixedWidth = false) { LuaWinform form = GetForm(form_handle); if (form == null) @@ -474,6 +474,11 @@ namespace BizHawk.Client.EmuHawk } LuaTextBox textbox = new LuaTextBox(); + if (fixedWidth) + { + textbox.Font = new Font("Courier New", 8); + } + textbox.Multiline = multiline; SetText(textbox, caption); SetLocation(textbox, X, Y);