@@ -106,8 +106,14 @@ namespace detail
106106                    ImGui::PushItemWidth ( x - prevX );
107107                    MR_FINALLY{ ImGui::PopItemWidth (); };
108108                    prevX = x;
109+                     std::string s;
110+                     if  ( i + 1  != VectorTraits<T>::size )
111+                         s = " ###" 
112+                     s += label;
113+                     s += " ##" 
114+                     s += std::to_string ( i );
109115                    bool  elemChanged = func (
110-                         fmt::format (  " {}{}##{} " , i == VectorTraits<T>::size -  1  ?  " "  :  " ### " , label, i ) .c_str (),
116+                         s .c_str (),
111117                        VectorTraits<T>::getElem ( i, value ),
112118                        i
113119                    );
@@ -160,11 +166,11 @@ namespace detail
160166        std::string maxString = valueToString<E>( max, unitParams );
161167
162168        if  ( haveMin && haveMax )
163-             return  fmt::format (  " Range: {}  .. {} " , minString,  maxString ) ;
169+             return  " Range: "  + minString +  "   .. "  +  maxString;
164170        if  ( haveMin )
165-             return  fmt::format (  " Range: at least {} " , minString ) ;
171+             return  " Range: at least "  + minString ;
166172        if  ( haveMax )
167-             return  fmt::format (  " Range: at most {} " , maxString ) ;
173+             return  " Range: at most "  + maxString ;
168174        return  " " 
169175    }
170176
@@ -464,20 +470,20 @@ bool plusMinusGeneric( const char* label, T& plus, T& minus, UnitToStringParams<
464470    auto  getStateKeyIsAsym = [&, ret = std::string{}]() mutable  -> const  std::string&
465471    {
466472        if  ( ret.empty () )
467-             ret = fmt::format ( " MR::plusMinus:{} " , label ) ;
473+             ret = std::string ( " MR::plusMinus:"  ) + label ;
468474        return  ret;
469475    };
470476
471477    auto  getPlusName = [&, ret = std::string{}]() mutable  -> const  std::string&
472478    {
473479        if  ( ret.empty () )
474-             ret = fmt::format ( " ###plus:{} " , label ) ;
480+             ret = std::string ( " ###plus:"  ) + label ;
475481        return  ret;
476482    };
477483    auto  getMinusName = [&, ret = std::string{}]() mutable  -> const  std::string&
478484    {
479485        if  ( ret.empty () )
480-             ret = fmt::format ( " ###minus:{} " , label ) ;
486+             ret = std::string ( " ###minus:"  ) + label ;
481487        return  ret;
482488    };
483489
@@ -510,7 +516,7 @@ bool plusMinusGeneric( const char* label, T& plus, T& minus, UnitToStringParams<
510516
511517    //  The symmetry toggle.
512518    ImGui::SetCursorPosX ( ImGui::GetCursorPosX () + fullWidth - toggleSymButtonWidth );
513-     if  ( ( buttonEx )( fmt::format (  " {}###toggleSymmetry:{} " ,  isAsym ? " \xC2\xB1 " /* U+00B1 PLUS-MINUS SIGN*/ " +/-" ,  label ).c_str (), ImVec2 ( toggleSymButtonWidth, ImGui::GetFrameHeight () ), { .customTexture  = UI::getTexture ( UI::TextureType::GradientBtnGray ).get () } ) )
519+     if  ( ( buttonEx )( ( (  isAsym ? " \xC2\xB1 " /* U+00B1 PLUS-MINUS SIGN*/ " +/-"  ) +  std::string (  " ###toggleSymmetry: "  ) +  label ).c_str (), ImVec2 ( toggleSymButtonWidth, ImGui::GetFrameHeight () ), { .customTexture  = UI::getTexture ( UI::TextureType::GradientBtnGray ).get () } ) )
514520    {
515521        isAsym = !isAsym;
516522
@@ -587,7 +593,7 @@ bool plusMinusGeneric( const char* label, T& plus, T& minus, UnitToStringParams<
587593        }
588594
589595        //  This name can't match the plus/minus names, because we check if those are active above.
590-         if  ( func ( fmt::format ( " ###sym:{} " ,  label ).c_str (), plus, std::move ( unitToStringParams ) ) ) //  Move the params on the last usage, in case the lambda decides to take them by value for some reason.
596+         if  ( func ( (  std::string ( " ###sym:"  ) +  label ).c_str (), plus, std::move ( unitToStringParams ) ) ) //  Move the params on the last usage, in case the lambda decides to take them by value for some reason.
591597        {
592598            minus = -plus;
593599            ret = true ;
0 commit comments