class HandleSliderManager

Controls all instantiated HandleSliders.

Public

Methods

Update

bool Update(const HCamera &camera, const Vector2I &inputPos, const Vector2I &inputDelta)

Updates all underlying sliders, changing their state and dragging them depending on their state and pointer movement.

camera
Camera through which we're interacting with sliders.
inputPos
Position of the pointer.
inputDelta
Movement of the pointer since last frame.

Returns: True if slider state changed, false otherwise.

TrySelect

bool TrySelect(const HCamera &camera, const Vector2I &inputPos)

Attempts to select (activate) a slider at the specified position.

camera
Camera through which we're interacting with sliders.
inputPos
Position of the pointer.

Returns: True if handle slider state changed, false otherwise.

ClearSelection

void ClearSelection(const HCamera &camera)

Clears the active slider (deactivates it) for the specified camera.

IsSliderActive

bool IsSliderActive(const HCamera &camera) const

Checks is any slider active for the specified camera.

RegisterSlider

void RegisterSlider(HandleSlider *slider)

Registers a new instantiated slider.

UnregisterSlider

void UnregisterSlider(HandleSlider *slider)

Unregisters a previously instantiated slider.

Private

Methods

FindUnderCursor

HandleSlider *FindUnderCursor(const HCamera &camera, const Vector2I &inputPos) const

Attempts to find slider at the specified position.

camera
Camera through which we're interacting with sliders.
inputPos
Position of the pointer.

Returns: Slider if we're intersecting with one, or null otherwise.

Fields

mStates

UnorderedMap<u64, StatePerCamera> mStates

mSliders

UnorderedSet<HandleSlider *> mSliders