Last active 1785467626

Bluefield revised this gist 1785467626. Go to revision

1 file changed, 21 insertions

rave-local.lua(file created)

@@ -0,0 +1,21 @@
1 + local net = require("@rave/net")
2 + local state = require("@rave/state")
3 + local ui = require("@rave/ui")
4 +
5 + local ready = state.watch("lobby/ready")
6 +
7 + ui.mount(ui.button({
8 + text = ready:map(function(value)
9 + return value and "Ready ✓" or "Ready up"
10 + end),
11 +
12 + color = ready:map(function(value)
13 + return value and "#46BE6E" or "#465A78"
14 + end),
15 +
16 + align = "bottom-center",
17 +
18 + on_press = function()
19 + net.send_server("lobby/toggle-ready")
20 + end,
21 + }))
Newer Older