From 0efe56b6e4465e38bc0c96a52f5056b5c9717ee9 Mon Sep 17 00:00:00 2001 From: dscarpac Date: Wed, 14 Aug 2024 19:53:43 -0500 Subject: [PATCH] added feature --- src/core/GenericCounter.ttslua | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/core/GenericCounter.ttslua b/src/core/GenericCounter.ttslua index 2751abc3..387be8a0 100644 --- a/src/core/GenericCounter.ttslua +++ b/src/core/GenericCounter.ttslua @@ -9,6 +9,8 @@ function onLoad(savedData) val = JSON.decode(savedData) end + self.max_typed_number = 99 + local name = self.getName() local position = { 0, 0.06, 0 } @@ -56,3 +58,7 @@ function modifyValue(mod) val = math.min(math.max(val + tonumber(mod), MIN_VALUE), MAX_VALUE) self.editButton({ index = 0, label = tostring(val) }) end + +function onNumberTyped(_, number) + updateVal(number) +end