Navigation
API > API/Plugins > API/Plugins/TweeningUtilsEditor
Generic controller that allows you to move the mouse while a command is pressed. The sliding value is normalized to [-1,1] depending on whether the mouse was moved left or right.
The user must first press down the key chord for DragSliderCommand, and then the LMB. The user can press and release LMB multiple times while DragSliderCommand's key chord is pressed down.
During sliding, the mouse is locked to the rect of the virtual slider: the area around where the user started dragging. This is intended to give the user feedback when they've moved the mouse far enough to reach -1 or 1.
Example:
- Suppose MaxSlideWidthAttr returns 200, and that InDragSliderCommand is bound to U.
- The user presses U and moves the mouse
- to right by 50 Slate units > OnSliderMovedDelegate is invoked with is 0.5.
- to the right by 125 Slate units (exceeds the max sliding by 25 units) > OnSliderMovedDelegate is invoked with 1.0 (clamped).
- to the left by 25 Slate units > OnSliderMovedDelegate is invoked with -0.25.
| Name | FMouseSlidingController |
| Type | class |
| Header File | /Engine/Plugins/Animation/TweeningUtils/Source/TweeningUtilsEditor/Public/Widgets/MVC/MouseSlidingController.h |
| Include Path | #include "Widgets/MVC/MouseSlidingController.h" |
Syntax
class FMouseSlidingController : public FNoncopyable
Inheritance Hierarchy
- FNoncopyable → FMouseSlidingController
Derived Classes
Constructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
FMouseSlidingController
(
TAttribute< float > InMaxSlideWidthAttr, |
Widgets/MVC/MouseSlidingController.h |
Destructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual ~FMouseSlidingController() |
Widgets/MVC/MouseSlidingController.h |
Structs
| Name | Remarks |
|---|---|
| FSlidingState |
Typedefs
| Name | Type | Remarks | Include Path |
|---|---|---|---|
| FMoveSliderDelegate | TMulticastDelegate_OneParam< void, float > | Widgets/MVC/MouseSlidingController.h |
Variables
Protected
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| CommandList | const TSharedRef< FUICommandList > | Used to bind and unbind the DragSliderCommand command. | Widgets/MVC/MouseSlidingController.h | |
| DragSliderCommand | const TSharedPtr< FUICommandInfo > | The command must be pressed down to start sliding. You also need to press LMB to start sliding. | Widgets/MVC/MouseSlidingController.h | |
| FMouseSlidingInputProcessor | friend | Widgets/MVC/MouseSlidingController.h | ||
| MaxSlideWidthAttr | const TAttribute< float > | The total size of the "invisible" slider. | Widgets/MVC/MouseSlidingController.h | |
| OnStartSlidingDelegate | FSimpleMulticastDelegate | Invoked when sliding starts. | Widgets/MVC/MouseSlidingController.h | |
| OnStopSlidingDelegate | FSimpleMulticastDelegate | Invoked when sliding stops. | Widgets/MVC/MouseSlidingController.h | |
| OnUpdateSlidingDelegate | FMoveSliderDelegate | Invoked every tick the slider is moved. | Widgets/MVC/MouseSlidingController.h | |
| SlidingState | TOptional< FSlidingState > | Set while listening for mouse events, unset while not sliding. | Widgets/MVC/MouseSlidingController.h |
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
void BindCommand() |
Starts listening for the mouse sliding command. | Widgets/MVC/MouseSlidingController.h | |
bool IsSliding() |
Widgets/MVC/MouseSlidingController.h | ||
FSimpleMulticastDelegate & OnStartSliding() |
Invoked when sliding starts. | Widgets/MVC/MouseSlidingController.h | |
FSimpleMulticastDelegate & OnStopSliding() |
Invoked when sliding stops. | Widgets/MVC/MouseSlidingController.h | |
FMoveSliderDelegate & OnUpdateSliding () |
Invoked every tick the slider is moved. | Widgets/MVC/MouseSlidingController.h | |
void UnbindCommand() |
Stops listening for the mouse sliding command. | Widgets/MVC/MouseSlidingController.h |
Protected
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
const TSharedRef< FUICommandList > & GetCommandList() |
Widgets/MVC/MouseSlidingController.h |