Last active 1785467626

rave-local.lua Raw
1local net = require("@rave/net")
2local state = require("@rave/state")
3local ui = require("@rave/ui")
4
5local ready = state.watch("lobby/ready")
6
7ui.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}))