From c175dec5d890c16e7c663e75003f3c3e92db86d1 Mon Sep 17 00:00:00 2001 From: kaetemi Date: Wed, 8 Oct 2014 23:20:35 +0200 Subject: [PATCH] Configure shadow outline in applications --- code/ryzom/client/src/debug_client.cpp | 3 +++ code/ryzom/client/src/graph.cpp | 1 + code/ryzom/client/src/ground_fx_manager.cpp | 1 + code/ryzom/client/src/interface_v3/chat_text_manager.cpp | 1 + .../client/src/interface_v3/dbgroup_list_sheet_text.cpp | 1 + .../dbgroup_list_sheet_text_brick_composition.cpp | 1 + .../src/interface_v3/dbgroup_list_sheet_text_share.cpp | 2 ++ code/ryzom/client/src/interface_v3/group_map.cpp | 1 + code/ryzom/client/src/main_loop.cpp | 2 ++ code/ryzom/client/src/main_loop_debug.cpp | 6 ++++++ code/ryzom/client/src/r2/editor.cpp | 1 + code/ryzom/client/src/timed_fx_manager.cpp | 1 + .../tools/leveldesign/world_editor/world_editor/display.cpp | 1 + code/snowballs2/client/src/snowballs_client.cpp | 1 + 14 files changed, 23 insertions(+) diff --git a/code/ryzom/client/src/debug_client.cpp b/code/ryzom/client/src/debug_client.cpp index 8800384ba..0af4207ae 100644 --- a/code/ryzom/client/src/debug_client.cpp +++ b/code/ryzom/client/src/debug_client.cpp @@ -345,6 +345,7 @@ void displayStreamingDebug () //----------------// // Create a shadow when displaying a text. TextContext->setShaded(true); + TextContext->setShadeOutline(false); // Set the font size. TextContext->setFontSize(ClientCfg.DebugFontSize); // Set the text color @@ -390,6 +391,7 @@ void displayStreamingDebug () // No more shadow when displaying a text. TextContext->setShaded(false); + TextContext->setShadeOutline(false); } } @@ -567,6 +569,7 @@ void displayNetDebug () //----------------// // Create a shadow when displaying a text. TextContext->setShaded(true); + TextContext->setShadeOutline(false); // Set the font size. TextContext->setFontSize(ClientCfg.DebugFontSize); // Set the text color diff --git a/code/ryzom/client/src/graph.cpp b/code/ryzom/client/src/graph.cpp index 1bf370db0..8270762fb 100644 --- a/code/ryzom/client/src/graph.cpp +++ b/code/ryzom/client/src/graph.cpp @@ -134,6 +134,7 @@ void CGraph::renderGraph () if (TextContext != NULL) { TextContext->setShaded (false); + TextContext->setShadeOutline(false); TextContext->setHotSpot (UTextContext::MiddleLeft); TextContext->setColor (frontCol); TextContext->setFontSize (10); diff --git a/code/ryzom/client/src/ground_fx_manager.cpp b/code/ryzom/client/src/ground_fx_manager.cpp index dc064415f..f13309183 100644 --- a/code/ryzom/client/src/ground_fx_manager.cpp +++ b/code/ryzom/client/src/ground_fx_manager.cpp @@ -807,6 +807,7 @@ void CTestGroundFX::displayFXBoxes() const Driver->setFrustum(fr); TextContext->setColor(CRGBA::Green); TextContext->setShaded(false); + TextContext->setShadeOutline(false); TextContext->setFontSize(12); // float size = 0.4f; diff --git a/code/ryzom/client/src/interface_v3/chat_text_manager.cpp b/code/ryzom/client/src/interface_v3/chat_text_manager.cpp index 10fd2d29c..faaf86092 100644 --- a/code/ryzom/client/src/interface_v3/chat_text_manager.cpp +++ b/code/ryzom/client/src/interface_v3/chat_text_manager.cpp @@ -157,6 +157,7 @@ CViewBase *CChatTextManager::createMsgText(const ucstring &cstMsg, NLMISC::CRGBA CViewText *vt = new CViewText(CViewText::TCtorParam()); // get parameters from config.xml vt->setShadow(isTextShadowed()); + vt->setShadowOutline(false); vt->setFontSize(getTextFontSize()); vt->setMultiLine(true); vt->setTextMode(justified ? CViewText::Justified : CViewText::DontClipWord); diff --git a/code/ryzom/client/src/interface_v3/dbgroup_list_sheet_text.cpp b/code/ryzom/client/src/interface_v3/dbgroup_list_sheet_text.cpp index a05d1e4aa..772f99418 100644 --- a/code/ryzom/client/src/interface_v3/dbgroup_list_sheet_text.cpp +++ b/code/ryzom/client/src/interface_v3/dbgroup_list_sheet_text.cpp @@ -880,6 +880,7 @@ void CDBGroupListSheetText::setup() text->setFontSize(_TextTemplate.getFontSize()); text->setColor(_TextTemplate.getColor()); text->setShadow(_TextTemplate.getShadow()); + text->setShadowOutline(_TextTemplate.getShadowOutline()); text->setLineMaxW(_TextTemplate.getLineMaxW()); text->setMultiLine(_TextTemplate.getMultiLine()); if(text->getMultiLine()) diff --git a/code/ryzom/client/src/interface_v3/dbgroup_list_sheet_text_brick_composition.cpp b/code/ryzom/client/src/interface_v3/dbgroup_list_sheet_text_brick_composition.cpp index 67079ba55..c67e69660 100644 --- a/code/ryzom/client/src/interface_v3/dbgroup_list_sheet_text_brick_composition.cpp +++ b/code/ryzom/client/src/interface_v3/dbgroup_list_sheet_text_brick_composition.cpp @@ -95,6 +95,7 @@ void CDBGroupListSheetTextBrickComposition::CSheetChildBrick::init(CDBGroupListS text->setFontSize(compoList->getTextTemplate().getFontSize()); text->setColor(compoList->getTextTemplate().getColor()); text->setShadow(compoList->getTextTemplate().getShadow()); + text->setShadowOutline(compoList->getTextTemplate().getShadowOutline()); text->setMultiLine(false); text->setModulateGlobalColor(compoList->getTextTemplate().getModulateGlobalColor()); diff --git a/code/ryzom/client/src/interface_v3/dbgroup_list_sheet_text_share.cpp b/code/ryzom/client/src/interface_v3/dbgroup_list_sheet_text_share.cpp index 35cd90a7e..fcef370e0 100644 --- a/code/ryzom/client/src/interface_v3/dbgroup_list_sheet_text_share.cpp +++ b/code/ryzom/client/src/interface_v3/dbgroup_list_sheet_text_share.cpp @@ -121,6 +121,7 @@ void CDBGroupListSheetTextShare::CSheetChildShare::init(CDBGroupListSheetText *p text->setFontSize(compoList->getTextTemplate().getFontSize()); text->setColor(compoList->getTextTemplate().getColor()); text->setShadow(compoList->getTextTemplate().getShadow()); + text->setShadowOutline(compoList->getTextTemplate().getShadowOutline()); text->setMultiLine(false); text->setModulateGlobalColor(compoList->getTextTemplate().getModulateGlobalColor()); // Add it to the scrolled list. @@ -139,6 +140,7 @@ void CDBGroupListSheetTextShare::CSheetChildShare::init(CDBGroupListSheetText *p text->setFontSize(compoList->getTextTemplate().getFontSize()); text->setColor(compoList->getTextTemplate().getColor()); text->setShadow(compoList->getTextTemplate().getShadow()); + text->setShadowOutline(compoList->getTextTemplate().getShadowOutline()); text->setMultiLine(false); text->setModulateGlobalColor(compoList->getTextTemplate().getModulateGlobalColor()); // Add it to the scrolled list. diff --git a/code/ryzom/client/src/interface_v3/group_map.cpp b/code/ryzom/client/src/interface_v3/group_map.cpp index 31d70d0d7..558ab960c 100644 --- a/code/ryzom/client/src/interface_v3/group_map.cpp +++ b/code/ryzom/client/src/interface_v3/group_map.cpp @@ -2333,6 +2333,7 @@ void CGroupMap::createLMWidgets(const std::vector &lms) pNewText->setColor(CRGBA(255,255,255,255)); pNewText->setShadow(true); + pNewText->setShadowOutline(false); pNewText->setShadowColor(CRGBA(0,0,0,255)); pNewText->setModulateGlobalColor(false); pNewText->Type = rCLM.Type; diff --git a/code/ryzom/client/src/main_loop.cpp b/code/ryzom/client/src/main_loop.cpp index 1ac6a4a0c..f6d921ff8 100644 --- a/code/ryzom/client/src/main_loop.cpp +++ b/code/ryzom/client/src/main_loop.cpp @@ -1924,6 +1924,7 @@ bool mainLoop() // Create a shadow when displaying a text. TextContext->setShaded(true); + TextContext->setShadeOutline(false); // Set the font size. TextContext->setFontSize(10); // Set the text color @@ -2586,6 +2587,7 @@ void displaySpecialTextProgress(const char *text) { // Create a shadow when displaying a text. TextContext->setShaded(true); + TextContext->setShadeOutline(false); // Set the font size. TextContext->setFontSize(12); // Set the text color diff --git a/code/ryzom/client/src/main_loop_debug.cpp b/code/ryzom/client/src/main_loop_debug.cpp index 8b224f27f..19ea38414 100644 --- a/code/ryzom/client/src/main_loop_debug.cpp +++ b/code/ryzom/client/src/main_loop_debug.cpp @@ -80,6 +80,7 @@ void displayDebug() //----------------// // Create a shadow when displaying a text. TextContext->setShaded(true); + TextContext->setShadeOutline(false); // Set the font size. TextContext->setFontSize(ClientCfg.DebugFontSize); // Set the text color @@ -470,6 +471,7 @@ void displayDebug() // No more shadow when displaying a text. TextContext->setShaded(false); + TextContext->setShadeOutline(false); }// displayDebug // // ******************************************************************** @@ -491,6 +493,7 @@ void displayDebugFps() //----------------// // Create a shadow when displaying a text. TextContext->setShaded(true); + TextContext->setShadeOutline(false); // Set the font size. TextContext->setFontSize(ClientCfg.DebugFontSize); // Set the text color @@ -533,6 +536,7 @@ void displayDebugUIUnderMouse() //----------------// // Create a shadow when displaying a text. TextContext->setShaded(true); + TextContext->setShadeOutline(false); // Set the font size. TextContext->setFontSize(ClientCfg.DebugFontSize); @@ -707,6 +711,7 @@ void displayHelp() // Create a shadow when displaying a text. TextContext->setShaded(true); + TextContext->setShadeOutline(false); // Set the font size. TextContext->setFontSize(ClientCfg.HelpFontSize); // Set the text color @@ -763,6 +768,7 @@ void displayHelp() // No more shadow when displaying a text. TextContext->setShaded(false); + TextContext->setShadeOutline(false); }// displayHelp // // ******************************************************************** diff --git a/code/ryzom/client/src/r2/editor.cpp b/code/ryzom/client/src/r2/editor.cpp index bb09bec52..2bceb4200 100644 --- a/code/ryzom/client/src/r2/editor.cpp +++ b/code/ryzom/client/src/r2/editor.cpp @@ -1789,6 +1789,7 @@ void CEditor::waitScenarioScreen() if (!waitScreen) { TextContext->setShaded(true); + TextContext->setShadeOutline(false); TextContext->setFontSize(40); TextContext->setColor(CRGBA::White); diff --git a/code/ryzom/client/src/timed_fx_manager.cpp b/code/ryzom/client/src/timed_fx_manager.cpp index 9f7f40caf..d37ab782f 100644 --- a/code/ryzom/client/src/timed_fx_manager.cpp +++ b/code/ryzom/client/src/timed_fx_manager.cpp @@ -829,6 +829,7 @@ void CTimedFXManager::displayFXBoxes(TDebugDisplayMode displayMode) const Driver->setFrustum(fr); TextContext->setColor(CRGBA::Blue); TextContext->setShaded(false); + TextContext->setShadeOutline(false); TextContext->setFontSize(10); // float size = 0.4f; diff --git a/code/ryzom/tools/leveldesign/world_editor/world_editor/display.cpp b/code/ryzom/tools/leveldesign/world_editor/world_editor/display.cpp index dd2a17d82..09763d27c 100644 --- a/code/ryzom/tools/leveldesign/world_editor/world_editor/display.cpp +++ b/code/ryzom/tools/leveldesign/world_editor/world_editor/display.cpp @@ -309,6 +309,7 @@ void CDisplay::init (CMainFrame *pMF) _TextContext->setFontGenerator(NLMISC::CPath::getWindowsDirectory() + "Fonts\\arial.ttf"); _TextContext->setKeep800x600Ratio(true); _TextContext->setShaded(true); + _TextContext->setShadeOutline(false); _TextContext->setShadeColor(NLMISC::CRGBA::Black); } catch(...) diff --git a/code/snowballs2/client/src/snowballs_client.cpp b/code/snowballs2/client/src/snowballs_client.cpp index 68cdc47fa..7e019412b 100644 --- a/code/snowballs2/client/src/snowballs_client.cpp +++ b/code/snowballs2/client/src/snowballs_client.cpp @@ -327,6 +327,7 @@ void initCore() ConfigFile->getVar("ScreenFull").asInt()==0)); TextContext = Driver->createTextContext(CPath::lookup(ConfigFile->getVar("FontName").asString())); TextContext->setShaded(true); + TextContext->setShadeOutline(false); TextContext->setKeep800x600Ratio(false); // You can't call displayLoadingState() before init the loading state system displayLoadingState("Initialize Loading");