Skip to content

Input Indicator

Introduction

A widget used to display input indicators based on the current input device and input action

Dependencies

The InputIndicator relies on other components of this plugin to work:

  • Logger: Used to log useful information to help you debug any issues you might experience
  • Game Instance: Used to monitor for input device changes and handle saving/loading game data

Required Widgets

There is already a InputIndicator_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 used to display multiple images UHorizontalBox*

API Reference

Properties

Property Description Type Default Value
InputIndicatorIconClass The input indicator icon class TSubclassOf<UInputIndicatorIcon>
Action The input action displayed by widget UInputAction* nullptr
Size The size of the image float 50.0f
Amount The amount of images to display for the input action int 1

Functions

Name Description Params Return
UpdateAction Update the input action displayed by the widget NewAction (UInputAction*)
The new action

NewAmount (int)
The new amount of images to display

Blueprint Usage

You can use the InputIndicator using Blueprints by adding one of the following nodes:

  • Ultimate Starter Kit > UI > Update Action

C++ Usage

Before you can use the plugin, you first need to enable the plugin in your Build.cs file:

PublicDependencyModuleNames.Add("USK");

The InputIndicator can now be used in any of your C++ files:

#include "USK/Widgets/InputIndicator.h"

void ATestActor::Test()
{
    // InputIndicator is a pointer to the UInputIndicator
    InputIndicator->UpdateAction(NewAction, NewAmount);
}