计算器支持小数点和科学计数法

This commit is contained in:
MrZ626
2020-09-20 20:19:47 +08:00
parent 8b202d9d05
commit e091cb6749
3 changed files with 77 additions and 58 deletions

View File

@@ -130,12 +130,14 @@ local Widgets={
newKey({name="_8", x=250,y=500,w=90, color="white", font=50,code=pressKey("8")}),
newKey({name="_9", x=350,y=500,w=90, color="white", font=50,code=pressKey("9")}),
newKey({name="_0", x=150,y=600,w=90, color="white", font=50,code=pressKey("0")}),
newKey({name="<", x=250,y=600,w=90, color="lRed", font=50,code=pressKey("backspace")}),
newKey({name="=", x=350,y=600,w=90, color="lYellow",font=50,code=pressKey("return")}),
newKey({name=".", x=250,y=600,w=90, color="lPurple",font=50,code=pressKey(".")}),
newKey({name="e", x=350,y=600,w=90, color="lPurple",font=50,code=pressKey("e")}),
newKey({name="+", x=450,y=300,w=90, color="lBlue", font=50,code=pressKey("+")}),
newKey({name="-", x=450,y=400,w=90, color="lBlue", font=50,code=pressKey("-")}),
newKey({name="*", x=450,y=500,w=90, color="lBlue", font=50,code=pressKey("*")}),
newKey({name="/", x=450,y=600,w=90, color="lBlue", font=50,code=pressKey("/")}),
newKey({name="<", x=550,y=300,w=90, color="lRed", font=50,code=pressKey("backspace")}),
newKey({name="=", x=550,y=400,w=90, color="lYellow",font=50,code=pressKey("return")}),
newButton({name="play", x=640,y=600,w=180,h=90, color="lGreen", font=40,code=pressKey("space"),hide=function()return not sceneTemp.pass end}),
},
main={