S_UIPopUp
Structure
Variable Name |
Type |
Editable |
Description |
UI Actor |
Actor Class Reference |
yes |
A class reference to an Actor with a Widget Component . |
MinDistanceFromPlayer |
Float |
yes |
The minimum distance between the Actor that owns the BPC_UIPopUpHandler component and the widget Actor . |
MaxDistanceFromPlayer |
Float |
yes |
The maximum distance between the Actor that owns the BPC_UIPopUpHandler component and the widget Actor . |
HorizontalOffset |
Float |
yes |
A horizontal location offset from the Actor that owns the BPC_UIPopUpHandler component. |
VerticalOffset |
Float |
yes |
A vertical location offset from the Actor that owns the BPC_UIPopUpHandler component |
Scale |
Vector |
yes |
The scale of the widget Actor . |
CollisionTraceRadius |
Float |
yes |
The radius of the sphere trace used to determine if the widget Actor will collide with a WorldStatic or PhysicsBody object when its transform is updated. |
DT_UIPopUp
Data Table

Figure 1: DT_UIPopUp Contents
BPC_UIPopUpHandler
Functions
Function Name |
Parameters |
Return |
Privacy |
Description |
SetPopUpVisibilityByRowName |
PopUpRowNames (Name) , bIsHidden (Boolean) |
|
private |
Searches for the specified PopUpRowName in the PopUps map and adjusts the visibility of its associated actor to the value specified by bIsHidden . |

Figure 2: SetPopUpVisibilityByRowName Code
Function Name |
Parameters |
Return |
Privacy |
Description |
GetPopUpTransform |
PopUpRowName (Name) , |
NewTransform (Transform) |
private |
Calculates the new transform for the UI Actor associated with the specified PopUpRowName . The new transform is derived from the data in DT_UIPopUp linked to PopUpRowName . The new location will be set to the hit location of a sphere trace which traces against WorldStatic or PhysicsBody objects. This is done to prevent it from spawning behind walls or inside other Actors . The trace start and end location is defined by the row data in DT_UIPopUp . The new rotation is set to the yaw of the look at rotation between the widget Actor and the owner Actor . This will ensure that the widget will face the owner when it pops up in the world. Lastly, the new scale is set to the Scale variable defined by the row data in DT_UIPopUp . |

Figure 3: GetPopUpTransform Code
Function Name |
Parameters |
Return |
Privacy |
Description |
SetPopUpTransform |
PopUpRowName (Name) |
|
private |
This function will call GetPopUpTransform and applies the resulting transform to the widget Actor . The widget Actor is retrieved from the PopUps map using PopUpRowName as the key. |

Figure 4: SetPopUpTransform Code
Function Name |
Parameters |
Return |
Privacy |
Description |
PoolAllPopUps |
|
|
private |
Retrieves all rows from DT_UIPopUps , spawns the widget Actor defined in each row into the game world. The function stores the row name and spawned Actors in a map named PopUps , using the row name as the key and the widget Actor as the value. Finally, it sets all widget Actors to be hidden in the game. |

Figure 5: PoolAllPopUps Code
Events
Name |
Parameters |
Description |
EventBeginPlay |
|
Calls PoolAllPopUps to pool the pop-up UIs. |

Figure 5: EventBeginPlay Code
Name |
Parameters |
Description |
ShowPopupByRowName |
PopupRowName(Name) , Duration (Float) |
Shows pop-up for a set amount of time. PopupRowName is the name of the UI to pop-up. This is the row name of the UI in DT_UIPopups . Duration is the number of seconds the UI will show before disappearing. |