mirror of
https://github.com/minetest/minetest.git
synced 2024-07-07 08:25:28 +02:00
Fix supertip flicker; enable supertip border
This commit is contained in:
parent
b207351c41
commit
4fcf9797aa
@ -1121,7 +1121,7 @@ void GUIHyperText::setStyles(const std::array<StyleSpec, StyleSpec::NUM_STATES>
|
|||||||
|
|
||||||
ParsedText &text = m_drawer.getText();
|
ParsedText &text = m_drawer.getText();
|
||||||
text.background_middle = style.getRect(StyleSpec::BGIMG_MIDDLE, core::rect<s32>());
|
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));
|
setNotClipped(style.getBool(StyleSpec::NOCLIP, true));
|
||||||
|
|
||||||
if (text.background_type != text.BackgroundType::BACKGROUND_COLOR) {
|
if (text.background_type != text.BackgroundType::BACKGROUND_COLOR) {
|
||||||
@ -1236,8 +1236,11 @@ void GUIHyperText::draw()
|
|||||||
m_vscrollbar->setPos(0);
|
m_vscrollbar->setPos(0);
|
||||||
m_vscrollbar->setVisible(false);
|
m_vscrollbar->setVisible(false);
|
||||||
}
|
}
|
||||||
m_drawer.draw(AbsoluteClippingRect,
|
if (m_drawer_ready)
|
||||||
m_display_text_rect.UpperLeftCorner + m_text_scrollpos);
|
m_drawer.draw(AbsoluteClippingRect,
|
||||||
|
m_display_text_rect.UpperLeftCorner + m_text_scrollpos);
|
||||||
|
else
|
||||||
|
m_drawer_ready = true;
|
||||||
|
|
||||||
// draw children
|
// draw children
|
||||||
IGUIElement::draw();
|
IGUIElement::draw();
|
||||||
|
@ -235,4 +235,6 @@ class GUIHyperText : public gui::IGUIElement
|
|||||||
|
|
||||||
ParsedText::Element *getElementAt(s32 X, s32 Y);
|
ParsedText::Element *getElementAt(s32 X, s32 Y);
|
||||||
void checkHover(s32 X, s32 Y);
|
void checkHover(s32 X, s32 Y);
|
||||||
|
|
||||||
|
bool m_drawer_ready = false;
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user