FDeviceButtonState

Current State of a physical device button (mouse, key, etc) at a point in time.

Windows
MacOS
Linux

References

Module

InteractiveToolsFramework

Header

/Engine/Source/Runtime/Experimental/InteractiveToolsFramework/Public/InputState.h

Include

#include "InputState.h"

Syntax

struct FDeviceButtonState

Remarks

Current State of a physical device button (mouse, key, etc) at a point in time. Each "click" of a button should involve at minimum two separate state events, one where bPressed=true and one where bReleased=true. Each of these states should occur only once. In addition there may be additional frames where the button is held down and bDown=true and bPressed=false.

Variables

Name Description

Public variable

bool

 

bDown

Is the button currently pressed down. This should be true every frame the button is pressed.

Public variable

bool

 

bPressed

Was the button pressed down this frame. This should happen once per "click"

Public variable

bool

 

bReleased

Was the button released this frame. This should happen once per "click"

Public variable

FKey

 

Button

Button identifier

Constructors

Name Description

Public function

FDeviceButtonState()

Public function

FDeviceButtonState

(
    const FKey& ButtonIn
)

Functions

Name Description

Public function

void

 

SetStates

(
    bool bPressedIn,
    bool bDownIn,
    bool bReleasedIn
)

Update the states of this button

Help shape the future of Unreal Engine documentation! Tell us how we're doing so we can serve you better.
Take our survey
Dismiss