private float DrawFloat(string theLimitTitle, float theLimitValue, bool theUseLimits, float theMinValue, float theMaxValue) { //rotation left limit GUILayout.BeginHorizontal(); string aCurrentLimitString = "NO LIMIT SET"; if (theUseLimits) { aCurrentLimitString = string.Format("{0:0.00}", theLimitValue); } KGFGUIUtility.Label(theLimitTitle); float aValue = 0.0f; if (theUseLimits) { GUILayout.FlexibleSpace(); aValue = KGFGUIUtility.HorizontalSlider(theLimitValue, theMinValue, theMaxValue, GUILayout.Width(120.0f)); } KGFGUIUtility.Label(aCurrentLimitString); GUILayout.EndHorizontal(); return(aValue); }