Verse Library verse

03 Managing Overall Ui

Central controller managing canvases, localizable text, and button references for an interactive mini game.

extracted-snippets/documentation/en-us/uefn/verse-starter-template-5-controlling-npc-with-ui-in-unreal-editor-for-fortnite/03-managing-overall-ui.verse

# Source URL: https://dev.epicgames.com/documentation/en-us/uefn/verse-starter-template-5-controlling-npc-with-ui-in-unreal-editor-for-fortnite
# Local doc:  epic-docs/documentation/en-us/uefn/verse-starter-template-5-controlling-npc-with-ui-in-unreal-editor-for-fortnite.md
# Section:    Managing Overall UI
# This file contains all the code to create and modify the UI
# in the Verse Commander minigame.
# The UI for the game contains:
#  - Buttons that map to commands for the NPC: forward, turn left, turn right.
#  - An execute button that tells the NPC to perform the queue of commands.
#  - A remove button that removes the last command added.
#  - A reset button that resets the current board and clears out the command queue.
#  - A dynamic list of commands that grows wider when a player adds commands and shrinks when a player removes commands.

using { /Fortnite.com/Devices }
using { /Fortnite.com/UI }
using { /UnrealEngine.com/Temporary/Diagnostics }
using { /UnrealEngine.com/Temporary/UI }
using { /UnrealEngine.com/Temporary/SpatialMath }
using { /Verse.org/Colors }
using { /Verse.org/Assets }
using { /Verse.org/Simulation }

# This text is localizable and must be a message type to be used in Verse UI.
ForwardText<localizes>:message = "Forward"
TurnRightText<localizes>:message = "Turn Right"
TurnLeftText<localizes>:message = "Turn Left"
RemoveText<localizes>:message = "Remove"
ExecuteText<localizes>:message = "Execute"
ResetText<localizes>:message = "Reset"
PlaceholderText<localizes>:message = ""

Sign in free to read the full source 🌴

This Verse Library file is members-only. Create a free account to view the complete source and download the .verse file.

Sign in with Discord

Comments

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