Fix supertip flicker; enable supertip border

This commit is contained in:
Jean-Patrick Guerrero 2024-06-07 08:30:01 +02:00 committed by Wuzzy
parent b207351c41
commit 4fcf9797aa
2 changed files with 8 additions and 3 deletions

@ -1121,7 +1121,7 @@ void GUIHyperText::setStyles(const std::array<StyleSpec, StyleSpec::NUM_STATES>
ParsedText &text = m_drawer.getText();
text.background_middle = style.getRect(StyleSpec::BGIMG_MIDDLE, core::rect<s32>());
text.border = style.getBool(StyleSpec::BORDER, false);
text.border = style.getBool(StyleSpec::BORDER, true);
setNotClipped(style.getBool(StyleSpec::NOCLIP, true));
if (text.background_type != text.BackgroundType::BACKGROUND_COLOR) {
@ -1236,8 +1236,11 @@ void GUIHyperText::draw()
m_vscrollbar->setPos(0);
m_vscrollbar->setVisible(false);
}
m_drawer.draw(AbsoluteClippingRect,
m_display_text_rect.UpperLeftCorner + m_text_scrollpos);
if (m_drawer_ready)
m_drawer.draw(AbsoluteClippingRect,
m_display_text_rect.UpperLeftCorner + m_text_scrollpos);
else
m_drawer_ready = true;
// draw children
IGUIElement::draw();

@ -235,4 +235,6 @@ class GUIHyperText : public gui::IGUIElement
ParsedText::Element *getElementAt(s32 X, s32 Y);
void checkHover(s32 X, s32 Y);
bool m_drawer_ready = false;
};