[ REPOST ] Override Child Widget Function/Event?

anonymous_user_3ad9ae12
Mon, 19 Jul 2021 02:15:18 +0000
UI

Hi Unreal Community!

For a piece of UI I’m making (I’ll call it “Widget1”), I want it to have 3 child widgets, all of which inherit from a “HUD_Button” class that has some built-in functionality I want. However, I also want each child to create a different menu when it is clicked. Is it possible to override the OnClicked, OnPressed, etc. functions of the button widget from each child widget, in Widget1? If not, is it possible to override a custom event? (which I could set up to run on the button event)

Link to the original thread:

https://answers.unrealengine.com/questions/1040949/view.html

To clarify, I’m asking: is there a way to override (in “Widget1”) a function that is defined on the source widget of the “child” in the hierarchy? e.g. I have a function called “ButtonPressed”, called when the button within the source widget is pressed, the behavior of which I want to customize for each instance of the source widget within “Widget1”.

(I’m not asking about inherited widget classes, but about instances of a widget class that are “parented” in the hierarchy)

2 posts - 1 participant