User Guide
Advanced GUI Editing
Mouse Moves
You can also track the mouse as it moves over a mouse area. This is done using the Mouse Move component. Before you can use this you
need to enable mouse move messages on the appropriate MGUI component. Mouse move messages are disabled by default to reduce
unnecessary performance overheads.
Try replacing the Mouse Drag component in the previous example with a Mouse Move component and you’ll see how this works.
Drag Accumulate
The Mouse Drag component is a bit too low-level for some tasks. If you want to create a slider or anything with moving parts that can be
dragged around then it's much easier to use a Drag Accumulate component.
Drag Accumulate components manage much of the legwork of drag operations for you. There are three varieties: X, Y and XY.
The Y Drag Accumulate manages a parameter that varies over a particular range. When you drag the mouse, the offset from the point where
you clicked is maintained by the component. As you continue dragging the parameter is updated according to the Y position of the mouse
and a scale value that you can specify.
If you have a look deep inside the Bitmap Knob module in the toolbox you'll see how the Y Drag Accumulate component is used. Move
through the following modules:
Bitmap Knob\Knob\Interaction\Knob\Control\Moving Part\Knob Control
Inside the Knob Control module and you'll see the Y Drag Accumulate in the middle. The picture below explains what's going on.
94 of 212