TINMAN 3D / REALTIME TERRAIN
Software Development Kit - User Manual

class ScrollControl in Tinman.AddOns.Components

Provides simple keyboard controls for 2D scrolling.

sealed class ScrollControl implements IInputConsumer

Public / Attributes

Amount

Returns the current scroll amount.

public property Amount { get }
type Vec2D
value The scroll amount, within [-1..1] per axis.

Direction

Returns the current scroll direction.

public property Direction { get }
type Vec2D
value The unit-length scroll direction or Zero.

HasAmount

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.

Public / Constructors

ScrollControl

Creates a new instance of ScrollControl.

public constructor ScrollControl ()

Public / Methods

ConsumeInput

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.

  1. FocusGained: gained input focus
  2. Keyboard events:
  3. Mouse events:
    1. MouseEnter
    2. Mouse events:
    3. MouseLeave
  4. FocusLost: lost input focus
  5. Closing: user request to shut down