Widget
Introduction
Widget used to display a dialogue
Dependencies
The DialogueTransitionType
relies on other components of this plugin to work:
- Logger: Used to log useful information to help you debug any issues you might experience
Required Widgets
You need to add the following before you can compile the DialogueTransitionType
widget:
Name | Description | Type |
---|---|---|
DialogueTitle | The text block used to display the dialogue title | UTextBlock* |
DialogueText | The text block used to display the dialogue text | URichTextBlock* |
ChoiceMenu | The menu used to display the dialogue choices | UMenu* |
Optional Widgets
You can add the following widgets to enable extra functionality:
Name | Description | Type |
---|---|---|
ParticipantPortrait | The image used to display the portrait image of the participant | UImage* |
ParticipantPortraitBorder | The border image displayed around the portrait image of the participant | UImage* |
SkipEntryImage | The image displayed when the dialogue entry is completed | UImage* |
API Reference
Properties
Property | Description | Type | Default Value |
---|---|---|---|
ChoiceMenuItemClass | The class for all choice menu items | TSubclassOf<UMenuItem> | |
RichTextStyle | The rich text style applied to the dialogue text | UDataTable* | nullptr |
Events
Name | Description | Params |
---|---|---|
OnChoiceSelected | Event used to notify other classes when a choice is selected | Index (int) The index of the choice that was selected |
Functions
Name | Description | Params | Return |
---|---|---|---|
UpdateEntry | Update the current entry and refresh the UI | Entry (UDialogueEntry*) The new dialogue entry |
|
SkipEntry | Skip the current entry | bool A boolean value indicating if the entry was skipped |
Blueprint Usage
You can use the DialogueTransitionType
using Blueprints by adding one of the following nodes:
- Ultimate Starter Kit > UI > Update Entry
- Ultimate Starter Kit > UI > Skip Entry
C++ Usage
Before you can use the plugin, you first need to enable the plugin in your Build.cs
file:
PublicDependencyModuleNames.Add("USK");
The DialogueTransitionType
can now be used in any of your C++ files:
#include "USK/Dialogue/DialogueWidget.h"
void ATestActor::Test()
{
// DialogueTransitionType is a pointer to the EDialogueTransitionType
DialogueTransitionType->UpdateEntry(Entry);
bool SkipEntryValue = DialogueTransitionType->SkipEntry();
}