Table of Contents
This custom HUD class can easily be replace with your own, new or existing, HUD class. The functionality in here is meant to organize all the various widgets and UI elements used by the kit.
This class implements the following Blueprint Interfaces and functions/events:
- BPI_ShopUI
-
DisplayDockingPrompt
-
HideDockingPrompt
-
HideUndockPrompt
-
DisplayUndockPrompt
-
CloseShopUI
-
OpenOutfittingUI
-
CloseOutfittingUI
-
OpenShopUI
BeginPlay
The Begin Play event is used here simply to create all the widgets used my the Modular Spaceship Stat System and store references to them for future use, as well as set their initial visibility. This should be pretty straightforward to understand and can be dissected to create these widgets more dynamically or eloquently based on your projects needs.
Interface Events
This is simply a collection of the various interface functions. The names should be pretty straightforward as to what they do. An important note is that on opening certain UI elements we also perform the function SetValues as we don't use bindings for values to avoid checking every tick. The SetValues Function is on most widgets to set their relevant information whenever needed, such as opening the Shop UI.
OpenShopUI
This interface event is a little different since it has an output reference to the Shop Interface Widget, which is used to create a reference elsewhere for hiding and showing the UI. This interface function simply sets a boolean IsShopOpen? to true and performs the SetupShopLists function on the Shop Interface widget. This function is covered in the Shop UI documenation.