A collection of user widgets which can help to create basic UI menus and screens.
This plugin required this plugins to work:
- TrickyGameMode v2.1 and higher;
Install them before installing this plugin.
The plugin can be used in both C++ and Blueprint projects.
- Download the latest package file;
- Install the plugin either in your project or for all projects in engine:
- Unzip the package into Plugins folder of your project, e.g.
D:\UnrealProjects\MyProject\Plugins
; - Unzip the package to the Plugins folder in engine folder, e.g.
C:\Program Files\Epic Games\UE_5.0\Engine\Plugins
;
- Unzip the package into Plugins folder of your project, e.g.
- Restart the project;
In this case the plugin can be used for any blueprint project.
- Create the Plugins folder in the project directory;
- Create the TrickyAnimationComponents folder in the Plugins folder;
- Download the plugin source code into that folder;
- Rebuild the project;
The plugin contains these widget classes:
- BaseUserWidget;
- ButtonWidget;
- TransitionScreenWidget;
- MainMenuWidget;
- SplashScreenWidget;
- PreparationScreenWidget;
- PauseMenuWidget;
- WinMenuWidget;
- LoseMenuWidget;
- SettingsMenu;
- SliderWidget;
- SoundSliderWidget;
All widgets are inherited from BaseUserWidget.
All widgets have functions:
Show
- shows a widget with an animation;Hide
- hides a widget with an animation;
All widgets have delegates:
OnShowed
- called when a widget was showed;OnHidden
- called when a widget was hidden;
ButtonWidget has delegates:
OnClicked
- called when a button was clicked;
A small library which contains some useful helper functions.
SetQualitySettings
- sets visual quality from low (0) to epic (3);SetScreenMode
- sets screen mode;SetResolutionScale
- sets screen resolution scale;SetResolution
- sets screen resolution;ConvertTimeSeconds
- converts given time in seconds to a chosen format;
All new blueprint widgets inherited from BaseUserWidget and others of this plugin have to have two animations in them:
- ShowAnimation;
- HideAnimation;
This animations are required for Show
and Hide
functions. If you don't want to use these animations, just set their length to 0.
Some widgets can require to add specific elements or other widgets. Without them they won't compile properly.
More about it you can read here.
The plugin contains a custom HUD class TrickyHUDGame
created for GameModeSession from TrickyGameMode plugin.
It want work with game modes which aren't inherited from GameModeSession.
It automatically show and hide widgets depending on a state of GameModeSession.
You can get widgets and subscribe on their events using variables:
UserWidgets
- a map of created widgets;ActiveWidget
- current active widget
InactiveStateWidget
- a widget which will be shown in the Inactive game state;PraparationScreenWidget
- a widget which will be shown in the Preparation game state.GameplayScreenWidget
- a widget which will be shown in the InProgress game state;PauseScreenWidget
- a widget which will be shown in the Pause game state;WinScreenWidget
- a widget which will be shown in the Win game state;LoseScreenWidget
- a widget which will be shown in the Lose game state;TransitionScreenWidget
- a widget which will be shown in the Transition game state;
You can create and set only those widgets you need. HUD will automatically handle added widgets.