Lua - forms.textbox() - add a fixed width option
This commit is contained in:
parent
a1c0a1956b
commit
213e02ffef
BizHawk.Client.EmuHawk/tools/Lua/Libraries
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue