Skip to content

Commit 3c3d943

Browse files
tanksdudeocornut
authored andcommitted
Docs: Fix some typos (#8473)
1 parent 806731e commit 3c3d943

12 files changed

+91
-91
lines changed

backends/imgui_impl_opengl3.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@
5454
// 2021-01-03: OpenGL: Backup, setup and restore GL_STENCIL_TEST state.
5555
// 2020-10-23: OpenGL: Backup, setup and restore GL_PRIMITIVE_RESTART state.
5656
// 2020-10-15: OpenGL: Use glGetString(GL_VERSION) instead of glGetIntegerv(GL_MAJOR_VERSION, ...) when the later returns zero (e.g. Desktop GL 2.x)
57-
// 2020-09-17: OpenGL: Fix to avoid compiling/calling glBindSampler() on ES or pre 3.3 context which have the defines set by a loader.
57+
// 2020-09-17: OpenGL: Fix to avoid compiling/calling glBindSampler() on ES or pre-3.3 context which have the defines set by a loader.
5858
// 2020-07-10: OpenGL: Added support for glad2 OpenGL loader.
5959
// 2020-05-08: OpenGL: Made default GLSL version 150 (instead of 130) on OSX.
6060
// 2020-04-21: OpenGL: Fixed handling of glClipControl(GL_UPPER_LEFT) by inverting projection matrix.

backends/imgui_impl_osx.mm

+1-1
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939
// 2024-07-02: Update for io.SetPlatformImeDataFn() -> io.PlatformSetImeDataFn() renaming in main library.
4040
// 2023-10-05: Inputs: Added support for extra ImGuiKey values: F13 to F20 function keys. Stopped mapping F13 into PrintScreen.
4141
// 2023-04-09: Inputs: Added support for io.AddMouseSourceEvent() to discriminate ImGuiMouseSource_Mouse/ImGuiMouseSource_Pen.
42-
// 2023-02-01: Fixed scroll wheel scaling for devices emitting events with hasPreciseScrollingDeltas==false (e.g. non-Apple mices).
42+
// 2023-02-01: Fixed scroll wheel scaling for devices emitting events with hasPreciseScrollingDeltas==false (e.g. non-Apple mice).
4343
// 2022-11-02: Fixed mouse coordinates before clicking the host window.
4444
// 2022-10-06: Fixed mouse inputs on flipped views.
4545
// 2022-09-26: Inputs: Renamed ImGuiKey_ModXXX introduced in 1.87 to ImGuiMod_XXX (old names still supported).

backends/imgui_impl_vulkan.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@
5353
// 2022-10-11: Using 'nullptr' instead of 'NULL' as per our switch to C++11.
5454
// 2022-10-04: Vulkan: Added experimental ImGui_ImplVulkan_RemoveTexture() for api symmetry. (#914, #5738).
5555
// 2022-01-20: Vulkan: Added support for ImTextureID as VkDescriptorSet. User need to call ImGui_ImplVulkan_AddTexture(). Building for 32-bit targets requires '#define ImTextureID ImU64'. (#914).
56-
// 2021-10-15: Vulkan: Call vkCmdSetScissor() at the end of render a full-viewport to reduce likehood of issues with people using VK_DYNAMIC_STATE_SCISSOR in their app without calling vkCmdSetScissor() explicitly every frame.
56+
// 2021-10-15: Vulkan: Call vkCmdSetScissor() at the end of render a full-viewport to reduce likelihood of issues with people using VK_DYNAMIC_STATE_SCISSOR in their app without calling vkCmdSetScissor() explicitly every frame.
5757
// 2021-06-29: Reorganized backend to pull data from a single structure to facilitate usage with multiple-contexts (all g_XXXX access changed to bd->XXXX).
5858
// 2021-03-22: Vulkan: Fix mapped memory validation error when buffer sizes are not multiple of VkPhysicalDeviceLimits::nonCoherentAtomSize.
5959
// 2021-02-18: Vulkan: Change blending equation to preserve alpha in output buffer.

docs/CHANGELOG.txt

+69-69
Large diffs are not rendered by default.

docs/FAQ.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -543,7 +543,7 @@ The short answer is: obtain the desired DPI scale, load your fonts resized with
543543
544544
Your application may want to detect DPI change and reload the fonts and reset style between frames.
545545
546-
Your ui code should avoid using hardcoded constants for size and positioning. Prefer to express values as multiple of reference values such as `ImGui::GetFontSize()` or `ImGui::GetFrameHeight()`. So e.g. instead of seeing a hardcoded height of 500 for a given item/window, you may want to use `30*ImGui::GetFontSize()` instead.
546+
Your UI code should avoid using hardcoded constants for size and positioning. Prefer to express values as multiple of reference values such as `ImGui::GetFontSize()` or `ImGui::GetFrameHeight()`. So e.g. instead of seeing a hardcoded height of 500 for a given item/window, you may want to use `30*ImGui::GetFontSize()` instead.
547547
548548
Down the line Dear ImGui will provide a variety of standardized reference values to facilitate using this.
549549
@@ -666,7 +666,7 @@ You may take a look at:
666666

667667
Yes. People have written game editors, data browsers, debuggers, profilers, and all sorts of non-trivial tools with the library. In my experience, the simplicity of the API is very empowering. Your UI runs close to your live data. Make the tools always-on and everybody in the team will be inclined to create new tools (as opposed to more "offline" UI toolkits where only a fraction of your team effectively creates tools). The list of sponsors below is also an indicator that serious game teams have been using the library.
668668

669-
Dear ImGui is very programmer centric and the immediate-mode GUI paradigm might require you to readjust some habits before you can realize its full potential. Dear ImGui is about making things that are simple, efficient, and powerful.
669+
Dear ImGui is very programmer-centric and the immediate-mode GUI paradigm might require you to readjust some habits before you can realize its full potential. Dear ImGui is about making things that are simple, efficient, and powerful.
670670

671671
Dear ImGui is built to be efficient and scalable toward the needs for AAA-quality applications running all day. The IMGUI paradigm offers different opportunities for optimization than the more typical RMGUI paradigm.
672672

docs/TODO.txt

+2-2
Original file line numberDiff line numberDiff line change
@@ -279,7 +279,7 @@ It's mostly a bunch of personal notes, probably incomplete. Feel free to query i
279279
- nav: expose wrap around flags/logic to allow e.g. grid based layout (pressing NavRight on the right-most element would go to the next row, etc.). see internal's NavMoveRequestTryWrapping().
280280
- nav: patterns to make it possible for arrows key to update selection (see JustMovedTo in range_select branch)
281281
- nav: restore/find nearest NavId when current one disappear (e.g. pressed a button that disappear, or perhaps auto restoring when current button change name)
282-
- nav: SetItemDefaultFocus() level of priority, so widget like Selectable when inside a popup could claim a low-priority default focus on the first selected iem
282+
- nav: SetItemDefaultFocus() level of priority, so widgets like Selectable when inside a popup could claim a low-priority default focus on the first selected item
283283
- nav: holding space to repeat a button doesn't show button activated during hold.
284284
- nav: NavFlattened: init requests don't work properly on flattened siblings.
285285
- nav: NavFlattened: pageup/pagedown/home/end don't work properly on flattened siblings.
@@ -329,7 +329,7 @@ It's mostly a bunch of personal notes, probably incomplete. Feel free to query i
329329
- backends: opengl: explicitly disable GL_STENCIL_TEST in bindings.
330330
- backends: vulkan: viewport: support for synchronized swapping of multiple swap chains.
331331
- backends: bgfx: https://gist.github.com/RichardGale/6e2b74bc42b3005e08397236e4be0fd0
332-
- backends: emscriptem: with refactored examples, we could provide a direct imgui_impl_emscripten platform layer (see eg. https://github.com/floooh/sokol-samples/blob/master/html5/imgui-emsc.cc#L42)
332+
- backends: emscripten: with refactored examples, we could provide a direct imgui_impl_emscripten platform layer (see eg. https://github.com/floooh/sokol-samples/blob/master/html5/imgui-emsc.cc#L42)
333333

334334
- bindings: ways to use clang ast dump to generate bindings or helpers for bindings? (e.g. clang++ -Xclang -ast-dump=json imgui.h) (--> use https://github.com/dearimgui/dear_bindings)
335335

imgui.cpp

+5-5
Original file line numberDiff line numberDiff line change
@@ -655,7 +655,7 @@ CODE
655655
- 2022/04/05 (1.88) - inputs: renamed ImGuiKeyModFlags to ImGuiModFlags. Kept inline redirection enums (will obsolete). This was never used in public API functions but technically present in imgui.h and ImGuiIO.
656656
- 2022/01/20 (1.87) - inputs: reworded gamepad IO.
657657
- Backend writing to io.NavInputs[] -> backend should call io.AddKeyEvent()/io.AddKeyAnalogEvent() with ImGuiKey_GamepadXXX values.
658-
- 2022/01/19 (1.87) - sliders, drags: removed support for legacy arithmetic operators (+,+-,*,/) when inputing text. This doesn't break any api/code but a feature that used to be accessible by end-users (which seemingly no one used).
658+
- 2022/01/19 (1.87) - sliders, drags: removed support for legacy arithmetic operators (+,+-,*,/) when inputting text. This doesn't break any api/code but a feature that used to be accessible by end-users (which seemingly no one used).
659659
- 2022/01/17 (1.87) - inputs: reworked mouse IO.
660660
- Backend writing to io.MousePos -> backend should call io.AddMousePosEvent()
661661
- Backend writing to io.MouseDown[] -> backend should call io.AddMouseButtonEvent()
@@ -4954,7 +4954,7 @@ void ImGui::StartMouseMovingWindow(ImGuiWindow* window)
49544954

49554955
// Handle mouse moving window
49564956
// Note: moving window with the navigation keys (Square + d-pad / CTRL+TAB + Arrows) are processed in NavUpdateWindowing()
4957-
// FIXME: We don't have strong guarantee that g.MovingWindow stay synched with g.ActiveId == g.MovingWindow->MoveId.
4957+
// FIXME: We don't have strong guarantee that g.MovingWindow stay synced with g.ActiveId == g.MovingWindow->MoveId.
49584958
// This is currently enforced by the fact that BeginDragDropSource() is setting all g.ActiveIdUsingXXXX flags to inhibit navigation inputs,
49594959
// but if we should more thoroughly test cases where g.ActiveId or g.MovingWindow gets changed and not the other.
49604960
void ImGui::UpdateMouseMovingWindowNewFrame()
@@ -6563,7 +6563,7 @@ static int ImGui::UpdateWindowManualResize(ImGuiWindow* window, const ImVec2& si
65636563
{
65646564
// Auto-fit when double-clicking
65656565
size_target = CalcWindowSizeAfterConstraint(window, size_auto_fit);
6566-
ret_auto_fit_mask = 0x03; // Both axises
6566+
ret_auto_fit_mask = 0x03; // Both axes
65676567
ClearActiveID();
65686568
}
65696569
else if (held)
@@ -9701,7 +9701,7 @@ void ImGui::UpdateMouseWheel()
97019701
if (g.IO.MouseWheelRequestAxisSwap)
97029702
wheel = ImVec2(wheel.y, 0.0f);
97039703

9704-
// Maintain a rough average of moving magnitude on both axises
9704+
// Maintain a rough average of moving magnitude on both axes
97059705
// FIXME: should by based on wall clock time rather than frame-counter
97069706
g.WheelingAxisAvg.x = ImExponentialMovingAverage(g.WheelingAxisAvg.x, ImAbs(wheel.x), 30);
97079707
g.WheelingAxisAvg.y = ImExponentialMovingAverage(g.WheelingAxisAvg.y, ImAbs(wheel.y), 30);
@@ -9714,7 +9714,7 @@ void ImGui::UpdateMouseWheel()
97149714

97159715
// Mouse wheel scrolling: find target and apply
97169716
// - don't renew lock if axis doesn't apply on the window.
9717-
// - select a main axis when both axises are being moved.
9717+
// - select a main axis when both axes are being moved.
97189718
if (ImGuiWindow* window = (g.WheelingWindow ? g.WheelingWindow : FindBestWheelingWindow(wheel)))
97199719
if (!(window->Flags & ImGuiWindowFlags_NoScrollWithMouse) && !(window->Flags & ImGuiWindowFlags_NoMouseInputs))
97209720
{

imgui.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -544,7 +544,7 @@ namespace ImGui
544544
IMGUI_API void LabelTextV(const char* label, const char* fmt, va_list args) IM_FMTLIST(2);
545545
IMGUI_API void BulletText(const char* fmt, ...) IM_FMTARGS(1); // shortcut for Bullet()+Text()
546546
IMGUI_API void BulletTextV(const char* fmt, va_list args) IM_FMTLIST(1);
547-
IMGUI_API void SeparatorText(const char* label); // currently: formatted text with an horizontal line
547+
IMGUI_API void SeparatorText(const char* label); // currently: formatted text with a horizontal line
548548

549549
// Widgets: Main
550550
// - Most widgets return true when the value has been changed or when pressed/selected

imgui_demo.cpp

+3-3
Original file line numberDiff line numberDiff line change
@@ -8415,7 +8415,7 @@ void ImGui::ShowStyleEditor(ImGuiStyle* ref)
84158415
ImGui::EndTooltip();
84168416
}
84178417
ImGui::SameLine();
8418-
HelpMarker("When drawing circle primitives with \"num_segments == 0\" tesselation will be calculated automatically.");
8418+
HelpMarker("When drawing circle primitives with \"num_segments == 0\" tessellation will be calculated automatically.");
84198419

84208420
ImGui::DragFloat("Global Alpha", &style.Alpha, 0.005f, 0.20f, 1.0f, "%.2f"); // Not exposing zero here so user doesn't "lose" the UI (zero alpha clips all widgets). But application code could have a toggle to switch between zero and non-zero.
84218421
ImGui::DragFloat("Disabled Alpha", &style.DisabledAlpha, 0.005f, 0.0f, 1.0f, "%.2f"); ImGui::SameLine(); HelpMarker("Additional alpha multiplier for disabled items (multiply over current value of Alpha).");
@@ -8446,7 +8446,7 @@ void ImGui::ShowUserGuide()
84468446
ImGui::BulletText("CTRL+Tab to select a window.");
84478447
if (io.FontAllowUserScaling)
84488448
ImGui::BulletText("CTRL+Mouse Wheel to zoom window contents.");
8449-
ImGui::BulletText("While inputing text:\n");
8449+
ImGui::BulletText("While inputting text:\n");
84508450
ImGui::Indent();
84518451
ImGui::BulletText("CTRL+Left/Right to word jump.");
84528452
ImGui::BulletText("CTRL+A or double-click to select all.");
@@ -8877,7 +8877,7 @@ struct ExampleAppConsole
88778877
else
88788878
{
88798879
// Multiple matches. Complete as much as we can..
8880-
// So inputing "C"+Tab will complete to "CL" then display "CLEAR" and "CLASSIFY" as matches.
8880+
// So inputting "C"+Tab will complete to "CL" then display "CLEAR" and "CLASSIFY" as matches.
88818881
int match_len = (int)(word_end - word_start);
88828882
for (;;)
88838883
{

imgui_internal.h

+3-3
Original file line numberDiff line numberDiff line change
@@ -2801,7 +2801,7 @@ struct IMGUI_API ImGuiTable
28012801
{
28022802
ImGuiID ID;
28032803
ImGuiTableFlags Flags;
2804-
void* RawData; // Single allocation to hold Columns[], DisplayOrderToIndex[] and RowCellData[]
2804+
void* RawData; // Single allocation to hold Columns[], DisplayOrderToIndex[], and RowCellData[]
28052805
ImGuiTableTempData* TempData; // Transient data while table is active. Point within g.CurrentTableStack[]
28062806
ImSpan<ImGuiTableColumn> Columns; // Point within RawData[]
28072807
ImSpan<ImGuiTableColumnIdx> DisplayOrderToIndex; // Point within RawData[]. Store display order of columns (when not reordered, the values are 0...Count-1)
@@ -2815,7 +2815,7 @@ struct IMGUI_API ImGuiTable
28152815
int ColumnsCount; // Number of columns declared in BeginTable()
28162816
int CurrentRow;
28172817
int CurrentColumn;
2818-
ImS16 InstanceCurrent; // Count of BeginTable() calls with same ID in the same frame (generally 0). This is a little bit similar to BeginCount for a window, but multiple table with same ID look are multiple tables, they are just synched.
2818+
ImS16 InstanceCurrent; // Count of BeginTable() calls with same ID in the same frame (generally 0). This is a little bit similar to BeginCount for a window, but multiple tables with the same ID are multiple tables, they are just synced.
28192819
ImS16 InstanceInteracted; // Mark which instance (generally 0) of the same ID is being interacted with
28202820
float RowPosY1;
28212821
float RowPosY2;
@@ -2847,7 +2847,7 @@ struct IMGUI_API ImGuiTable
28472847
float AngledHeadersHeight; // Set by TableAngledHeadersRow(), used in TableUpdateLayout()
28482848
float AngledHeadersSlope; // Set by TableAngledHeadersRow(), used in TableUpdateLayout()
28492849
ImRect OuterRect; // Note: for non-scrolling table, OuterRect.Max.y is often FLT_MAX until EndTable(), unless a height has been specified in BeginTable().
2850-
ImRect InnerRect; // InnerRect but without decoration. As with OuterRect, for non-scrolling tables, InnerRect.Max.y is
2850+
ImRect InnerRect; // InnerRect but without decoration. As with OuterRect, for non-scrolling tables, InnerRect.Max.y is "
28512851
ImRect WorkRect;
28522852
ImRect InnerClipRect;
28532853
ImRect BgClipRect; // We use this to cpu-clip cell background color fill, evolve during the frame as we cross frozen rows boundaries

imgui_tables.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -977,7 +977,7 @@ void ImGui::TableUpdateLayout(ImGuiTable* table)
977977
// [Part 4] Apply final widths based on requested widths
978978
const ImRect work_rect = table->WorkRect;
979979
const float width_spacings = (table->OuterPaddingX * 2.0f) + (table->CellSpacingX1 + table->CellSpacingX2) * (table->ColumnsEnabledCount - 1);
980-
const float width_removed = (table->HasScrollbarYPrev && !table->InnerWindow->ScrollbarY) ? g.Style.ScrollbarSize : 0.0f; // To synchronize decoration width of synched tables with mismatching scrollbar state (#5920)
980+
const float width_removed = (table->HasScrollbarYPrev && !table->InnerWindow->ScrollbarY) ? g.Style.ScrollbarSize : 0.0f; // To synchronize decoration width of synced tables with mismatching scrollbar state (#5920)
981981
const float width_avail = ImMax(1.0f, (((table->Flags & ImGuiTableFlags_ScrollX) && table->InnerWidth == 0.0f) ? table->InnerClipRect.GetWidth() : work_rect.GetWidth()) - width_removed);
982982
const float width_avail_for_stretched_columns = width_avail - width_spacings - sum_width_requests;
983983
float width_remaining_for_stretched_columns = width_avail_for_stretched_columns;
@@ -1390,7 +1390,7 @@ void ImGui::EndTable()
13901390

13911391
// Setup inner scrolling range
13921392
// FIXME: This ideally should be done earlier, in BeginTable() SetNextWindowContentSize call, just like writing to inner_window->DC.CursorMaxPos.y,
1393-
// but since the later is likely to be impossible to do we'd rather update both axises together.
1393+
// but since the later is likely to be impossible to do we'd rather update both axes together.
13941394
if (table->Flags & ImGuiTableFlags_ScrollX)
13951395
{
13961396
const float outer_padding_for_border = (table->Flags & ImGuiTableFlags_BordersOuterV) ? TABLE_BORDER_SIZE : 0.0f;

imgui_widgets.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -8898,7 +8898,7 @@ bool ImGui::BeginMenuEx(const char* label, const char* icon, bool enabled)
88988898
const ImGuiSelectableFlags selectable_flags = ImGuiSelectableFlags_NoHoldingActiveID | ImGuiSelectableFlags_NoSetKeyOwner | ImGuiSelectableFlags_SelectOnClick | ImGuiSelectableFlags_NoAutoClosePopups;
88998899
if (window->DC.LayoutType == ImGuiLayoutType_Horizontal)
89008900
{
8901-
// Menu inside an horizontal menu bar
8901+
// Menu inside a horizontal menu bar
89028902
// Selectable extend their highlight by half ItemSpacing in each direction.
89038903
// For ChildMenu, the popup position will be overwritten by the call to FindBestWindowPosForPopup() in Begin()
89048904
popup_pos = ImVec2(pos.x - 1.0f - IM_TRUNC(style.ItemSpacing.x * 0.5f), pos.y - style.FramePadding.y + window->MenuBarHeight);

0 commit comments

Comments
 (0)