@@ -3395,14 +3395,6 @@ bool ImGui::TempInputText(const ImRect& bb, ImGuiID id, const char* label, char*
3395
3395
return value_changed;
3396
3396
}
3397
3397
3398
- static inline ImGuiInputTextFlags InputScalar_DefaultCharsFilter (ImGuiDataType data_type, const char * format)
3399
- {
3400
- if (data_type == ImGuiDataType_Float || data_type == ImGuiDataType_Double)
3401
- return ImGuiInputTextFlags_CharsScientific;
3402
- const char format_last_char = format[0 ] ? format[strlen (format) - 1 ] : 0 ;
3403
- return (format_last_char == ' x' || format_last_char == ' X' ) ? ImGuiInputTextFlags_CharsHexadecimal : ImGuiInputTextFlags_CharsDecimal;
3404
- }
3405
-
3406
3398
// Note that Drag/Slider functions are only forwarding the min/max values clamping values if the ImGuiSliderFlags_AlwaysClamp flag is set!
3407
3399
// This is intended: this way we allow CTRL+Click manual input to set a value out of bounds, for maximum flexibility.
3408
3400
// However this may not be ideal for all uses, as some user code may break on out of bound values.
@@ -3420,7 +3412,6 @@ bool ImGui::TempInputScalar(const ImRect& bb, ImGuiID id, const char* label, ImG
3420
3412
ImStrTrimBlanks (data_buf);
3421
3413
3422
3414
ImGuiInputTextFlags flags = ImGuiInputTextFlags_AutoSelectAll | (ImGuiInputTextFlags)ImGuiInputTextFlags_NoMarkEdited;
3423
- flags |= InputScalar_DefaultCharsFilter (data_type, format);
3424
3415
3425
3416
bool value_changed = false ;
3426
3417
if (TempInputText (bb, id, label, data_buf, IM_ARRAYSIZE (data_buf), flags))
@@ -3464,9 +3455,6 @@ bool ImGui::InputScalar(const char* label, ImGuiDataType data_type, void* p_data
3464
3455
char buf[64 ];
3465
3456
DataTypeFormatString (buf, IM_ARRAYSIZE (buf), data_type, p_data, format);
3466
3457
3467
- // Testing ActiveId as a minor optimization as filtering is not needed until active
3468
- if (g.ActiveId == 0 && (flags & (ImGuiInputTextFlags_CharsDecimal | ImGuiInputTextFlags_CharsHexadecimal | ImGuiInputTextFlags_CharsScientific)) == 0 )
3469
- flags |= InputScalar_DefaultCharsFilter (data_type, format);
3470
3458
flags |= ImGuiInputTextFlags_AutoSelectAll | (ImGuiInputTextFlags)ImGuiInputTextFlags_NoMarkEdited; // We call MarkItemEdited() ourselves by comparing the actual data rather than the string.
3471
3459
3472
3460
bool value_changed = false ;
@@ -3561,7 +3549,6 @@ bool ImGui::InputScalarN(const char* label, ImGuiDataType data_type, void* p_dat
3561
3549
3562
3550
bool ImGui::InputFloat (const char * label, float * v, float step, float step_fast, const char * format, ImGuiInputTextFlags flags)
3563
3551
{
3564
- flags |= ImGuiInputTextFlags_CharsScientific;
3565
3552
return InputScalar (label, ImGuiDataType_Float, (void *)v, (void *)(step > 0 .0f ? &step : NULL ), (void *)(step_fast > 0 .0f ? &step_fast : NULL ), format, flags);
3566
3553
}
3567
3554
@@ -3604,7 +3591,6 @@ bool ImGui::InputInt4(const char* label, int v[4], ImGuiInputTextFlags flags)
3604
3591
3605
3592
bool ImGui::InputDouble (const char * label, double * v, double step, double step_fast, const char * format, ImGuiInputTextFlags flags)
3606
3593
{
3607
- flags |= ImGuiInputTextFlags_CharsScientific;
3608
3594
return InputScalar (label, ImGuiDataType_Double, (void *)v, (void *)(step > 0.0 ? &step : NULL ), (void *)(step_fast > 0.0 ? &step_fast : NULL ), format, flags);
3609
3595
}
3610
3596
@@ -5238,7 +5224,7 @@ bool ImGui::ColorEdit4(const char* label, float col[4], ImGuiColorEditFlags flag
5238
5224
else
5239
5225
ImFormatString (buf, IM_ARRAYSIZE (buf), " #%02X%02X%02X" , ImClamp (i[0 ], 0 , 255 ), ImClamp (i[1 ], 0 , 255 ), ImClamp (i[2 ], 0 , 255 ));
5240
5226
SetNextItemWidth (w_inputs);
5241
- if (InputText (" ##Text" , buf, IM_ARRAYSIZE (buf), ImGuiInputTextFlags_CharsHexadecimal | ImGuiInputTextFlags_CharsUppercase))
5227
+ if (InputText (" ##Text" , buf, IM_ARRAYSIZE (buf), ImGuiInputTextFlags_CharsUppercase))
5242
5228
{
5243
5229
value_changed = true ;
5244
5230
char * p = buf;
0 commit comments