|
|
|
@ -350,7 +350,7 @@ namespace NLGUI
|
|
|
|
|
void CGroupHTML::TextureDownloadCB::finish()
|
|
|
|
|
{
|
|
|
|
|
// tmpdest file does not exist if download skipped (ie cache was used)
|
|
|
|
|
if (CFile::fileExists(tmpdest) && CFile::getFileSize(tmpdest) == 0)
|
|
|
|
|
if (CFile::fileExists(tmpdest) && CFile::getFileSize(tmpdest) > 0)
|
|
|
|
|
{
|
|
|
|
|
if (CFile::fileExists(dest))
|
|
|
|
|
CFile::deleteFile(dest);
|
|
|
|
@ -2551,7 +2551,7 @@ namespace NLGUI
|
|
|
|
|
(embolden == text->getEmbolden()) &&
|
|
|
|
|
(style.FontOblique == text->getOblique()) &&
|
|
|
|
|
(getLink() == text->Link) &&
|
|
|
|
|
(style.GlobalColor == text->getModulateGlobalColor());
|
|
|
|
|
(style.GlobalColorText == text->getModulateGlobalColor());
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// ***************************************************************************
|
|
|
|
@ -2588,7 +2588,10 @@ namespace NLGUI
|
|
|
|
|
nlinfo("Text button template '%s' is missing :button or :b text element", tpl.c_str());
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
ctrlButton->setModulateGlobalColorAll(false);
|
|
|
|
|
ctrlButton->setModulateGlobalColorAll(_Style.Current.GlobalColor);
|
|
|
|
|
ctrlButton->setTextModulateGlobalColorNormal(_Style.Current.GlobalColorText);
|
|
|
|
|
ctrlButton->setTextModulateGlobalColorOver(_Style.Current.GlobalColorText);
|
|
|
|
|
ctrlButton->setTextModulateGlobalColorPushed(_Style.Current.GlobalColorText);
|
|
|
|
|
|
|
|
|
|
// Translate the tooltip
|
|
|
|
|
ctrlButton->setText(text);
|
|
|
|
@ -2619,7 +2622,7 @@ namespace NLGUI
|
|
|
|
|
newLink->setText(text);
|
|
|
|
|
newLink->setMultiLineSpace((uint)((float)(_Style.Current.FontSize)*LineSpaceFontFactor));
|
|
|
|
|
newLink->setMultiLine(true);
|
|
|
|
|
newLink->setModulateGlobalColor(_Style.Current.GlobalColor);
|
|
|
|
|
newLink->setModulateGlobalColor(_Style.Current.GlobalColorText);
|
|
|
|
|
setTextStyle(newLink, _Style.Current);
|
|
|
|
|
|
|
|
|
|
registerAnchor(newLink);
|
|
|
|
@ -3073,6 +3076,7 @@ namespace NLGUI
|
|
|
|
|
_IgnoreHeadTag = false;
|
|
|
|
|
_IgnoreBaseUrlTag = false;
|
|
|
|
|
_AutoIdSeq = 0;
|
|
|
|
|
m_TableRowBackgroundColor.clear();
|
|
|
|
|
|
|
|
|
|
paragraphChange ();
|
|
|
|
|
|
|
|
|
@ -4117,6 +4121,22 @@ namespace NLGUI
|
|
|
|
|
|
|
|
|
|
void CGroupHTML::draw ()
|
|
|
|
|
{
|
|
|
|
|
uint8 CurrentAlpha = 255;
|
|
|
|
|
// search a parent container
|
|
|
|
|
CInterfaceGroup *gr = getParent();
|
|
|
|
|
while (gr)
|
|
|
|
|
{
|
|
|
|
|
if (gr->isGroupContainer())
|
|
|
|
|
{
|
|
|
|
|
CGroupContainer *gc = static_cast<CGroupContainer *>(gr);
|
|
|
|
|
CurrentAlpha = gc->getCurrentContainerAlpha();
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
gr = gr->getParent();
|
|
|
|
|
}
|
|
|
|
|
m_HtmlBackground.CurrentAlpha = CurrentAlpha;
|
|
|
|
|
m_BodyBackground.CurrentAlpha = CurrentAlpha;
|
|
|
|
|
|
|
|
|
|
m_HtmlBackground.draw();
|
|
|
|
|
m_BodyBackground.draw();
|
|
|
|
|
CGroupScrollText::draw ();
|
|
|
|
@ -5247,6 +5267,9 @@ namespace NLGUI
|
|
|
|
|
if (ctrlButton)
|
|
|
|
|
{
|
|
|
|
|
ctrlButton->setModulateGlobalColorAll (_Style.Current.GlobalColor);
|
|
|
|
|
ctrlButton->setTextModulateGlobalColorNormal(_Style.Current.GlobalColorText);
|
|
|
|
|
ctrlButton->setTextModulateGlobalColorOver(_Style.Current.GlobalColorText);
|
|
|
|
|
ctrlButton->setTextModulateGlobalColorPushed(_Style.Current.GlobalColorText);
|
|
|
|
|
|
|
|
|
|
// Translate the tooltip
|
|
|
|
|
if (!tooltip.empty())
|
|
|
|
@ -6601,20 +6624,11 @@ namespace NLGUI
|
|
|
|
|
// ***************************************************************************
|
|
|
|
|
void CGroupHTML::htmlTD(const CHtmlElement &elm)
|
|
|
|
|
{
|
|
|
|
|
CRGBA rowColor = CRGBA::Transparent;
|
|
|
|
|
// remember row color so we can blend it with cell color
|
|
|
|
|
if (!_CellParams.empty())
|
|
|
|
|
rowColor = _CellParams.back().BgColor;
|
|
|
|
|
|
|
|
|
|
// Get cells parameters
|
|
|
|
|
getCellsParameters(elm, true);
|
|
|
|
|
|
|
|
|
|
// if cell has own background,then it must be blended with row
|
|
|
|
|
if (rowColor.A > 0 && _Style.Current.Background.color.A < 255)
|
|
|
|
|
{
|
|
|
|
|
_Style.Current.Background.color.blendFromui(rowColor,
|
|
|
|
|
_Style.Current.Background.color, _Style.Current.Background.color.A);
|
|
|
|
|
}
|
|
|
|
|
if (!m_TableRowBackgroundColor.empty() && m_TableRowBackgroundColor.back().A > 0)
|
|
|
|
|
_Style.Current.Background.color.blendFromui(m_TableRowBackgroundColor.back(), _Style.Current.Background.color, _Style.Current.Background.color.A);
|
|
|
|
|
|
|
|
|
|
if (elm.ID == HTML_TH)
|
|
|
|
|
{
|
|
|
|
@ -6830,6 +6844,9 @@ namespace NLGUI
|
|
|
|
|
// Get cells parameters
|
|
|
|
|
getCellsParameters(elm, true);
|
|
|
|
|
|
|
|
|
|
m_TableRowBackgroundColor.push_back(_CellParams.back().BgColor);
|
|
|
|
|
_CellParams.back().BgColor = CRGBA::Transparent;
|
|
|
|
|
|
|
|
|
|
// TODO: this probably ends up in first cell
|
|
|
|
|
renderPseudoElement(":before", elm);
|
|
|
|
|
|
|
|
|
@ -6844,6 +6861,7 @@ namespace NLGUI
|
|
|
|
|
renderPseudoElement(":after", elm);
|
|
|
|
|
|
|
|
|
|
popIfNotEmpty(_CellParams);
|
|
|
|
|
popIfNotEmpty(m_TableRowBackgroundColor);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// ***************************************************************************
|
|
|
|
|