gui.text now accepts BackgroundColor parameter. I didn't had enough time to check stuff, so i will check more deeply some other time.
This commit is contained in:
parent
d62b2d98e1
commit
cefc803425
|
@ -276,9 +276,9 @@ namespace BizHawk.MultiClient
|
|||
messages.Add(new UIMessage { Message = message, ExpireAt = DateTime.Now + TimeSpan.FromSeconds(2) });
|
||||
}
|
||||
|
||||
public void AddGUIText(string message, int x, int y, bool alert, int anchor)
|
||||
public void AddGUIText(string message, int x, int y, bool alert, Brush color, int anchor)
|
||||
{
|
||||
GUITextList.Add(new UIDisplay { Message = message, X = x, Y = y, Alert = alert, Anchor = anchor });
|
||||
GUITextList.Add(new UIDisplay { Message = message, X = x, Y = y, Color = color, Alert = alert, Anchor = anchor });
|
||||
}
|
||||
|
||||
public void ClearGUIText()
|
||||
|
@ -315,8 +315,7 @@ namespace BizHawk.MultiClient
|
|||
using(var brush = new SolidBrush(Color.FromArgb(Global.Config.AlertMessageColor)))
|
||||
g.DrawString(GUITextList[x].Message, MessageFont, brush, posx,posy);
|
||||
else
|
||||
using (var brush = new SolidBrush(Color.FromArgb(Global.Config.MessagesColor)))
|
||||
g.DrawString(GUITextList[x].Message, MessageFont, brush, posx, posy);
|
||||
g.DrawString(GUITextList[x].Message, MessageFont, GUITextList[x].Color, posx, posy);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -427,7 +427,7 @@ namespace BizHawk.MultiClient
|
|||
//----------------------------------------------------
|
||||
//Gui library
|
||||
//----------------------------------------------------
|
||||
private void do_gui_text(object luaX, object luaY, object luaStr, bool alert, object anchor = null)
|
||||
private void do_gui_text(object luaX, object luaY, object luaStr, bool alert, object color, object anchor = null)
|
||||
{
|
||||
int a = 0;
|
||||
if (anchor != null)
|
||||
|
@ -449,12 +449,12 @@ namespace BizHawk.MultiClient
|
|||
a = LuaInt(anchor);
|
||||
}
|
||||
}
|
||||
Global.OSD.AddGUIText(luaStr.ToString(), LuaInt(luaX), LuaInt(luaY), alert, a);
|
||||
Global.OSD.AddGUIText(luaStr.ToString(), LuaInt(luaX), LuaInt(luaY), alert, GetBrush(color), a);
|
||||
}
|
||||
|
||||
public void gui_text(object luaX, object luaY, object luaStr, object anchor = null)
|
||||
public void gui_text(object luaX, object luaY, object luaStr, object color, object anchor = null)
|
||||
{
|
||||
do_gui_text(luaX, luaY, luaStr, false, anchor);
|
||||
do_gui_text(luaX, luaY, luaStr, false, color, anchor);
|
||||
}
|
||||
|
||||
public void gui_alert(object luaX, object luaY, object luaStr, object anchor = null)
|
||||
|
|
|
@ -334,5 +334,6 @@ namespace BizHawk.MultiClient
|
|||
public int Y;
|
||||
public bool Alert;
|
||||
public int Anchor;
|
||||
public Brush Color;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -80,7 +80,7 @@ namespace BizHawk.MultiClient
|
|||
{
|
||||
bool alert = Global.CheatList.IsActiveCheat(Domain, watchList[x].address);
|
||||
Global.OSD.AddGUIText(watchList[x].ToString(),
|
||||
Global.Config.DispRamWatchx, (Global.Config.DispRamWatchy + (x * 14)), alert, 0);
|
||||
Global.Config.DispRamWatchx, (Global.Config.DispRamWatchy + (x * 14)), alert, Brushes.Black, 0);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue