UMG Button Hover Event

So… since I’m not using the mouse (line tracing in VR), I’m trying to find our where the code that handles switching between normal, hover, pressed, and disabled is. Anyone have any idea where that is or how it works? I did see an example in blueprints, which I can port over to code, that seems to just swap the button’s styles - is that correct?

Here is a quick example I just typed up right now:

void MyOnHoverFunc(bool state)
{
    if (state)
        MyButton->WidgetStyle.Normal = CachedWidgetStyle.Hovered;
    else
        MyButton->WidgetStyle.Normal = CachedWidgetStyle.Normal;
}

Is this the way to do it?

Thanks all!

  • Austin

I building mobile application and I need disable hover functionality not changing its style. Hover on mobile platform gives strange behavior wan using scroll box etc.