Class GameWidgetBase
Namespace: WukongMp.Api.UI
Assembly: WukongMp.Api.dll
Base class for UI widgets defined in .pak files.
public abstract class GameWidgetBase
Inheritance
Inherited Members
object.GetType(), object.MemberwiseClone(), object.ToString(), object.Equals(object?), object.Equals(object?, object?), object.ReferenceEquals(object?, object?), object.GetHashCode()
Constructors
GameWidgetBase(string)
Base class for UI widgets defined in .pak files.
protected GameWidgetBase(string path)
Parameters
path string
The path to the widget, relative to the "Content/UI" folder in the .pak files. For example, for a widget located at "Content/UI/MyWidget.uasset", the path would be "MyWidget".
Fields
GameWidget
protected UUserWidget? GameWidget
Field Value
UUserWidget?
Methods
Deinitialize()
Removes the widget from the viewport and sets the reference to null.
public void Deinitialize()
Initialize()
Initializes the widget by trying to find it first, and if it doesn't exist, spawns a new one.
public void Initialize()
PostInitialize()
protected abstract void PostInitialize()
SetVisibility(bool)
Set the visibility of the widget. This requires the widget to be initialized first, otherwise it will do nothing.
public virtual void SetVisibility(bool visible)
Parameters
visible bool
Whether the widget should be visible or not.