shithub: microui

Download patch

ref: 4e0863ad180bdff16954463b00a500b9abd13753
parent: 5935fbcc2721cdb6e9b2965cd8719658247d4239
author: rxi <[email protected]>
date: Sun Oct 6 09:40:52 EDT 2019

Changed mu_number() to use MU_SLIDER_FMT

--- a/src/microui.c
+++ b/src/microui.c
@@ -908,7 +908,7 @@
 
 
 int mu_number(mu_Context *ctx, mu_Real *value, mu_Real step) {
-  return mu_number_ex(ctx, value, step, "%.03f", MU_OPT_ALIGNCENTER);
+  return mu_number_ex(ctx, value, step, MU_SLIDER_FMT, MU_OPT_ALIGNCENTER);
 }
 
 
--- a/src/microui.h
+++ b/src/microui.h
@@ -21,7 +21,7 @@
 #define MU_MAX_WIDTHS           16
 #define MU_REAL                 float
 #define MU_REAL_FMT             "%.3g"
-#define MU_SLIDER_FMT           "%.02f"
+#define MU_SLIDER_FMT           "%.2f"
 #define MU_MAX_FMT              127
 
 #define mu_stack(T, n)          struct { int idx; T items[n]; }