Hi Axel,
I haven’t played around with it on my side yet, but looking at the UI API, inside Fortnite.digest.verse and EpicGames.digest.verse:
-
text_button_base.OnClickcanSubscribea function that receives awidget_message. -
widget_messageis defined as
widget_message<native><public> := struct:
Player<native><public>:player
Source<native><public>:widget
This means you should be able to use the Player reference to the player that clicked the button for further processing.
ButtonTest:button_regular = button_regular{DefaultText:="ClickMe"}
OnButtonClicked(Message:widget_message):void=
# Operate on Message.Player
OnBegin<override>()<suspends>:void=
ButtonTest.OnClick.Subscribe(OnButtonClicked)