- InputFloat,InputFloat2,InputFloat3,InputFloat4: Added variations taking a more flexible and consistent optional "const char* format" parameter instead of "int decimal_precision".
This allow using custom formats to display values in scientific notation, and is generally more consistent with other API. Obsoleted functions using the optional "int decimal_precision" parameter. (#648)
- DragFloat, DragInt: Cancel mouse tweak when current value is initially past the min/max boundaries and mouse is pushing in the same direction (keyboard/gamepad version already did this).
- DragFloat, SliderFloat: Fix to allow input of scientific notation numbers when using CTRL+Click to input the value. (~#648, #1011)
- DragFloat, SliderFloat: Fixes to allow input of scientific notation numbers when using CTRL+Click to input the value. (~#648, #1011)
- Style: Changed default style.DisplaySafeAreaPadding values from (4,4) to (3,3) so it is smaller than FramePadding and has no effect on main menu bar on a computer. (#1439)
- Misc: Added IMGUI_CHECKVERSION() macro to compare version string and data structure sizes in order to catch issues with mismatching compilation unit settings. (#1695, #1769)
- Demo: Fixed Overlay: Added a context menu item to enable freely moving the window.
// We don't use strchr() because our strings are usually very short and often start with '%'
constchar*fmt_start=fmt;
while(charc=*fmt++)
{
if(c=='%'&&fmt[1]!='%')
returnfmt;
fmt++;
if(c!='%')continue;// Looking for %
if(fmt[0]=='%'){fmt++;continue;}// Ignore "%%"
fmt_start=fmt-1;
while((c=*fmt++)!=0)
{
if(c>='A'&&c<='Z'&&(c!='L'))// L is a type modifier, other letters qualify as types aka end of the format
break;
if(c>='a'&&c<='z'&&(c!='h'&&c!='j'&&c!='l'&&c!='t'&&c!='w'&&c!='z'))// h/j/l/t/w/z are type modifiers, other letters qualify as types aka end of the format
break;
}
if(fmt[0]==0)// If we only have leading decoration, we don't need to copy the data.