src/UI/PropertyEditors.cpp
// draw a `bool` property editor
draw a `bool` property editor
draw a ` bool ` property editor
static std::optional<AbstractPropertyEditor::Response> draw_editor(
        AbstractPropertyEditor&,
        OpenSim::SimpleProperty<bool> const& prop)
{
    std::optional<AbstractPropertyEditor::Response> rv = std::nullopt;
    if (prop.isListProperty())
    {
        ImGui::Text("%s", prop.toString().c_str());
        return rv;
    }
    bool v = prop.getValue();
    if (ImGui::Checkbox("##booleditor", &v))
    {
        return AbstractPropertyEditor::Response{MakePropValueSetter<bool>(v)};
    }
    return rv;
}
static std :: optional < AbstractPropertyEditor :: Response > draw_editor ( AbstractPropertyEditor & , OpenSim :: SimpleProperty < bool > const & prop ) { std :: optional < AbstractPropertyEditor :: Response > rv = std :: nullopt ; if ( prop . isListProperty ( ) ) { ImGui :: Text ( " " , prop . toString ( ) . c_str ( ) ) ; return rv ; } bool v = prop . getValue ( ) ; if ( ImGui :: Checkbox ( " " , & v ) ) { return AbstractPropertyEditor :: Response { MakePropValueSetter < bool > ( v ) } ; } return rv ; }
draw a `bool` property editor
draw a ` bool ` property editor