Fix checkboxes not initializing to desired value

This commit is contained in:
Sasha Koshka 2024-06-22 15:37:52 -04:00
parent 5b60717b8f
commit 83dca60257

View File

@ -19,7 +19,7 @@ func NewCheckbox (value bool) *Checkbox {
Box: tomo.NewBox(), Box: tomo.NewBox(),
} }
box.SetRole(tomo.R("objects", "Checkbox", "")) box.SetRole(tomo.R("objects", "Checkbox", ""))
box.SetValue(false) box.SetValue(value)
box.OnMouseUp(box.handleMouseUp) box.OnMouseUp(box.handleMouseUp)
box.OnKeyUp(box.handleKeyUp) box.OnKeyUp(box.handleKeyUp)