From d5731ad5ea4a1812ca6d3ee94ff93c9b2455f47d Mon Sep 17 00:00:00 2001 From: kervala Date: Thu, 8 Mar 2012 16:59:03 +0100 Subject: [PATCH] Changed: #1433 Merge changes from patch 1.13 --- code/ryzom/client/src/client_cfg.cpp | 1 + code/ryzom/client/src/client_cfg.h | 5 +++- .../src/interface_v3/action_handler_help.cpp | 26 ++++++++++++------- .../src/interface_v3/interface_manager.cpp | 8 +++--- .../client/src/string_manager_client.cpp | 8 +++--- 5 files changed, 31 insertions(+), 17 deletions(-) diff --git a/code/ryzom/client/src/client_cfg.cpp b/code/ryzom/client/src/client_cfg.cpp index 54a3d9b45..e0ed33abe 100644 --- a/code/ryzom/client/src/client_cfg.cpp +++ b/code/ryzom/client/src/client_cfg.cpp @@ -1347,6 +1347,7 @@ void CClientConfig::setValues() if (stricmp(mode, "over") == 0) p.Mode = SSysInfoParam::Over; else if (stricmp(mode, "overonly") == 0) p.Mode = SSysInfoParam::OverOnly; else if (stricmp(mode, "center") == 0) p.Mode = SSysInfoParam::Center; + else if (stricmp(mode, "centeraround") == 0) p.Mode = SSysInfoParam::CenterAround; else if (stricmp(mode, "around") == 0) p.Mode = SSysInfoParam::Around; ClientCfg.SystemInfoParams[toLower(sic->asString(2 * k))] = p; diff --git a/code/ryzom/client/src/client_cfg.h b/code/ryzom/client/src/client_cfg.h index 86e70c1b8..3925aaf2d 100644 --- a/code/ryzom/client/src/client_cfg.h +++ b/code/ryzom/client/src/client_cfg.h @@ -635,12 +635,15 @@ struct CClientConfig // Mode is the display settings : // Normal : just display in the system info window // Over : must be displayed at bottom of the screen and in system info window + // OverOnly : must be displayed at bottom of the screen // Center ; must be displayed at the center of the screen and in system info window + // Around ; must be displayed in the around chat window + // CenterAround ; must be displayed at the center of the screen and in around chat window struct SSysInfoParam { CRGBA Color; std::string SysInfoFxName; - enum TMode { Normal, Over, OverOnly, Center, Around }; + enum TMode { Normal, Over, OverOnly, Center, Around, CenterAround }; TMode Mode; SSysInfoParam() { diff --git a/code/ryzom/client/src/interface_v3/action_handler_help.cpp b/code/ryzom/client/src/interface_v3/action_handler_help.cpp index dfd923dea..3774764b4 100644 --- a/code/ryzom/client/src/interface_v3/action_handler_help.cpp +++ b/code/ryzom/client/src/interface_v3/action_handler_help.cpp @@ -244,6 +244,7 @@ CInterfaceGroup *CInterfaceHelp::activateNextWindow(CDBCtrlSheet *elt, sint forc i++; } + bool showSlotAndCreator = false; // If an active window get the same object, abort, but make it top. for(i=0;i<_ActiveWindows.size();i++) { @@ -251,10 +252,8 @@ CInterfaceGroup *CInterfaceHelp::activateNextWindow(CDBCtrlSheet *elt, sint forc CDBCtrlSheet *ctrlSrc= elt; // get the ctrl sheet in this help window. CDBCtrlSheet *ctrlDst= dynamic_cast(group->getCtrl(":ctrl_slot")); - bool showSlotAndCreator = false; if(ctrlDst && ctrlSrc) { - showSlotAndCreator = true; // if same Aspect if( ctrlSrc->sameAspect(ctrlDst) ) { @@ -263,6 +262,8 @@ CInterfaceGroup *CInterfaceHelp::activateNextWindow(CDBCtrlSheet *elt, sint forc // for items, must also test if they have the same itemSlotId, cause relies also on "ItemInfo system" if(elt->getType() == CCtrlSheetInfo::SheetType_Item) { + showSlotAndCreator = true; + CDBCtrlSheet *realCtrlDst= _InfoWindows[_ActiveWindows[i]].CtrlSheet; if(!realCtrlDst) ok= false; @@ -279,13 +280,6 @@ CInterfaceGroup *CInterfaceHelp::activateNextWindow(CDBCtrlSheet *elt, sint forc } } } - - CInterfaceElement *ctrl = group->getElement(group->getId()+":content:ctrl_slot"); - if (ctrl) ctrl->setActive(showSlotAndCreator); - ctrl = group->getElement(group->getId()+":content:creator"); - if (ctrl) ctrl->setActive(showSlotAndCreator); - ctrl = group->getElement(group->getId()+":content:creator_header"); - if (ctrl) ctrl->setActive(showSlotAndCreator); } // If some free window possible, search which to take @@ -353,6 +347,13 @@ CInterfaceGroup *CInterfaceHelp::activateNextWindow(CDBCtrlSheet *elt, sint forc CInterfaceGroup *group= _InfoWindows[newIndexWindow].Window; nlassert(group); + CInterfaceElement *ctrl = group->getElement(group->getId()+":content:ctrl_slot"); + if (ctrl) ctrl->setActive(showSlotAndCreator); + ctrl = group->getElement(group->getId()+":content:creator"); + if (ctrl) ctrl->setActive(showSlotAndCreator); + ctrl = group->getElement(group->getId()+":content:creator_header"); + if (ctrl) ctrl->setActive(showSlotAndCreator); + // activate it, set top, copy item watched group->setActive(true); pIM->setTopWindow(group); @@ -1226,6 +1227,7 @@ static void setupSkillToTradeHelp(CSheetHelpSetup &setup) if(setup.DestSheet) { setup.SrcSheet->copyAspect(setup.DestSheet); + setup.DestSheet->setActive(true); } ucstring skillText; @@ -2287,6 +2289,7 @@ static void setupItemHelp(CSheetHelpSetup &setup) if(setup.DestSheet) { setup.SrcSheet->copyAspect(setup.DestSheet); + setup.DestSheet->setActive(true); } // NB: for raw materials only, must do each once only, must not do it at refresh, cause combo reseted @@ -2575,6 +2578,7 @@ static void setupPactHelp(CSheetHelpSetup &setup) if(setup.DestSheet) { setup.SrcSheet->copyAspect(setup.DestSheet); + setup.DestSheet->setActive(true); } @@ -2612,6 +2616,7 @@ static void setupMissionHelp(CSheetHelpSetup &setup) if(setup.DestSheet) { setup.SrcSheet->copyAspect(setup.DestSheet); + setup.DestSheet->setActive(true); } // get detail text id from db @@ -2849,6 +2854,7 @@ void setupOutpostBuildingHelp(CSheetHelpSetup &setup) if(setup.DestSheet) { setup.SrcSheet->copyAspect(setup.DestSheet); + setup.DestSheet->setActive(true); } const COutpostBuildingSheet *pOBS = setup.SrcSheet->asOutpostBuildingSheet(); @@ -3173,6 +3179,7 @@ void setupSabrinaPhraseHelp(CSheetHelpSetup &setup, const CSPhraseCom &phrase, u if(setup.DestSheet) { setup.SrcSheet->copyAspect(setup.DestSheet); + setup.DestSheet->setActive(true); } // **** setup the phrase Text info @@ -3242,6 +3249,7 @@ static void setupSabrinaBrickHelp(CSheetHelpSetup &setup, bool auraDisabled) if(setup.DestSheet) { setup.SrcSheet->copyAspect(setup.DestSheet); + setup.DestSheet->setActive(true); } diff --git a/code/ryzom/client/src/interface_v3/interface_manager.cpp b/code/ryzom/client/src/interface_v3/interface_manager.cpp index 8e0851cf6..cfae646d2 100644 --- a/code/ryzom/client/src/interface_v3/interface_manager.cpp +++ b/code/ryzom/client/src/interface_v3/interface_manager.cpp @@ -4404,12 +4404,14 @@ void CInterfaceManager::displaySystemInfo(const ucstring &str, const string &cat } } + if (mode == CClientConfig::SSysInfoParam::Center || mode == CClientConfig::SSysInfoParam::CenterAround) + InSceneBubbleManager.addMessagePopupCenter(str, color); + // If over popup a string at the bottom of the screen if ((mode == CClientConfig::SSysInfoParam::Over) || (mode == CClientConfig::SSysInfoParam::OverOnly)) InSceneBubbleManager.addMessagePopup(str, color); - else if (mode == CClientConfig::SSysInfoParam::Center) - InSceneBubbleManager.addMessagePopupCenter(str, color); - else if (mode == CClientConfig::SSysInfoParam::Around && PeopleInterraction.AroundMe.Window) + else if ( (mode == CClientConfig::SSysInfoParam::Around || mode == CClientConfig::SSysInfoParam::CenterAround) + && PeopleInterraction.AroundMe.Window) PeopleInterraction.ChatInput.AroundMe.displayMessage(str, color, 2); } diff --git a/code/ryzom/client/src/string_manager_client.cpp b/code/ryzom/client/src/string_manager_client.cpp index fb7d5187d..5dfead832 100644 --- a/code/ryzom/client/src/string_manager_client.cpp +++ b/code/ryzom/client/src/string_manager_client.cpp @@ -1628,10 +1628,10 @@ vector CStringManagerClient::getTitleInfos(const std::string &titleId, if (listInfos.size() > 0) { - string title = listInfos[0].toUtf8(); - if (titleId[0] == '#') - title = "#" + title; - listInfos[0] = getSpecialWord(title, women); + if (titleId[0] != '#') + { + listInfos[0] = getSpecialWord(listInfos[0].toUtf8(), women); + } } return listInfos;