how i create this code in ue4 OnButtonClicked():
Set CurrentButtonClicked = ClickedButtonNumber
IF CurrentButtonClicked == 0:
DefaultAction() // Perform default action for the first button (Button 1 logic)
ELSE:
HidePreviousData() // Hide previous data from the scroll box
IF CurrentButtonClicked == 1:
AddChildWidgetForButton2() // Add specific data for Button 2
ELSE IF CurrentButtonClicked == 2:
AddChildWidgetForButton3() // Add specific data for Button 3
// Add more conditions for additional buttons as needed
ELSE:
// Handle other button clicks or default action