Choose your operating system:
Windows
macOS
Linux
| UObjectBase
|
Module |
|
Header |
/Engine/Source/Runtime/InteractiveToolsFramework/Public/BaseBehaviors/SingleClickBehavior.h |
Include |
#include "BaseBehaviors/SingleClickBehavior.h" |
class USingleClickInputBehavior : public UAnyButtonInputBehavior
USingleClickInputBehavior implements a standard "button-click"-style input behavior. The state machine works as follows: 1) on input-device-button-press, hit-test the target. If hit, begin capture 2) on input-device-button-release, hit-test the target. If hit, call Target::OnClicked(). If not hit, ignore click.
The second hit-test is required to allow the click to be "cancelled" by moving away from the target. This is standard GUI behavior. You can disable this second hit test using the .HitTestOnRelease property. This is strongly discouraged.
The hit-test and on-clicked functions are provided by a IClickBehaviorTarget instance.
Name | Description | ||
---|---|---|---|
|
HitTestOnRelease |
Hit-test is repeated on release (standard behavior). If false, |
|
|
ModifierCheckFunc |
WantsCapture() will only return capture request if this function returns true (or is null) |
|
|
Modifiers |
The modifier set for this behavior |
|
|
Target |
Click Target object |
Name | Description | |
---|---|---|
|
USingleClickInputBehavior() |
Name | Description | ||
---|---|---|---|
|
Clicked ( |
Internal function that forwards click evens to Target::OnClicked, you can customize behavior here |
|
|
Initialize ( |
Initialize this behavior with the given Target |
Name | Description | ||
---|---|---|---|
|
FInputCaptur... |
BeginCapture ( |
Called after WantsCapture() returns a capture request that was accepted |
|
ForceEndCapture ( |
If this is called, the Behavior has forcibly lost capture (eg due to app losing focus for example) and needs to clean up accordingly |
|
|
FInputCaptur... |
UpdateCapture ( |
Called for each new input event during a capture sequence. |
|
FInputCaptur... |
WantsCapture ( |
Given the input state, does this Behavior want to begin capturing some input devices? |