private static bool DrawParamFloat(Rect r, string text, ref float param, float min, float max) { float num = param; GUIM.DrawText(r, text, TextAnchor.MiddleLeft, BaseColor.White, 1, 12, true); param = GUIM.DrawSlider(new Rect(r.x + r.width - GUIM.YRES(240f), r.y + GUIM.YRES(6f), GUIM.YRES(200f), GUIM.YRES(24f)), (int)GUIM.YRES(200f), min, max, param); param = ((float)((int)(param * 10f)) + 0.05f) / 10f; GUI.DrawTexture(new Rect(r.x + r.width - GUIM.YRES(32f), r.y, GUIM.YRES(32f), GUIM.YRES(24f)), MenuOptions.tGray); GUIM.DrawText(new Rect(r.x + r.width - GUIM.YRES(32f), r.y, GUIM.YRES(32f), GUIM.YRES(24f)), param.ToString("0.0"), TextAnchor.MiddleCenter, BaseColor.White, 1, 12, true); return(param == num); }