lua: gui library (WIP)
This commit is contained in:
@@ -1,3 +1,10 @@
|
||||
<inventory color="#1F1F1FE0" size="400,0">
|
||||
<inventory color="#1F1F1FE0" size="0,400">
|
||||
<slots-grid rows="4" count="40" sharefunc="inventory_share_func"/>
|
||||
<button id="btn"
|
||||
coord="8,300"
|
||||
size="140,30"
|
||||
z-index="1"
|
||||
onclick="document.btn.text = tostring(time.uptime())">
|
||||
-----
|
||||
</button>
|
||||
</inventory>
|
||||
|
||||
@@ -1,9 +1,12 @@
|
||||
function on_open(inv)
|
||||
print("OPEN", inv)
|
||||
local Document = require("core:document")
|
||||
document = Document.new(DOC_NAME)
|
||||
|
||||
function on_open(invid)
|
||||
print("OPEN", invid)
|
||||
end
|
||||
|
||||
function on_close(inv)
|
||||
print("CLOSE", inv)
|
||||
function on_close(invid)
|
||||
print("CLOSE", invid)
|
||||
end
|
||||
|
||||
function inventory_share_func(invid, slotid)
|
||||
|
||||
Reference in New Issue
Block a user