mirror of
https://github.com/ocornut/imgui.git
synced 2025-12-20 05:15:36 +00:00
Various typo fixes (#9042)
This commit is contained in:
16
imgui.cpp
16
imgui.cpp
@@ -437,7 +437,7 @@ IMPLEMENTING SUPPORT for ImGuiBackendFlags_RendererHasTextures:
|
||||
ImFontConfig cfg2;
|
||||
cfg2.MergeMode = true;
|
||||
io.Fonts->AddFontFromFileTTF("FontAwesome4.ttf", 0.0f, &cfg2);
|
||||
- You can use `Metrics/Debugger->Fonts->Font->Input Glyphs Overlap Detection Tool` to see list of glyphs available in multiple font sources. This can facilitate unde
|
||||
- You can use `Metrics/Debugger->Fonts->Font->Input Glyphs Overlap Detection Tool` to see list of glyphs available in multiple font sources. This can facilitate understanding which font input is providing which glyph.
|
||||
- Fonts: **IMPORTANT** on Thread Safety:
|
||||
- A few functions such as font->CalcTextSizeA() were, by sheer luck (== accidentally) thread-safe even thou we had never provided that guarantee. They are definitively not thread-safe anymore as new glyphs may be loaded.
|
||||
- Fonts: ImFont::FontSize was removed and does not make sense anymore. ImFont::LegacySize is the size passed to AddFont().
|
||||
@@ -11115,7 +11115,7 @@ bool ImGui::ItemAdd(const ImRect& bb, ImGuiID id, const ImRect* nav_bb_arg, ImGu
|
||||
// If we crash on a NULL g.NavWindow we need to fix the bug elsewhere.
|
||||
if (!(g.LastItemData.ItemFlags & ImGuiItemFlags_NoNav))
|
||||
{
|
||||
// FIMXE-NAV: investigate changing the window tests into a simple 'if (g.NavFocusScopeId == g.CurrentFocusScopeId)' test.
|
||||
// FIXME-NAV: investigate changing the window tests into a simple 'if (g.NavFocusScopeId == g.CurrentFocusScopeId)' test.
|
||||
window->DC.NavLayersActiveMaskNext |= (1 << window->DC.NavLayerCurrent);
|
||||
if (g.NavId == id || g.NavAnyRequest)
|
||||
if (g.NavWindow->RootWindowForNav == window->RootWindowForNav)
|
||||
@@ -11897,7 +11897,7 @@ bool ImGui::BeginTooltipEx(ImGuiTooltipFlags tooltip_flags, ImGuiWindowFlags ext
|
||||
}
|
||||
|
||||
SetNextWindowBgAlpha(g.Style.Colors[ImGuiCol_PopupBg].w * 0.60f);
|
||||
//PushStyleVar(ImGuiStyleVar_Alpha, g.Style.Alpha * 0.60f); // This would be nice but e.g ColorButton with checkboard has issue with transparent colors :(
|
||||
//PushStyleVar(ImGuiStyleVar_Alpha, g.Style.Alpha * 0.60f); // This would be nice but e.g ColorButton with checkerboard has issue with transparent colors :(
|
||||
tooltip_flags |= ImGuiTooltipFlags_OverridePrevious;
|
||||
}
|
||||
|
||||
@@ -12454,10 +12454,10 @@ ImVec2 ImGui::FindBestWindowPosForPopupEx(const ImVec2& ref_pos, const ImVec2& s
|
||||
// Combo Box policy (we want a connecting edge)
|
||||
if (policy == ImGuiPopupPositionPolicy_ComboBox)
|
||||
{
|
||||
const ImGuiDir dir_prefered_order[ImGuiDir_COUNT] = { ImGuiDir_Down, ImGuiDir_Right, ImGuiDir_Left, ImGuiDir_Up };
|
||||
const ImGuiDir dir_preferred_order[ImGuiDir_COUNT] = { ImGuiDir_Down, ImGuiDir_Right, ImGuiDir_Left, ImGuiDir_Up };
|
||||
for (int n = (*last_dir != ImGuiDir_None) ? -1 : 0; n < ImGuiDir_COUNT; n++)
|
||||
{
|
||||
const ImGuiDir dir = (n == -1) ? *last_dir : dir_prefered_order[n];
|
||||
const ImGuiDir dir = (n == -1) ? *last_dir : dir_preferred_order[n];
|
||||
if (n != -1 && dir == *last_dir) // Already tried this direction?
|
||||
continue;
|
||||
ImVec2 pos;
|
||||
@@ -12476,10 +12476,10 @@ ImVec2 ImGui::FindBestWindowPosForPopupEx(const ImVec2& ref_pos, const ImVec2& s
|
||||
// (Always first try the direction we used on the last frame, if any)
|
||||
if (policy == ImGuiPopupPositionPolicy_Tooltip || policy == ImGuiPopupPositionPolicy_Default)
|
||||
{
|
||||
const ImGuiDir dir_prefered_order[ImGuiDir_COUNT] = { ImGuiDir_Right, ImGuiDir_Down, ImGuiDir_Up, ImGuiDir_Left };
|
||||
const ImGuiDir dir_preferred_order[ImGuiDir_COUNT] = { ImGuiDir_Right, ImGuiDir_Down, ImGuiDir_Up, ImGuiDir_Left };
|
||||
for (int n = (*last_dir != ImGuiDir_None) ? -1 : 0; n < ImGuiDir_COUNT; n++)
|
||||
{
|
||||
const ImGuiDir dir = (n == -1) ? *last_dir : dir_prefered_order[n];
|
||||
const ImGuiDir dir = (n == -1) ? *last_dir : dir_preferred_order[n];
|
||||
if (n != -1 && dir == *last_dir) // Already tried this direction?
|
||||
continue;
|
||||
|
||||
@@ -14671,7 +14671,7 @@ bool ImGui::BeginDragDropSource(ImGuiDragDropFlags flags)
|
||||
ret = BeginTooltipHidden();
|
||||
else
|
||||
ret = BeginTooltip();
|
||||
IM_ASSERT(ret); // FIXME-NEWBEGIN: If this ever becomes false, we need to Begin("##Hidden", NULL, ImGuiWindowFlags_NoSavedSettings) + SetWindowHiddendAndSkipItemsForCurrentFrame().
|
||||
IM_ASSERT(ret); // FIXME-NEWBEGIN: If this ever becomes false, we need to Begin("##Hidden", NULL, ImGuiWindowFlags_NoSavedSettings) + SetWindowHiddenAndSkipItemsForCurrentFrame().
|
||||
IM_UNUSED(ret);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user