|
|
|
@ -1783,65 +1783,29 @@ namespace NLGUI
|
|
|
|
|
/** If there's a modal box around, should be sure that the context help doesn't intersect it.
|
|
|
|
|
* If this is the case, we just disable it, unless the tooltip was generated by the current modal window
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
bool draw = false;
|
|
|
|
|
if ( hasModal() )
|
|
|
|
|
{
|
|
|
|
|
CInterfaceGroup *mw = getModal().ModalWindow;
|
|
|
|
|
if (mw && mw->isIn(*groupContextHelp))
|
|
|
|
|
{
|
|
|
|
|
if (_CurCtrlContextHelp->isSonOf(mw))
|
|
|
|
|
draw = true;
|
|
|
|
|
{
|
|
|
|
|
groupContextHelp->executeLuaScriptOnDraw();
|
|
|
|
|
groupContextHelp->draw ();
|
|
|
|
|
// flush layers
|
|
|
|
|
CViewRenderer::getInstance()->flush();
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
draw = true;
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
draw = true;
|
|
|
|
|
|
|
|
|
|
if (draw) {
|
|
|
|
|
// apply opacity settings
|
|
|
|
|
const std::vector< CViewBase* > &vs = groupContextHelp->getViews();
|
|
|
|
|
// content opacity: only target views or else breaks
|
|
|
|
|
for( uint i = 0; i < vs.size(); ++i)
|
|
|
|
|
{
|
|
|
|
|
CViewBase *pVB = vs[i];
|
|
|
|
|
pVB->setAlpha(_ContextHelpContentAlpha);
|
|
|
|
|
}
|
|
|
|
|
// go into sub groups and apply opacity to views and controls (this is mainly for crystallized_spell_context_help)
|
|
|
|
|
const std::vector<CInterfaceGroup*> &rG = groupContextHelp->getGroups();
|
|
|
|
|
if (!rG.empty()) {
|
|
|
|
|
for(uint i = 0; i < rG.size(); ++i) {
|
|
|
|
|
const std::vector< CInterfaceGroup* > &vs = rG[i]->getGroups();
|
|
|
|
|
if (!vs.empty()) {
|
|
|
|
|
for( uint j = 0; j < vs.size(); ++j)
|
|
|
|
|
{
|
|
|
|
|
const std::vector< CViewBase* > &vb = vs[j]->getViews();
|
|
|
|
|
if (!vb.empty()) {
|
|
|
|
|
for( uint k = 0; k < vb.size(); ++k)
|
|
|
|
|
{
|
|
|
|
|
CViewBase *pVB = vb[k];
|
|
|
|
|
pVB->setAlpha(_ContextHelpContentAlpha);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
groupContextHelp->executeLuaScriptOnDraw();
|
|
|
|
|
groupContextHelp->draw ();
|
|
|
|
|
// flush layers
|
|
|
|
|
CViewRenderer::getInstance()->flush();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
const std::vector< CViewBase* > &vb = rG[i]->getViews();
|
|
|
|
|
if (!vb.empty()) {
|
|
|
|
|
for( uint k = 0; k < vb.size(); ++k)
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
CViewBase *pVB = vb[k];
|
|
|
|
|
pVB->setAlpha(_ContextHelpContentAlpha);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
// container opacity
|
|
|
|
|
CInterfaceGroup* container = dynamic_cast<CInterfaceGroup*>(groupContextHelp->findFromShortId("border"));
|
|
|
|
|
if (container)
|
|
|
|
|
container->setAlpha(_ContextHelpContainerAlpha);
|
|
|
|
|
|
|
|
|
|
// draw the tooltip
|
|
|
|
|
groupContextHelp->executeLuaScriptOnDraw();
|
|
|
|
|
groupContextHelp->draw ();
|
|
|
|
|
// flush layers
|
|
|
|
@ -3374,17 +3338,11 @@ namespace NLGUI
|
|
|
|
|
nlassert(_GlobalContentRolloverFactorDB);
|
|
|
|
|
_GlobalContainerRolloverFactorDB = CDBManager::getInstance()->getDbProp("UI:SAVE:CONTAINER_ROLLOVER_FACTOR");
|
|
|
|
|
nlassert(_GlobalContainerRolloverFactorDB);
|
|
|
|
|
_ContextHelpContentAlphaDB = CDBManager::getInstance()->getDbProp("UI:SAVE:CONTEXT_HELP_CONTENT_ALPHA");
|
|
|
|
|
nlassert(_ContextHelpContentAlphaDB);
|
|
|
|
|
_ContextHelpContainerAlphaDB = CDBManager::getInstance()->getDbProp("UI:SAVE:CONTEXT_HELP_CONTAINER_ALPHA");
|
|
|
|
|
nlassert(_ContextHelpContainerAlphaDB);
|
|
|
|
|
}
|
|
|
|
|
_GlobalContentAlpha = (uint8)_GlobalContentAlphaDB->getValue32();
|
|
|
|
|
_GlobalContainerAlpha = (uint8)_GlobalContainerAlphaDB->getValue32();
|
|
|
|
|
_GlobalRolloverFactorContent = (uint8)_GlobalContentRolloverFactorDB->getValue32();
|
|
|
|
|
_GlobalRolloverFactorContainer = (uint8)_GlobalContainerRolloverFactorDB->getValue32();
|
|
|
|
|
_ContextHelpContentAlpha = (uint8)_ContextHelpContentAlphaDB->getValue32();
|
|
|
|
|
_ContextHelpContainerAlpha = (uint8)_ContextHelpContainerAlphaDB->getValue32();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void CWidgetManager::resetGlobalAlphasProps()
|
|
|
|
@ -3393,8 +3351,6 @@ namespace NLGUI
|
|
|
|
|
_GlobalContainerAlphaDB = NULL;
|
|
|
|
|
_GlobalContentRolloverFactorDB = NULL;
|
|
|
|
|
_GlobalContainerRolloverFactorDB = NULL;
|
|
|
|
|
_ContextHelpContentAlphaDB = NULL;
|
|
|
|
|
_ContextHelpContainerAlphaDB = NULL;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void CWidgetManager::registerNewScreenSizeHandler( INewScreenSizeHandler *handler )
|
|
|
|
@ -3928,8 +3884,6 @@ namespace NLGUI
|
|
|
|
|
_GlobalRolloverFactorContent = 255;
|
|
|
|
|
_GlobalRolloverFactorContainer = 255;
|
|
|
|
|
_AlphaRolloverSpeedDB = NULL;
|
|
|
|
|
_ContextHelpContentAlpha = 255;
|
|
|
|
|
_ContextHelpContainerAlpha = 255;
|
|
|
|
|
|
|
|
|
|
_MouseHandlingEnabled = true;
|
|
|
|
|
_MouseOverWindow = false;
|
|
|
|
|