-
Book Overview & Buying
-
Table Of Contents
Unreal Engine 4 Scripting with C++ Cookbook
By :
Every user interface needs shortcut keys associated with it. To program these into your UMG interface, you can simply wire-up certain key combinations to an Action mapping. When the Action triggers, just invoke the same Blueprints function that the UI button itself triggers.
You should have a UMG interface created already, as shown in the previous recipe.
In Settings | Project Settings | Input, define a new Action mapping for your hot key event, for example, HotKey_UIButton_Spell.
Wire up the event to your UI's function call either in Blueprints or in C++ code.
Wiring up an Action Mapping with a short circuit to the function called by the UI will allow you to implement hot keys in your game program nicely.
Change the font size
Change margin width
Change background colour