This commit is contained in:
2026-06-04 10:42:23 +07:00
parent e7e90790c9
commit 9be2242378
4166 changed files with 53005 additions and 11401 deletions

View File

@@ -0,0 +1,36 @@
using UnityEngine;
using UnityEngine.UI;
namespace Invector
{
public class vSliderSizeControl : MonoBehaviour
{
public Slider slider;
public RectTransform rectTransform;
public float multipScale = 0.1f;
float oldMaxValue;
void OnDrawGizmosSelected()
{
UpdateScale();
}
private void Start()
{
Invoke("UpdateScale", 0.1f);
}
public void UpdateScale()
{
if (rectTransform && slider)
{
if (slider.maxValue != oldMaxValue)
{
var sizeDelta = rectTransform.sizeDelta;
sizeDelta.x = slider.maxValue * multipScale;
rectTransform.sizeDelta = sizeDelta;
oldMaxValue = slider.maxValue;
}
}
}
}
}