Class GameWidgetBase
Namespace: WukongMp.Api.UI
Assembly: WukongMp.Api.dll
Base class for UI widgets defined in .pak files.
public abstract class GameWidgetBase
Inheritanceâ
object â GameWidgetBase
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.