mirror of
https://github.com/darksaid98/overextended.github.io.git
synced 2026-12-03 06:28:53 +00:00
Update input.mdx
This commit is contained in:
1 parent
1e3245926b
commit
88ae9acb97
1 file changed
+5
-4
@@ -247,11 +247,12 @@ local input = lib.inputDialog('Dialog title', {
|
|||||||
|
|
||||||
print(json.encode(input))
|
print(json.encode(input))
|
||||||
|
|
||||||
-- Getting r, g and b values from colour picker
|
-- Getting rgbb values from colour picker
|
||||||
local r, g, b = string.match(input[4], "rgb%((%d+), (%d+), (%d+)%)")
|
local rgb = lib.math.torgba(input[4])
|
||||||
|
|
||||||
-- Transforming unit date return to be used with Lua's os library
|
-- Transforming date timestamp to a readable format with Lua's os library (server-only)
|
||||||
local date = input[5] / 1000
|
local timestamp = math.floor(input[5] / 1000)
|
||||||
|
local date = os.date('%Y-%m-%d %H:%M:%S', timestamp)
|
||||||
```
|
```
|
||||||
|
|
||||||
</Tab>
|
</Tab>
|
||||||
|
|||||||
Reference in new issue
Block a user