src/UI/PropertyEditors.cpp
// draw property editor for a single `double` value
draw property editor for a single `double` value
draw property editor for a single ` double ` value
static void Draw1DoubleValueEditor(
        AbstractPropertyEditor&,
        OpenSim::SimpleProperty<double> const& prop,
        std::optional<AbstractPropertyEditor::Response>& rv)
{
    if (prop.size() != 1 || prop.isListProperty())
    {
        return;
    }
    float fv = static_cast<float>(prop.getValue());
    ImGui::SetNextItemWidth(ImGui::GetContentRegionAvailWidth());
    if (ImGui::InputFloat("##doubleditor", &fv, 0.0f, 0.0f, "%.3f") && ItemValueShouldBeSaved())
    {
        double dv = static_cast<double>(fv);
        rv = AbstractPropertyEditor::Response{MakePropValueSetter<double>(dv)};
    }
}
static void Draw1DoubleValueEditor ( AbstractPropertyEditor & , OpenSim :: SimpleProperty < double > const & prop , std :: optional < AbstractPropertyEditor :: Response > & rv ) { if ( prop . size ( ) != 1 || prop . isListProperty ( ) ) { return ; } float fv = static_cast < float > ( prop . getValue ( ) ) ; ImGui :: SetNextItemWidth ( ImGui :: GetContentRegionAvailWidth ( ) ) ; if ( ImGui :: InputFloat ( " " , & fv , 0.0f , 0.0f , " " ) && ItemValueShouldBeSaved ( ) ) { double dv = static_cast < double > ( fv ) ; rv = AbstractPropertyEditor :: Response { MakePropValueSetter < double > ( dv ) } ; } }
draw property editor for a single `double` value
draw property editor for a single ` double ` value