mirror of
https://port.numenaute.org/aleajactaest/khanat-code-old.git
synced 2024-12-26 02:20:54 +00:00
Merge with develop
This commit is contained in:
parent
031a1169ad
commit
2c94ec2e2d
3 changed files with 26 additions and 8 deletions
|
@ -572,7 +572,15 @@ namespace NLGUI
|
|||
return "";
|
||||
return _LinkClass.back().c_str();
|
||||
}
|
||||
|
||||
|
||||
std::vector<bool> _BlockLevelElement;
|
||||
inline const bool isBlockLevelElement() const
|
||||
{
|
||||
if (_BlockLevelElement.empty())
|
||||
return false;
|
||||
return _BlockLevelElement.back();
|
||||
}
|
||||
|
||||
// Divs (i.e. interface group)
|
||||
std::vector<class CInterfaceGroup*> _Divs;
|
||||
inline CInterfaceGroup *getDiv() const
|
||||
|
|
|
@ -1145,6 +1145,7 @@ namespace NLGUI
|
|||
|
||||
case HTML_DIV:
|
||||
{
|
||||
_BlockLevelElement.push_back(true);
|
||||
registerAnchorName(MY_HTML_DIV);
|
||||
|
||||
if (present[MY_HTML_DIV_NAME] && value[MY_HTML_DIV_NAME])
|
||||
|
@ -1204,6 +1205,8 @@ namespace NLGUI
|
|||
inst->setPosRef(Hotspot_TL);
|
||||
inst->setParentPosRef(Hotspot_TL);
|
||||
getDiv()->addGroup(inst);
|
||||
|
||||
_BlockLevelElement.back() = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -1220,6 +1223,11 @@ namespace NLGUI
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (isBlockLevelElement())
|
||||
{
|
||||
newParagraph(0);
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
|
@ -2118,12 +2126,20 @@ namespace NLGUI
|
|||
popIfNotEmpty (_GlobalColor);
|
||||
endParagraph();
|
||||
break;
|
||||
case HTML_P:
|
||||
endParagraph();
|
||||
break;
|
||||
case HTML_PRE:
|
||||
popIfNotEmpty (_PRE);
|
||||
break;
|
||||
case HTML_DIV:
|
||||
if (isBlockLevelElement())
|
||||
{
|
||||
endParagraph();
|
||||
}
|
||||
_DivName = "";
|
||||
popIfNotEmpty (_Divs);
|
||||
popIfNotEmpty (_BlockLevelElement);
|
||||
break;
|
||||
|
||||
case HTML_TABLE:
|
||||
|
@ -4138,9 +4154,7 @@ namespace NLGUI
|
|||
group->setSizeRef(CInterfaceElement::width);
|
||||
|
||||
// Compute begin space between paragraph and tables
|
||||
|
||||
// * If first in group, no begin space
|
||||
// * If behind a paragraph, take the biggest begin space between the previous paragraph and current one.
|
||||
|
||||
// Pointer on the current paragraph (can be a table too)
|
||||
CGroupParagraph *p = dynamic_cast<CGroupParagraph*>(group);
|
||||
|
@ -4162,11 +4176,6 @@ namespace NLGUI
|
|||
group->setParentPos(groups.back());
|
||||
group->setPosRef(Hotspot_TL);
|
||||
group->setParentPosRef(Hotspot_BL);
|
||||
|
||||
// Begin space for previous paragraph
|
||||
CGroupParagraph *previous = dynamic_cast<CGroupParagraph*>(groups.back());
|
||||
if (previous)
|
||||
beginSpace = std::max(beginSpace, previous->getTopSpace());
|
||||
}
|
||||
|
||||
// Set the begin space
|
||||
|
|
|
@ -232,4 +232,5 @@ void CChatTextManager::reset ()
|
|||
_TextFontSize = NULL;
|
||||
_TextMultilineSpace = NULL;
|
||||
_TextShadowed = NULL;
|
||||
_ShowTimestamps = NULL;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue