-Removed LuaVarArgs from gui_text. I think this function is pointless and over complicates things; let me know if you agree based on this example.
-Fixed DrawMessages, which was setting y = x, making the y parameter of gui.text useless.
This commit is contained in:
parent
908a9a11c5
commit
cba68551d0
|
@ -349,17 +349,10 @@ namespace BizHawk.MultiClient
|
|||
//----------------------------------------------------
|
||||
public void gui_text(object luaX, object luaY, object luaStr, object anchor = null)
|
||||
{
|
||||
gui_text_implementation(LuaVarArgs(luaX, luaY, luaStr, anchor));
|
||||
}
|
||||
|
||||
private void gui_text_implementation(object[] parameters)
|
||||
{
|
||||
int anchor;
|
||||
if (parameters.Length == 3)
|
||||
anchor = 0;
|
||||
else
|
||||
anchor = LuaInt(parameters[3]);
|
||||
Global.RenderPanel.AddGUIText(parameters[2].ToString(), LuaInt(parameters[0]), LuaInt(parameters[1]), false, anchor);
|
||||
int a = 0;
|
||||
if (anchor != null)
|
||||
a = LuaInt(anchor);
|
||||
Global.RenderPanel.AddGUIText(luaStr.ToString(), LuaInt(luaX), LuaInt(luaY), false, a);
|
||||
}
|
||||
|
||||
public void gui_alert(object luaX, object luaY, object luaStr)
|
||||
|
|
|
@ -506,7 +506,7 @@ namespace BizHawk.MultiClient
|
|||
for (int x = 0; x < GUITextList.Count; x++)
|
||||
{
|
||||
int posx = GetX(GUITextList[x].X, GUITextList[x].Anchor);
|
||||
int posy = GetX(GUITextList[x].X, GUITextList[x].Anchor);
|
||||
int posy = GetY(GUITextList[x].Y, GUITextList[x].Anchor);
|
||||
|
||||
MessageFont.DrawString(null, GUITextList[x].Message,
|
||||
posx + 2, posy + 2, Color.Black);
|
||||
|
|
Loading…
Reference in New Issue