UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
FDeviceButtonState Struct Reference

#include <InputState.h>

Public Member Functions

 FDeviceButtonState ()
 
 FDeviceButtonState (const FKey &ButtonIn)
 
void SetStates (bool bPressedIn, bool bDownIn, bool bReleasedIn, bool bDoubleClickedIn=false)
 

Public Attributes

FKey Button
 
bool bPressed
 
bool bDown
 
bool bReleased
 
bool bDoubleClicked
 

Detailed Description

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.

Constructor & Destructor Documentation

◆ FDeviceButtonState() [1/2]

FDeviceButtonState::FDeviceButtonState ( )
inline

◆ FDeviceButtonState() [2/2]

FDeviceButtonState::FDeviceButtonState ( const FKey ButtonIn)
inline

Member Function Documentation

◆ SetStates()

void FDeviceButtonState::SetStates ( bool  bPressedIn,
bool  bDownIn,
bool  bReleasedIn,
bool  bDoubleClickedIn = false 
)
inline

Update the states of this button

Member Data Documentation

◆ bDoubleClicked

bool FDeviceButtonState::bDoubleClicked

Was the button double clicked this frame. This should happen only once per "double click"

◆ bDown

bool FDeviceButtonState::bDown

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

◆ bPressed

bool FDeviceButtonState::bPressed

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

◆ bReleased

bool FDeviceButtonState::bReleased

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

◆ Button

FKey FDeviceButtonState::Button

Button identifier


The documentation for this struct was generated from the following file: