Implements: BaseComponentView, ISliderComponentView, IComponentModelConfig
Model: SliderComponentModel
A generic slider component that allows customization
text: Text that will be showed in the slider.isTextActive: Boolean that sets the text active or not.areButtonsActive: Boolean that sets the increment and decrement buttons active or not.background: Sprite that substitutes the background image of the slider.
void Configure(BaseComponentModel newModel): Fills the model and refreshes the slider component with this data.SliderEvent onSliderChange: Event that will be triggered when the slider value changes.ButtonClickedEvent onIncrement: Event that will be triggered when the increment button is pressed.ButtonClickedEvent onDecrement: Event that will be triggered when the decrement button is pressed.void SetText(string newText): Set the slider text.void SetTextActive(bool isActive): Set slider text active.void SetBackground(Sprite image): Set slider background sprite.void SetInteractable(bool isInteractable): Set the slider interactable or not.bool IsInteractable(): Return if the slider is interactable or not.
- Drag the prefab to your scene.
- Configure the model from the inspector.
- Click on [REFRESH].
