mirror of
https://github.com/minetest/minetest.git
synced 2025-01-23 06:21:36 +01:00
Fix tooltips for dropdown, scrollbar and more (#12747)
This commit is contained in:
parent
f8bb0cd3d1
commit
b9f6832347
@ -3643,13 +3643,21 @@ void GUIFormSpecMenu::drawMenu()
|
|||||||
#endif
|
#endif
|
||||||
bool hovered_element_found = false;
|
bool hovered_element_found = false;
|
||||||
|
|
||||||
if (hovered != NULL) {
|
if (hovered) {
|
||||||
if (m_show_debug) {
|
if (m_show_debug) {
|
||||||
core::rect<s32> rect = hovered->getAbsoluteClippingRect();
|
core::rect<s32> rect = hovered->getAbsoluteClippingRect();
|
||||||
driver->draw2DRectangle(0x22FFFF00, rect, &rect);
|
driver->draw2DRectangle(0x22FFFF00, rect, &rect);
|
||||||
}
|
}
|
||||||
|
|
||||||
s32 id = hovered->getID();
|
// find the formspec-element of the hovered IGUIElement (a parent)
|
||||||
|
s32 id;
|
||||||
|
for (gui::IGUIElement *hovered_fselem = hovered; hovered_fselem;
|
||||||
|
hovered_fselem = hovered_fselem->getParent()) {
|
||||||
|
id = hovered_fselem->getID();
|
||||||
|
if (id != -1)
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
u64 delta = 0;
|
u64 delta = 0;
|
||||||
if (id == -1) {
|
if (id == -1) {
|
||||||
m_old_tooltip_id = id;
|
m_old_tooltip_id = id;
|
||||||
|
Loading…
Reference in New Issue
Block a user