UI Button to Hide Player and HUD
using { /Fortnite.com/Devices }
using { /Fortnite.com/UI }
using { /Fortnite.com/Characters }
using { /Fortnite.com/Playspaces }
using { /Verse.org/Simulation }
using { /UnrealEngine.com/Temporary/Diagnostics }
using { /UnrealEngine.com/Temporary/UI }
using { /UnrealEngine.com/Temporary/SpatialMath }
# Become Invisible /w Button
# Created 10.23.23 by Lex Dreitser
# See https://dev.ep/icgames.com/documentation/en-us/uefn/create-your-own-device-in-verse for how to create a verse device.
# A Verse-authored creative device that can be placed in a level
Game_Manager := class(creative_device):
@editable ButtonUI : button_device = button_device{}
TextForButton<localizes> : message = "Hide Player and HUD "
var PlayerCanvas : canvas = canvas {}
OnBegin<override>()<suspends>:void=
ButtonUI.InteractedWithEvent.Subscribe(HandleButtonPress) # Subscribe to Events for Button in Gameworld
CreateUI( ) : canvas =
ButtonForCanvas : button_loud = button_loud{DefaultText := TextForButton} # Style Button as seen in video
ButtonForCanvas.OnClick().Subscribe(HandleUIButtonClick) # Subscribe to Events for Button On UI
UICanvas : canvas = canvas:
Slots:= array:
canvas_slot: # Middle of Screen
Anchors := anchors{ Minimum:= vector2{X:=0.5,Y:=0.5}, Maximum:= vector2{X:=0.5,Y:=0.5} } # Mid Screen Anchor
Offsets := margin{ Top := 0.0, Left := 0.0, Right := 0.0, Bottom := 0.0 } # No Offset
Alignment := vector2{X:= 0.5, Y := 0.0} # Center Aligned
SizeToContent := true # AutoResize
Widget := ButtonForCanvas #
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.