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