Added IMGUI_DISABLE_MATH_FUNCTIONS in imconfig.h to make it slightly easier to redefine wrappers to std maths functions such as fabsf(), fmodf(), etc. Comments.
- Fonts: When building font atlas, glyphs that are missing in the fonts are not using the glyph slot to render a dummy/default glyph. Saves space and allow merging fonts with
overlapping font ranges such as FontAwesome5 which split out the Brands separately from the Solid fonts. (#1703, #1671)
- 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)
- Misc: Added IMGUI_DISABLE_MATH_FUNCTIONS in imconfig.h to make it slightly easier to redefine wrappers to std maths functions such as fabsf(), fmodf(), etc.
- Misc: Fix to allow compiling in unity builds where stb_rectpack/stb_truetype may be already included in the same compilation unit.
- Demo: Simple Overlay: Added a context menu item to enable freely moving the window.
- Demo: Added demo for DragScalar(), InputScalar(), SliderScalar(). (#643)
//---- Don't define obsolete functions/enums names. Consider enabling from time to time after updating to avoid using soon-to-be obsolete function/names
//---- Don't define obsolete functions/enums names. Consider enabling from time to time after updating to avoid using soon-to-be obsolete function/names.
//#define IMGUI_DISABLE_OBSOLETE_FUNCTIONS
//---- Don't implement default handlers for Windows (so as not to link with certain functions)
//#define IMGUI_DISABLE_WIN32_DEFAULT_CLIPBOARD_FUNCTIONS // Don't use and link with OpenClipboard/GetClipboardData/CloseClipboard etc.
//#define IMGUI_DISABLE_WIN32_DEFAULT_IME_FUNCTIONS // Don't use and link with ImmGetContext/ImmSetCompositionWindow.
//---- Don't implement demo windows functionality (ShowDemoWindow()/ShowStyleEditor()/ShowUserGuide() methods will be empty)
//---- It is very strongly recommended to NOT disable the demo windows during development. Please read the comments in imgui_demo.cpp.
//#define IMGUI_DISABLE_DEMO_WINDOWS
//---- Don't implement ImFormatString(), ImFormatStringV() so you can reimplement them yourself.
//#define IMGUI_DISABLE_FORMAT_STRING_FUNCTIONS
//---- Don't implement some functions to reduce linkage requirements.
//#define IMGUI_DISABLE_WIN32_DEFAULT_CLIPBOARD_FUNCTIONS // [Win32] Don't implement default clipboard handler. Won't use and link with OpenClipboard/GetClipboardData/CloseClipboard etc.
//#define IMGUI_DISABLE_WIN32_DEFAULT_IME_FUNCTIONS // [Win32] Don't implement default IME handler. Won't use and link with ImmGetContext/ImmSetCompositionWindow.
//#define IMGUI_DISABLE_FORMAT_STRING_FUNCTIONS // Don't implement ImFormatString(), ImFormatStringV() so you can reimplement them yourself.
//#define IMGUI_DISABLE_MATH_FUNCTIONS // Don't implement ImFabs(), ImSqrt(), ImPow(), ImFmod() so you can reimplement them yourself.
//#define IMGUI_DISABLE_DEFAULT_ALLOCATORS // Don't implement default allocators calling malloc()/free(). You will need to call ImGui::SetAllocatorFunctions().
//---- Include imgui_user.h at the end of imgui.h as a convenience
floatdby=NavScoreItemDistInterval(ImLerp(cand.Min.y,cand.Max.y,0.2f),ImLerp(cand.Min.y,cand.Max.y,0.8f),ImLerp(curr.Min.y,curr.Max.y,0.2f),ImLerp(curr.Min.y,curr.Max.y,0.8f));// Scale down on Y to keep using box-distance for vertically touching items
if(dby!=0.0f&&dbx!=0.0f)
dbx=(dbx/1000.0f)+((dbx>0.0f)?+1.0f:-1.0f);
floatdist_box=fabsf(dbx)+fabsf(dby);
floatdist_box=ImFabs(dbx)+ImFabs(dby);
// Compute distance between centers (this is off by a factor of 2, but we only compare center distances with each other so it doesn't matter)
IM_ASSERT(!g.NavScoringRectScreen.IsInverted());// Ensure if we have a finite, non-inverted bounding box here will allows us to remove extraneous fabsf() calls in NavScoreItem().
IM_ASSERT(!g.NavScoringRectScreen.IsInverted());// Ensure if we have a finite, non-inverted bounding box here will allows us to remove extraneous ImFabs() calls in NavScoreItem().
floatextra=ImClamp(fabsf(ta.x-tb.x)*0.30f,5.0f,30.0f);// add a bit of extra slack.
floatextra=ImClamp(ImFabs(ta.x-tb.x)*0.30f,5.0f,30.0f);// add a bit of extra slack.
ta.x+=(window->Pos.x<next_window->Pos.x)?-0.5f:+0.5f;// to avoid numerical issues
tb.y=ta.y+ImMax((tb.y-extra)-ta.y,-100.0f);// triangle is maximum 200 high to limit the slope and the bias toward large sub-menus // FIXME: Multiply by fb_scale?
// - ImMin/ImMax/ImClamp/ImLerp/ImSwap are used by widgets which support for variety of types: signed/unsigned int/long long float/double, using templates here but we could also redefine them 6 times