Interpolated HUD and radial menu UI.
This commit is contained in:
parent
5211cc20f2
commit
6439f11c2f
7 changed files with 456 additions and 30 deletions
|
|
@ -22,6 +22,30 @@ end
|
|||
|
||||
say = minetest.chat_send_all
|
||||
|
||||
function extend(dst, src)
|
||||
for k, v in pairs(src) do
|
||||
dst[k] = v
|
||||
end
|
||||
return dst
|
||||
end
|
||||
|
||||
-- Some kind of promise API. (Forget about async-await, though.)
|
||||
function Promise(fn)
|
||||
local p = {resolved = false}
|
||||
p.resolve = function(...)
|
||||
if p.resolved then return end
|
||||
p.resolved = true
|
||||
if p.after then p.after(...) end
|
||||
end
|
||||
fn(p.resolve)
|
||||
return {
|
||||
after = function(fn)
|
||||
p.after = fn
|
||||
end
|
||||
}
|
||||
end
|
||||
|
||||
|
||||
minetest.register_lbm{
|
||||
name = ":artifact:on_load",
|
||||
nodenames = {"group:call_on_load"},
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue