Commit 2d1a7e6e authored by edo9300's avatar edo9300 Committed by GitHub

Cursor change in menu

parent 06b15b1c
...@@ -32,6 +32,22 @@ bool MenuHandler::OnEvent(const irr::SEvent& event) { ...@@ -32,6 +32,22 @@ bool MenuHandler::OnEvent(const irr::SEvent& event) {
irr::gui::IGUIElement* caller = event.GUIEvent.Caller; irr::gui::IGUIElement* caller = event.GUIEvent.Caller;
s32 id = caller->getID(); s32 id = caller->getID();
switch(event.GUIEvent.EventType) { switch(event.GUIEvent.EventType) {
case irr::gui::EGET_ELEMENT_HOVERED: {
// Set cursor to an I-Beam if hovering over an edit box
if (event.GUIEvent.Caller->getType() == EGUIET_EDIT_BOX)
{
utils.changeCursor(ECI_IBEAM);
}
break;
}
case irr::gui::EGET_ELEMENT_LEFT: {
// Set cursor to normal if left an edit box
if (event.GUIEvent.Caller->getType() == EGUIET_EDIT_BOX)
{
utils.changeCursor(ECI_NORMAL);
}
break;
}
case irr::gui::EGET_BUTTON_CLICKED: { case irr::gui::EGET_BUTTON_CLICKED: {
switch(id) { switch(id) {
case BUTTON_MODE_EXIT: { case BUTTON_MODE_EXIT: {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment