// UI stuff
protected struct ValRange
{
GUIContent Name ;
#if UNITY_EDITOR
GUIContent Name ;
float ValMax ;
#endif
float ValMax ;
public ValRange ( string name , float valMin , float valDef , float valMax , float valScale ) { Name = new GUIContent ( name ) ; ValMin = valMin ; ValDef = valDef ; ValMax = valMax ; ValScale = valScale ; }
public ValRange ( string name , float valMin , float valDef , float valMax , float valScale )
{
#if UNITY_EDITOR
Name = new GUIContent ( name ) ;
ValMin = valMin ;
ValMax = valMax ;
#endif
ValDef = valDef ;
ValScale = valScale ;
}
#if UNITY_EDITOR
public void Slider ( ref int currentVal ) { currentVal = ShadowUtils . Asint ( ValScale * UnityEditor . EditorGUILayout . Slider ( Name , ShadowUtils . Asfloat ( currentVal ) / ValScale , ValMin , ValMax ) ) ; }
#else