Verse Library verse

07 Starting The Countdown

Defines the canvas layout and text block for displaying the remaining time on a player interface.

extracted-snippets/documentation/en-us/fortnite/making-a-custom-countdown-timer-using-verse/07-starting-the-countdown.verse

# Source URL: https://dev.epicgames.com/documentation/en-us/fortnite/making-a-custom-countdown-timer-using-verse
# Local doc:  epic-docs/documentation/en-us/fortnite/making-a-custom-countdown-timer-using-verse.md
# Section:    Starting the Countdown
countdown_timer := class:
block:
set Canvas = canvas:
Slots := array:
canvas_slot:
Anchors := anchors:
Minimum := vector2{X := 0.5, Y := 0.05}
Maximum := vector2{X := 0.5, Y := 0.05}
Alignment := vector2{X := 0.5, Y := 0.0}
Offsets := margin{Top := 0.0, Left := 0.0, Bottom := 0.0, Right := 0.0}
SizeToContent := true
Widget := RemainingTimeWidget
MaybePlayerUI : ?player_ui = false
var RemainingTime : float = 0.0
var Canvas : canvas = canvas{}
RemainingTimeWidget : text_block = text_block{DefaultTextColor := NamedColors.White}
RemainingTimeText<localizes>(CurrentRemainingTime : int) : message = "{CurrentRemainingTime}"

Comments

    Sign in to vote, comment, or suggest an edit. Sign in