Verse UI Canvas Element Properties
using { /Fortnite.com/Devices }
using { /Verse.org/Simulation }
using { /Fortnite.com/Characters }
using { /UnrealEngine.com/Temporary/UI }
using { /UnrealEngine.com/Temporary/SpatialMath }
using { /Verse.org/Colors }
using { /Fortnite.com/UI }
# Converts a Float number to a string, and truncate to a specific number of decimals
TruncateFloatString(Input:float, Decimals:int) : []char = {
var String : []char = ToString(Input)
if (DotIndex := String.Find['.']) {
StopIndex := if (Decimals > 0) { Min(DotIndex+Decimals+1,String.Length) } else { DotIndex }
if (FinalString := String.Slice[0, StopIndex]) {
return FinalString
}
}
return "NaN"
}
# Enum used to keep track of UI element actions
action_triggered := enum{
ResetValues
AnchorXMin
AnchorXMax
AnchorYMin
AnchorYMax
OffsetLeft
OffsetTop
OffsetRight
OffsetBottom
AlignmentX
AlignmentY
SquareSizeX
SquareSizeY
SizeToContentEnable
SizeToContentDisable
}
# The interface class for each player, containing all the variables and logic
elm_pos_interface := class() {
# The player that this interface belongs to, and a backreference to the device that created the class instnace
AssociatedDevice<public> : VD_UI_element_position_example
AssociatedPlayer<public> : player
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.