Loading files
using Leap.Unity.Interaction;
using System;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
namespace Leap.Unity.UI {
public abstract class UISliderInt : UISlider {
protected override void initialize() {
base.initialize();
if (slider != null) {
slider.minHorizontalValue = GetMinValue();
slider.maxHorizontalValue = GetMaxValue();
slider.horizontalSteps = (GetMaxValue() - GetMinValue());
}
}
public abstract int GetMinValue();
public abstract int GetMaxValue();
public virtual void OnSliderValue(int value) { }
public sealed override void OnSliderValue(float value) {
OnSliderValue(Mathf.RoundToInt(value));
}
}
}
4e10c4f05This file is pinned to the selected release. Download the original to open it in your design tool.