forked from Mirrorlandia_minetest/minetest
Fix cursor still visible after closing formspec while on HyperText (#9583)
This commit is contained in:
parent
307d7376cf
commit
86a0e991ef
@ -1054,12 +1054,14 @@ void GUIHyperText::checkHover(s32 X, s32 Y)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifndef HAVE_TOUCHSCREENGUI
|
||||||
if (m_drawer.m_hovertag)
|
if (m_drawer.m_hovertag)
|
||||||
RenderingEngine::get_raw_device()->getCursorControl()->setActiveIcon(
|
RenderingEngine::get_raw_device()->getCursorControl()->setActiveIcon(
|
||||||
gui::ECI_HAND);
|
gui::ECI_HAND);
|
||||||
else
|
else
|
||||||
RenderingEngine::get_raw_device()->getCursorControl()->setActiveIcon(
|
RenderingEngine::get_raw_device()->getCursorControl()->setActiveIcon(
|
||||||
gui::ECI_NORMAL);
|
gui::ECI_NORMAL);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
bool GUIHyperText::OnEvent(const SEvent &event)
|
bool GUIHyperText::OnEvent(const SEvent &event)
|
||||||
@ -1075,8 +1077,12 @@ bool GUIHyperText::OnEvent(const SEvent &event)
|
|||||||
if (event.EventType == EET_GUI_EVENT &&
|
if (event.EventType == EET_GUI_EVENT &&
|
||||||
event.GUIEvent.EventType == EGET_ELEMENT_LEFT) {
|
event.GUIEvent.EventType == EGET_ELEMENT_LEFT) {
|
||||||
m_drawer.m_hovertag = nullptr;
|
m_drawer.m_hovertag = nullptr;
|
||||||
RenderingEngine::get_raw_device()->getCursorControl()->setActiveIcon(
|
#ifndef HAVE_TOUCHSCREENGUI
|
||||||
gui::ECI_NORMAL);
|
gui::ICursorControl *cursor_control =
|
||||||
|
RenderingEngine::get_raw_device()->getCursorControl();
|
||||||
|
if (cursor_control->isVisible())
|
||||||
|
cursor_control->setActiveIcon(gui::ECI_NORMAL);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
if (event.EventType == EET_MOUSE_INPUT_EVENT) {
|
if (event.EventType == EET_MOUSE_INPUT_EVENT) {
|
||||||
|
Loading…
Reference in New Issue
Block a user