From 69488da53865aa808776b9a0fb4d8586f7ea4e43 Mon Sep 17 00:00:00 2001 From: Willem Date: Fri, 12 Aug 2022 20:35:04 +0200 Subject: [PATCH] Added q&d calculator limit --- .../gdxapp4d/app/calculator/CalculatorDeskApp.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/gdxapp4d-app-calculator/src/main/java/love/distributedrebirth/gdxapp4d/app/calculator/CalculatorDeskApp.java b/gdxapp4d-app-calculator/src/main/java/love/distributedrebirth/gdxapp4d/app/calculator/CalculatorDeskApp.java index a2666d8d..b2d67db9 100644 --- a/gdxapp4d-app-calculator/src/main/java/love/distributedrebirth/gdxapp4d/app/calculator/CalculatorDeskApp.java +++ b/gdxapp4d-app-calculator/src/main/java/love/distributedrebirth/gdxapp4d/app/calculator/CalculatorDeskApp.java @@ -66,6 +66,10 @@ public class CalculatorDeskApp extends AbstractDeskApp implements DeskAppRendere ImGui.text(valueLoc); ImGui.separator(); + if (value.length() > 8) { + value = "0"; // dirty limit for parseInt + valueLoc = baseNumber.BȍőnPrintNumber10(Integer.parseInt(value), 9999999); + } if (ImGui.button(baseNumber.BȍőnNumber10().BȍőnCharFor(7), buttonSize, buttonSize)) { value+="7";