unreal.DeviceButtonState¶
- class unreal.DeviceButtonState(button: Key = [], pressed: bool = False, down: bool = False, released: bool = False, double_clicked: bool = False)¶
Bases:
StructBaseCurrent 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.
C++ Source:
Module: InteractiveToolsFramework
File: InputState.h
Editor Properties: (see get_editor_property/set_editor_property)
button(Key): [Read-Write] Button identifierdouble_clicked(bool): [Read-Write] Was the button double clicked this frame. This should happen only once per “double click”down(bool): [Read-Write] Is the button currently pressed down. This should be true every frame the button is pressed.pressed(bool): [Read-Write] Was the button pressed down this frame. This should happen once per “click”released(bool): [Read-Write] Was the button released this frame. This should happen once per “click”
- property double_clicked: bool¶
[Read-Write] Was the button double clicked this frame. This should happen only once per “double click”
- Type:
(bool)
- property down: bool¶
[Read-Write] Is the button currently pressed down. This should be true every frame the button is pressed.
- Type:
(bool)