World Text Word Widget
Introduction
The widget used to display a word in the world
Required Widgets
There is already a WorldTextWordWidget_Implementation
that you can use in your projects. But if you create your own instance of this widget, you need to add the following before you can compile:
Name | Description | Type |
---|---|---|
Container | The container for all the letters | UHorizontalBox* |
API Reference
Properties
Property | Description | Type | Default Value |
---|
Functions
Name | Description | Params | Return |
---|---|---|---|
InitializeWord | Initialize the word | Text (UWorldTextWidget*) The parent world text widget Word (FString) The word to display |
|
UpdateNextWord | Update the reference to the next word in the text | Word (UWorldTextWordWidget*) The next word in the text |
|
Show | Show the word | ||
ShowNextWord | Show the next word | ||
Destroy | Destroy the word widget |
Blueprint Usage
You can use the WorldTextWordWidget
using Blueprints by adding one of the following nodes:
- Ultimate Starter Kit > Narrative > Initialize Word
- Ultimate Starter Kit > Narrative > Update Next Word
- Ultimate Starter Kit > Narrative > Show
- Ultimate Starter Kit > Narrative > Show Next Word
- Ultimate Starter Kit > Narrative > Destroy
C++ Usage
Before you can use the plugin, you first need to enable the plugin in your Build.cs
file:
PublicDependencyModuleNames.Add("USK");
The WorldTextWordWidget
can now be used in any of your C++ files:
#include "USK/Narrative/WorldTextWordWidget.h"
void ATestActor::Test()
{
// WorldTextWordWidget is a pointer to the UWorldTextWordWidget
WorldTextWordWidget->InitializeWord(Text, Word);
WorldTextWordWidget->UpdateNextWord(Word);
WorldTextWordWidget->Show();
WorldTextWordWidget->ShowNextWord();
WorldTextWordWidget->Destroy();
}