mirror of
https://github.com/ocornut/imgui.git
synced 2026-03-10 02:55:47 +00:00
Docs: fixed misc typos (#9267)
This commit is contained in:
18
imgui.cpp
18
imgui.cpp
@@ -3519,7 +3519,7 @@ bool ImGuiListClipper::Step()
|
||||
return ret;
|
||||
}
|
||||
|
||||
// Generic helper, equivalent to old ImGui::CalcListClipping() but statelesss
|
||||
// Generic helper, equivalent to old ImGui::CalcListClipping() but stateless
|
||||
void ImGui::CalcClipRectVisibleItemsY(const ImRect& clip_rect, const ImVec2& pos, float items_height, int* out_visible_start, int* out_visible_end)
|
||||
{
|
||||
*out_visible_start = ImMax((int)((clip_rect.Min.y - pos.y) / items_height), 0);
|
||||
@@ -5886,7 +5886,7 @@ static void ImGui::RenderDimmedBackgroundBehindWindow(ImGuiWindow* window, ImU32
|
||||
ImDrawList* draw_list = window->RootWindow->DrawList;
|
||||
if (draw_list->CmdBuffer.Size == 0)
|
||||
draw_list->AddDrawCmd();
|
||||
draw_list->PushClipRect(viewport_rect.Min - ImVec2(1, 1), viewport_rect.Max + ImVec2(1, 1), false); // FIXME: Need to stricty ensure ImDrawCmd are not merged (ElemCount==6 checks below will verify that)
|
||||
draw_list->PushClipRect(viewport_rect.Min - ImVec2(1, 1), viewport_rect.Max + ImVec2(1, 1), false); // FIXME: Need to strictly ensure ImDrawCmd are not merged (ElemCount==6 checks below will verify that)
|
||||
draw_list->AddRectFilled(viewport_rect.Min, viewport_rect.Max, col);
|
||||
ImDrawCmd cmd = draw_list->CmdBuffer.back();
|
||||
IM_ASSERT(cmd.ElemCount == 6);
|
||||
@@ -12277,15 +12277,15 @@ void ImGui::ClosePopupsOverWindow(ImGuiWindow* ref_window, bool restore_focus_to
|
||||
// - Each popups may contain child windows, which is why we compare ->RootWindow!
|
||||
// Window -> Popup1 -> Popup1_Child -> Popup2 -> Popup2_Child
|
||||
// We step through every popup from bottom to top to validate their position relative to reference window.
|
||||
bool ref_window_is_descendent_of_popup = false;
|
||||
bool ref_window_is_descendant_of_popup = false;
|
||||
for (int n = popup_count_to_keep; n < g.OpenPopupStack.Size; n++)
|
||||
if (ImGuiWindow* popup_window = g.OpenPopupStack[n].Window)
|
||||
if (IsWindowWithinBeginStackOf(ref_window, popup_window))
|
||||
{
|
||||
ref_window_is_descendent_of_popup = true;
|
||||
ref_window_is_descendant_of_popup = true;
|
||||
break;
|
||||
}
|
||||
if (!ref_window_is_descendent_of_popup)
|
||||
if (!ref_window_is_descendant_of_popup)
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -14751,7 +14751,7 @@ bool ImGui::BeginDragDropSource(ImGuiDragDropFlags flags)
|
||||
|
||||
// Magic fallback to handle items with no assigned ID, e.g. Text(), Image()
|
||||
// We build a throwaway ID based on current ID stack + relative AABB of items in window.
|
||||
// THE IDENTIFIER WON'T SURVIVE ANY REPOSITIONING/RESIZINGG OF THE WIDGET, so if your widget moves your dragging operation will be canceled.
|
||||
// THE IDENTIFIER WON'T SURVIVE ANY REPOSITIONING/RESIZING OF THE WIDGET, so if your widget moves your dragging operation will be canceled.
|
||||
// We don't need to maintain/call ClearActiveID() as releasing the button will early out this function and trigger !ActiveIdIsAlive.
|
||||
// Rely on keeping other window->LastItemXXX fields intact.
|
||||
source_id = g.LastItemData.ID = window->GetIDFromRectangle(g.LastItemData.Rect);
|
||||
@@ -17367,7 +17367,7 @@ void ImGui::DebugNodeFont(ImFont* font)
|
||||
src_n, src->Name, src->OversampleH, oversample_h, src->OversampleV, oversample_v, src->PixelSnapH, src->GlyphOffset.x, src->GlyphOffset.y);
|
||||
}
|
||||
|
||||
DebugNodeFontGlyphesForSrcMask(font, baked, ~0);
|
||||
DebugNodeFontGlyphsForSrcMask(font, baked, ~0);
|
||||
TreePop();
|
||||
}
|
||||
PopID();
|
||||
@@ -17376,7 +17376,7 @@ void ImGui::DebugNodeFont(ImFont* font)
|
||||
Unindent();
|
||||
}
|
||||
|
||||
void ImGui::DebugNodeFontGlyphesForSrcMask(ImFont* font, ImFontBaked* baked, int src_mask)
|
||||
void ImGui::DebugNodeFontGlyphsForSrcMask(ImFont* font, ImFontBaked* baked, int src_mask)
|
||||
{
|
||||
ImDrawList* draw_list = GetWindowDrawList();
|
||||
const ImU32 glyph_col = GetColorU32(ImGuiCol_Text);
|
||||
@@ -18147,7 +18147,7 @@ void ImGui::DebugNodeColumns(ImGuiOldColumns*) {}
|
||||
void ImGui::DebugNodeDrawList(ImGuiWindow*, ImGuiViewportP*, const ImDrawList*, const char*) {}
|
||||
void ImGui::DebugNodeDrawCmdShowMeshAndBoundingBox(ImDrawList*, const ImDrawList*, const ImDrawCmd*, bool, bool) {}
|
||||
void ImGui::DebugNodeFont(ImFont*) {}
|
||||
void ImGui::DebugNodeFontGlyphesForSrcMask(ImFont*, ImFontBaked*, int) {}
|
||||
void ImGui::DebugNodeFontGlyphsForSrcMask(ImFont*, ImFontBaked*, int) {}
|
||||
void ImGui::DebugNodeStorage(ImGuiStorage*, const char*) {}
|
||||
void ImGui::DebugNodeTabBar(ImGuiTabBar*, const char*) {}
|
||||
void ImGui::DebugNodeWindow(ImGuiWindow*, const char*) {}
|
||||
|
||||
Reference in New Issue
Block a user