Provides simple keyboard controls for 2D scrolling.
sealed class
|
ScrollControl
|
implements
|
IInputConsumer
|
Returns the current scroll amount.
public
property
|
Amount
{
get
}
|
||
type
|
Vec2D
|
||
value
|
The scroll amount, within [-1..1] per axis. |
Returns the current scroll direction.
public
property
|
Direction
{
get
}
|
||
type
|
Vec2D
|
||
value
|
The unit-length scroll direction or Zero. |
Is the any scroll amount?
public
property
|
HasAmount
{
get
}
|
||
type
|
bool
|
||
value
|
true
if
the
current
scroll
amount
is
non-zero,
false
if
it
is
zero.
|
Creates a new instance of ScrollControl.
public
constructor
|
ScrollControl
()
|
Consumes the given user input event.
public
method
|
ConsumeInput
(InputEvent inputEvent)
|
||
type
|
bool
|
||
params
|
inputEvent
|
The user input event. | |
returns
|
true
if
the
input
event
has
been
consumed,
false
if
not. |
||
implements
|
IInputConsumer.ConsumeInput
|
Remarks:
Input events are provided to an IInputConsumer object only if it has the input focus (see FocusGained and FocusLost). Mouse events are provided when the mouse cursor is inside of the input bounds (MouseEnter and MouseLeave). The Closing event can be provided at any time.