From 3a7f7590c7005094e3e48d42ee92b39ad091028c Mon Sep 17 00:00:00 2001 From: Andrey Nazarov Date: Tue, 12 Mar 2013 21:06:33 +0400 Subject: Add ‘--numeric’ option to field items. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Currently equivalent to ‘--integer’ (allow any numeric input), but ‘--integer’ may be later redefined to allow only integer input. --- src/client/ui/q2pro.menu | 2 +- src/client/ui/script.c | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/client/ui/q2pro.menu b/src/client/ui/q2pro.menu index 6173805..9983193 100644 --- a/src/client/ui/q2pro.menu +++ b/src/client/ui/q2pro.menu @@ -299,7 +299,7 @@ end begin input title "Input Setup" - field --integer --width 8 "mouse sens" sensitivity + field --numeric --width 8 "mouse sens" sensitivity toggle "auto sens" m_autosens toggle "mouse filter" m_filter toggle "free look" freelook diff --git a/src/client/ui/script.c b/src/client/ui/script.c index 9d276ad..4176ee6 100644 --- a/src/client/ui/script.c +++ b/src/client/ui/script.c @@ -397,6 +397,7 @@ static void Parse_Field(menuFrameWork_t *menu) static const cmd_option_t o_field[] = { { "c", "center" }, { "i", "integer" }, + { "n", "numeric" }, { "s:", "status" }, { "w:", "width" }, { NULL } @@ -414,6 +415,7 @@ static void Parse_Field(menuFrameWork_t *menu) center = qtrue; break; case 'i': + case 'n': flags |= QMF_NUMBERSONLY; break; case 's': -- cgit v1.2.3