From e58e3c9bcb008cec067fa8a86a4b0fd9ec884c07 Mon Sep 17 00:00:00 2001 From: Zeno Rogue Date: Fri, 12 Jul 2019 23:11:39 +0200 Subject: [PATCH] editNumber(int) now accepts floating point step --- dialogs.cpp | 2 +- hyper.h | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/dialogs.cpp b/dialogs.cpp index ebe20941..35ec33f2 100644 --- a/dialogs.cpp +++ b/dialogs.cpp @@ -904,7 +904,7 @@ namespace dialog { #endif } - void editNumber(int& x, int vmin, int vmax, int step, int dft, string title, string help) { + void editNumber(int& x, int vmin, int vmax, ld step, int dft, string title, string help) { editNumber(ne.intbuf, vmin, vmax, step, dft, title, help); ne.intbuf = x; ne.intval = &x; ne.s = its(x); ne.animatable = false; diff --git a/hyper.h b/hyper.h index 168c917c..85cc26eb 100644 --- a/hyper.h +++ b/hyper.h @@ -1979,7 +1979,8 @@ namespace dialog { void display(); void editNumber(ld& x, ld vmin, ld vmax, ld step, ld dft, string title, string help); - void editNumber(int& x, int vmin, int vmax, int step, int dft, string title, string help); + // step can be ld if we use scaleLog() + void editNumber(int& x, int vmin, int vmax, ld step, int dft, string title, string help); void use_hexeditor(); inline void scaleLog() { ne.sc = logarithmic; } inline void scaleSinh() { ne.sc = asinhic; }