Lua - forms.textbox() - add a fixed width option

This commit is contained in:
adelikat 2013-12-30 14:58:09 +00:00
parent a1c0a1956b
commit 213e02ffef
1 changed files with 6 additions and 1 deletions
BizHawk.Client.EmuHawk/tools/Lua/Libraries

View File

@ -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);