private void DrawFooter() { //EditorGUI.DrawRect(new Rect(r.xMin, r.yMin + ENBLD_HGHT - FOOTHGHT, r.width, FOOTHGHT), usedcolor * .9f); EditorGUI.LabelField(new Rect(paddedleft, line, paddedwidth, FOOTHGHT), new GUIContent("Actual:"), miniFadedLabel); float prec = fc.GetPrecAtBits(); // fc.Precision; float res = fc.GetResAtBits(); // restrict prec to 7 characters String precstr = prec.ToString("F" + Math.Min(6, Math.Max(0, (6 - (int)Math.Log10(prec)))).ToString()); String str = "res: 1/" + res + (fc.TRSType == TRSType.Euler ? "°" : "") + " prec: " + precstr + (fc.TRSType == TRSType.Euler ? "°" : ""); EditorGUI.LabelField(new Rect(paddedleft, line, paddedwidth, FOOTHGHT), str, miniFadedLabelRight); }
private void DrawActualValues() { GUI.Label(new Rect(ir.xMin + PADDING, line, paddedwidth, ACTUAL_HGHT), ((holdindent < 2) ? GC_ACTUAL_LONG : GUIContent.none), miniFadedLabel); float prec = fc.GetPrecAtBits(); float res = fc.GetResAtBits(); // restrict prec to 5 characters string resstr = res.ToString((res < 0) ? "0.0000" : (res > 9999) ? "E2" : "F4"); string precstr = prec.ToString("F" + Math.Min(4, Math.Max(0, (4 - (int)Math.Log10(prec)))).ToString()); string str = "res: 1/" + resstr + (fc.TRSType == TRSType.Euler ? "°" : "") + " prec: " + precstr + (fc.TRSType == TRSType.Euler ? "°" : ""); GUI.Label(new Rect(paddedleft, line, paddedwidth, ACTUAL_HGHT), str, miniFadedLabelRight); line += ACTUAL_HGHT; }
private void DrawActualValues() { //EditorGUI.DrawRect(new Rect(r.xMin, r.yMin + ENBLD_HGHT - FOOTHGHT, r.width, FOOTHGHT), usedcolor * .9f); EditorGUI.LabelField(new Rect(paddedleft, line, paddedwidth, ACTUAL_HGHT), ((holdindent < 2) ? GC_ACTUAL_LONG : GUIContent.none), miniFadedLabel); float prec = fc.GetPrecAtBits(); // fc.Precision; float res = fc.GetResAtBits(); // restrict prec to 5 characters string resstr = res.ToString((res < 0) ? "0.0000" : (res > 9999) ? "E2" : "F4"); string precstr = prec.ToString("F" + Math.Min(4, Math.Max(0, (4 - (int)Math.Log10(prec)))).ToString()); string str = "res: 1/" + resstr + (fc.TRSType == TRSType.Euler ? "°" : "") + " prec: " + precstr + (fc.TRSType == TRSType.Euler ? "°" : ""); EditorGUI.LabelField(new Rect(paddedleft, line, paddedwidth, ACTUAL_HGHT), str, miniFadedLabelRight); line += ACTUAL_HGHT; }