mirror of
https://github.com/darksaid98/overextended.github.io.git
synced 2026-12-01 14:38:50 +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))
|
||||
|
||||
-- Getting r, g and b values from colour picker
|
||||
local r, g, b = string.match(input[4], "rgb%((%d+), (%d+), (%d+)%)")
|
||||
-- Getting rgbb values from colour picker
|
||||
local rgb = lib.math.torgba(input[4])
|
||||
|
||||
-- Transforming unit date return to be used with Lua's os library
|
||||
local date = input[5] / 1000
|
||||
-- Transforming date timestamp to a readable format with Lua's os library (server-only)
|
||||
local timestamp = math.floor(input[5] / 1000)
|
||||
local date = os.date('%Y-%m-%d %H:%M:%S', timestamp)
|
||||
```
|
||||
|
||||
</Tab>
|
||||
|
||||
Reference in new issue
Block a user