Final design of 'If Key is Reserved' routine

This commit is contained in:
2025-05-27 17:49:18 -04:00
parent 23194ac0e5
commit c4479b4d59
6 changed files with 18 additions and 81 deletions

View File

@@ -133,21 +133,11 @@ public:
UFUNCTION(BlueprintPure, Category="Widget")
static void GetPositionOfGridPanelMiddleCell(UGridPanel *GridPanel, FVector2D &UpperLeftXY, FVector2D &LowerRightXY);
// Check if a given key is used by the mapping context.
// Check if a given key is used by the specified mapping context.
//
// This is true if the key is mapped to anything at all within
// the specified mapping context.
//
UFUNCTION(BlueprintCallable, Category = "Input", meta = (ExpandEnumAsExecs="ReturnValue"))
static ElxUsedOrNotUsed IsKeyUsedByMappingContext(const FKeyEvent &KeyEvent, const UInputMappingContext *MappingContext);
// Check if a given key is used by the player controller.
//
// If you pass in a null pointer for the player controller, then this
// function will use the first player controller by default.
//
// If 'Include Escape and FKeys' is checked, then the escape key
// and the function keys are also considered to be 'used' by the
// player controller. It is generally a good idea to treat these
// keys as reserved for play-in-editor.
//
UFUNCTION(BlueprintCallable, Category = "Input", meta = (WorldContext="Context", ExpandEnumAsExecs="ReturnValue", IncludeEscapeAndFkeys="true"))
static ElxUsedOrNotUsed IsKeyUsedByPlayerController(const FKeyEvent &KeyEvent, bool IncludeEscapeAndFkeys, const APlayerController *PlayerController, const UObject *Context);
static ElxUsedOrNotUsed IsKeyUsedByMappingContext(const FKey &Key, const UInputMappingContext *MappingContext);
};