1
0
mirror of https://github.com/soarqin/DSP_Mods.git synced 2025-12-09 16:13:31 +08:00

Add side slider for future use

This commit is contained in:
2025-04-20 15:46:22 +08:00
parent 3c8f258a1b
commit f32b11f49a
9 changed files with 282 additions and 66 deletions

View File

@@ -53,7 +53,7 @@ public class MySlider : MonoBehaviour
}
}
sl.labelFormat = "G";
sl.handleSlideArea = sl.transform.Find("Handle Slide Area")?.GetComponent<RectTransform>();
var bg = sl.slider.transform.Find("Background")?.GetComponent<Image>();
@@ -105,14 +105,14 @@ public class MySlider : MonoBehaviour
Value = value;
return this;
}
public MySlider WithMinMaxValue(float min, float max)
{
slider.minValue = min;
slider.maxValue = max;
return this;
}
public MySlider WithLabelFormat(string format)
{
if (format == labelFormat) return this;