mirror of
https://github.com/IgorTimofeev/MineOS.git
synced 2025-12-24 04:52:48 +01:00
Added "Calculator" application for future testing #3
This commit is contained in:
parent
1e1e7ff33d
commit
8acab5f12c
@ -80,7 +80,12 @@ modeList.selectedItem = 2
|
||||
local displayWidget = displayContainer:addChild(GUI.object(4, 1, window.width - 6, displayHeight))
|
||||
|
||||
local function parseFloat(v)
|
||||
return tostring(v * 1.0):match("(.+)%.(.+)")
|
||||
local integer, fractional = tostring(v * 1.0):match("(.+)%.(.+)")
|
||||
if integer then
|
||||
return integer, fractional
|
||||
else
|
||||
return tostring(v), "0"
|
||||
end
|
||||
end
|
||||
|
||||
local function format(v)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user