public static bool BuildRadioButton(this ImGui gui, string option, bool selected, SchemeColor color = SchemeColor.None) { using (gui.EnterRow()) { gui.BuildIcon(selected ? Icon.RadioCheck : Icon.RadioEmpty, 1.5f, color); gui.BuildText(option, Font.text, color: color, wrap: true); } return(!selected && gui.OnClick(gui.lastRect)); }
public static bool BuildCheckBox(this ImGui gui, string text, bool value, out bool newValue, SchemeColor color = SchemeColor.None) { using (gui.EnterRow()) { gui.BuildIcon(value ? Icon.CheckBoxCheck : Icon.CheckBoxEmpty, 1.5f, color); gui.BuildText(text, Font.text, color: color); } if (gui.OnClick(gui.lastRect)) { newValue = !value; return(true); } newValue = value; return(false); }