How to make some function be called on value change in UI_FloatRange bar?
[KSPField(guiName = "ExampleSelect", isPersistant = false, guiActive = true, guiActiveEditor = true)]
[UI_FloatRange(stepIncrement = 1f, maxValue = 10f, minValue = 0f)]
public float selectedValue;
[KSPField(guiName = "Info", isPersistant = false, guiActive = true, guiActiveEditor = true)]
[UI_Label()]
public string descText = "here is selected value description";
//change descText based on selectedValue
if(selectedValue > 5f){
descText = "value is big";
} else {
descText = "value is small";
}
What I need is text change based on value in select bar. (same as stock fuel bar or thrust limiter in parts info)
Are there any ways to do this?