From 1226603697f866077ea2a985e7e6bf2f755eb8a0 Mon Sep 17 00:00:00 2001 From: adelikat Date: Sun, 23 Mar 2014 17:12:25 +0000 Subject: [PATCH] Lua - Fix gui.Alert() to at least work. However, in trunk the alert font was gimped into regular font with the opengl change, and this is probably for the best. Will remove this lua feature and alert font code in a later commit --- .../DisplayManager/OSDManager.cs | 2 +- .../tools/Lua/Libraries/EmuLuaLibrary.Gui.cs | 15 ++++++--------- 2 files changed, 7 insertions(+), 10 deletions(-) diff --git a/BizHawk.Client.EmuHawk/DisplayManager/OSDManager.cs b/BizHawk.Client.EmuHawk/DisplayManager/OSDManager.cs index 935dbd7cfa..d37b87a734 100644 --- a/BizHawk.Client.EmuHawk/DisplayManager/OSDManager.cs +++ b/BizHawk.Client.EmuHawk/DisplayManager/OSDManager.cs @@ -213,7 +213,7 @@ namespace BizHawk.Client.EmuHawk //g.DrawString(GUITextList[x].Message, MessageFont, Color.Gray, posx + 1, posy + 1); if (GUITextList[x].Alert) - g.DrawString(GUITextList[x].Message, MessageFont, FixedMessagesColor, posx, posy); + g.DrawString(GUITextList[x].Message, AlertFont, FixedMessagesColor, posx, posy); else g.DrawString(GUITextList[x].Message, MessageFont, GUITextList[x].ForeColor, posx, posy); } diff --git a/BizHawk.Client.EmuHawk/tools/Lua/Libraries/EmuLuaLibrary.Gui.cs b/BizHawk.Client.EmuHawk/tools/Lua/Libraries/EmuLuaLibrary.Gui.cs index 5ba2264d59..8d2684154e 100644 --- a/BizHawk.Client.EmuHawk/tools/Lua/Libraries/EmuLuaLibrary.Gui.cs +++ b/BizHawk.Client.EmuHawk/tools/Lua/Libraries/EmuLuaLibrary.Gui.cs @@ -125,17 +125,14 @@ namespace BizHawk.Client.EmuHawk object forecolor = null, string anchor = null) { - if (!alert) + if (forecolor == null) { - if (forecolor == null) - { - forecolor = "white"; - } + forecolor = "white"; + } - if (background == null) - { - background = "black"; - } + if (background == null) + { + background = "black"; } var a = 0;