Change chat text color for Lua warnings to yellow
authorWuzzy <Wuzzy2@mail.ru>
Sun, 02 Sep 2018 22:05:45 +0200
changeset 13747 cb2857f55130
parent 13746 e8f26bc793d9
child 13748 d7b72ea8d136
Change chat text color for Lua warnings to yellow
hedgewars/uChat.pas
hedgewars/uScript.pas
--- a/hedgewars/uChat.pas	Sun Sep 02 22:02:15 2018 +0200
+++ b/hedgewars/uChat.pas	Sun Sep 02 22:05:45 2018 +0200
@@ -71,7 +71,7 @@
 
 const
     colors: array[#0..#9] of TSDL_Color = (
-            (r:$FF; g:$FF; b:$FF; a:$FF), // #0 unused, feel free to take it for anything
+            (r:$FF; g:$FF; b:$00; a:$FF), // #0 warning message [Yellow]
             (r:$FF; g:$FF; b:$FF; a:$FF), // #1 chat message [White]
             (r:$FF; g:$00; b:$FF; a:$FF), // #2 action message [Purple]
             (r:$90; g:$FF; b:$90; a:$FF), // #3 join/leave message [Lime]
--- a/hedgewars/uScript.pas	Sun Sep 02 22:02:15 2018 +0200
+++ b/hedgewars/uScript.pas	Sun Sep 02 22:05:45 2018 +0200
@@ -157,7 +157,10 @@
     else
         s:= intro + ': ' + s;
     WriteLnToConsole(s);
-    AddChatString(#5 + s);
+    if isWarning then
+        AddChatString(#0 + s)
+    else
+        AddChatString(#5 + s);
     if cTestLua and (not isWarning) then
         halt(HaltTestLuaError);
 end;