Lua - forms.textbox() - add a fixed width option
This commit is contained in:
parent
a1c0a1956b
commit
213e02ffef
|
@ -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);
|
LuaWinform form = GetForm(form_handle);
|
||||||
if (form == null)
|
if (form == null)
|
||||||
|
@ -474,6 +474,11 @@ namespace BizHawk.Client.EmuHawk
|
||||||
}
|
}
|
||||||
|
|
||||||
LuaTextBox textbox = new LuaTextBox();
|
LuaTextBox textbox = new LuaTextBox();
|
||||||
|
if (fixedWidth)
|
||||||
|
{
|
||||||
|
textbox.Font = new Font("Courier New", 8);
|
||||||
|
}
|
||||||
|
|
||||||
textbox.Multiline = multiline;
|
textbox.Multiline = multiline;
|
||||||
SetText(textbox, caption);
|
SetText(textbox, caption);
|
||||||
SetLocation(textbox, X, Y);
|
SetLocation(textbox, X, Y);
|
||||||
|
|
Loading…
Reference in New Issue