Credits Widget
Introduction
Widget used to display multiple animated credits entries using different alignment options and durations
Dependencies
The CreditsWidget
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 CreditsWidget
widget:
Name | Description | Type |
---|---|---|
Root | The root container of the widget | UPanelWidget* |
Container | The container used to display the credits entries | UPanelWidget* |
Text | The text block used to display the text of the credits entry | UTextBlock* |
Optional Widgets
You can add the following widgets to enable extra functionality:
Name | Description | Type |
---|---|---|
Title | The text block used to display the title of the credits entry | UTextBlock* |
Optional Animations
You can add the following widgets to enable extra functionality:
Name | Description |
---|---|
ShowAnimation | The animation played each time a new entry is shown |
HideAnimation | The animation played at the end of each entry |
API Reference
Properties
Property | Description | Type | Default Value |
---|---|---|---|
ShowAnimation | The animation played each time a new entry is shown | UWidgetAnimation* | nullptr |
HideAnimation | The animation played at the end of each entry | UWidgetAnimation* | nullptr |
AutoStart | Should the credits automatically be started when the widget is constructed? | bool | true |
RemoveOnCompletion | Should the widget automatically be removed from the viewport when the credits are finished? | bool | true |
StartDelay | The delay in seconds before the first credits entry is shown after starting | float | 1.0f |
DelayBetweenEntries | The delay in seconds between the previous hide animation and the next show animation | float | 3.0f |
Credits | The array of credits entries to be displayed | TArray<FCreditsEntry> |
Events
Name | Description | Params |
---|---|---|
OnCreditsFinished | Event used to notify other classes when the credits are finished | |
OnCreditsNextEntryStarted | Event used to notify other classes every time a next entry is started | Name (int) The index of the entry that was started |
Functions
Name | Description | Params | Return |
---|---|---|---|
Start | Start showing the credits |
Blueprint Usage
You can use the CreditsWidget
using Blueprints by adding one of the following nodes:
- Ultimate Starter Kit > UI > Start
C++ Usage
Before you can use the plugin, you first need to enable the plugin in your Build.cs
file:
PublicDependencyModuleNames.Add("USK");
The CreditsWidget
can now be used in any of your C++ files:
#include "USK/Widgets/CreditsWidget.h"
void ATestActor::Test()
{
// CreditsWidget is a pointer to the UCreditsWidget
CreditsWidget->Start();
}