Handling UIElement events in UE5
Posted: 19 Dec 2023, 15:39
Hello, I have a simple question. Is there a way how to listen on UIElement events and handle them in UE5 c++ class while still getting event arguments like this?
Registering the callback in XAML would look something like this:
I know how to listen on them like this using Behaviors, but in some cases, I need context of that view object.
Thank you
Code: Select all
void UMyUnrealView::OnMouseWheel(BaseComponent* component, const Noesis::MouseWheelEventArgs& e)
{
// Do some stuff
return;
}
Code: Select all
<Canvas MouseWheel="OnMouseWheel">
...
</Canvas>
Thank you