local druid = require("druid.druid") local function on_single_checkbox(self, value) print("Single checkbox callback. Value:", value) end function init(self) self.druid = druid.new(self) local single_checkbox = self.druid:new_checkbox("checkbox/check", on_single_checkbox) local radio_group = self.druid:new_radio_group( {"radio1/check", "radio2/check", "radio3/check"}, nil, {"radio1/back", "radio2/back", "radio3/back"}) -- last row optional. It's input node (default - click node) radio_group:set_state(2, true) local checkbox_group = self.druid:new_checkbox_group( {"checkbox1/check", "checkbox2/check", "checkbox3/check"}, nil, {"checkbox1/back", "checkbox2/back", "checkbox3/back"}) -- last row optional. It's input node (default - click node) checkbox_group:set_state({true, false, true}, true) end function final(self) self.druid:final() end function update(self, dt) self.druid:update(dt) end function on_message(self, message_id, message, sender) self.druid:on_message(message_id, message, sender) end function on_input(self, action_id, action) return self.druid:on_input(action_id, action) end