- special text color override setting will only apply to non in-game text (useful when videos clash with menu text colors)

This commit is contained in:
Mark Vejvoda 2012-06-01 19:14:55 +00:00
parent dcc615d427
commit e96346ff28
2 changed files with 8 additions and 6 deletions

View File

@ -3361,12 +3361,6 @@ int glestMain(int argc, char** argv) {
UPNP_Tools::isUPNP = !config.getBool("DisableUPNP","false");
Texture::useTextureCompression = config.getBool("EnableTextureCompression","false");
if(config.getString("CustomMenuTextColor","") != "") {
string customMenuTextColor = config.getString("CustomMenuTextColor");
Vec3f customTextColor = Vec3f::strToVec3(customMenuTextColor);
GraphicComponent::setCustomTextColor(customTextColor);
}
// 256 for English
// 30000 for Chinese
Font::charCount = config.getInt("FONT_CHARCOUNT",intToStr(Font::charCount).c_str());

View File

@ -56,6 +56,13 @@ MainMenu::MainMenu(Program *program) : ProgramState(program), menuBackgroundVide
if(SystemFlags::getSystemSettingType(SystemFlags::debugSystem).enabled) SystemFlags::OutputDebug(SystemFlags::debugSystem,"In [%s::%s %d]\n",__FILE__,__FUNCTION__,__LINE__);
Config &config = Config::getInstance();
if(config.getString("CustomMenuTextColor","") != "") {
string customMenuTextColor = config.getString("CustomMenuTextColor");
Vec3f customTextColor = Vec3f::strToVec3(customMenuTextColor);
GraphicComponent::setCustomTextColor(customTextColor);
}
setState(new MenuStateRoot(program, this));
if(SystemFlags::getSystemSettingType(SystemFlags::debugSystem).enabled) SystemFlags::OutputDebug(SystemFlags::debugSystem,"In [%s::%s %d]\n",__FILE__,__FUNCTION__,__LINE__);
@ -88,6 +95,7 @@ MainMenu::~MainMenu() {
//SoundRenderer &soundRenderer= SoundRenderer::getInstance();
//soundRenderer.stopAllSounds();
GraphicComponent::setCustomTextColor(Vec3f(1.0f,1.0f,1.0f));
if(SystemFlags::getSystemSettingType(SystemFlags::debugSystem).enabled) SystemFlags::OutputDebug(SystemFlags::debugSystem,"In [%s::%s %d]\n",__FILE__,__FUNCTION__,__LINE__);
}