From 23f9d297693aba71f27031942f8d24f3e826852f Mon Sep 17 00:00:00 2001 From: Titus Tscharntke Date: Sat, 1 Jan 2011 22:08:34 +0000 Subject: [PATCH] too much red in the console ;-) --- source/glest_game/game/console.cpp | 1 + source/glest_game/graphics/renderer.cpp | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/source/glest_game/game/console.cpp b/source/glest_game/game/console.cpp index 2cdd1f40..7bb5e3a2 100644 --- a/source/glest_game/game/console.cpp +++ b/source/glest_game/game/console.cpp @@ -39,6 +39,7 @@ Console::Console() { yPos=20; lineHeight=20; font=CoreData::getInstance().getConsoleFont(); + stringToHighlight=""; } void Console::addStdMessage(const string &s) { diff --git a/source/glest_game/graphics/renderer.cpp b/source/glest_game/graphics/renderer.cpp index 88907452..2725dba9 100644 --- a/source/glest_game/graphics/renderer.cpp +++ b/source/glest_game/graphics/renderer.cpp @@ -909,7 +909,7 @@ void Renderer::renderConsoleLine(int lineIndex, int xPosition, int yPosition, in fontColor = defaultFontColor; } - if(lineInfo->text.find(stringToHightlight)!=string::npos){ + if(stringToHightlight!="" && lineInfo->text.find(stringToHightlight)!=string::npos){ fontColor=Vec4f(1.f, 0.5f, 0.5f, 0.0f); } renderTextShadow(