Verse Utilities
GUtility<public> := module:
using { /Verse.org/Simulation }
WidgetCore<public> := module:
using { /UnrealEngine.com/Temporary/UI }
common_widget_interface<public> := interface:
Player<public>:player
common_widget_base<public> := class<abstract><castable>(common_widget_interface):
var<private> CurrentCanvas<public>:?canvas = false
RemoveUIEvent<public>:event() = event(){}
AddGameplayUI<public>():void=
if(PlayerUI := GetPlayerUI[Player], not HasCanvas[]):
NewCanvas := CreateCanvas()
PlayerUI.AddWidget(NewCanvas)
set CurrentCanvas = option{NewCanvas}
spawn{RunInternal()}
AddInteractUI<public>():void=
if(PlayerUI := GetPlayerUI[Player], not HasCanvas[]):
NewCanvas := CreateCanvas()
PlayerUI.AddWidget(NewCanvas, player_ui_slot{InputMode := ui_input_mode.All})
set CurrentCanvas = option{NewCanvas}
spawn{RunInternal()}
RemoveUI<public>():void=
if(PlayerUI := GetPlayerUI[Player], TargetCanvas := CurrentCanvas?):
PlayerUI.RemoveWidget(TargetCanvas)
set CurrentCanvas = false
RemoveUIEvent.Signal()
You're reading a preview
The full reference is free for BrainDeadGuild Discord members — sign in to read it all, or open the original at the source.
Sign in with your BrainDead.TV / BrainDeadGuild Discord account for full access.