Skip to content

Commit a3546b5

Browse files
authored
Various typo fixes (#9042)
1 parent 823ccc2 commit a3546b5

File tree

7 files changed

+25
-25
lines changed

7 files changed

+25
-25
lines changed

imgui.cpp

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -437,7 +437,7 @@ IMPLEMENTING SUPPORT for ImGuiBackendFlags_RendererHasTextures:
437437
ImFontConfig cfg2;
438438
cfg2.MergeMode = true;
439439
io.Fonts->AddFontFromFileTTF("FontAwesome4.ttf", 0.0f, &cfg2);
440-
- 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
440+
- 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.
441441
- Fonts: **IMPORTANT** on Thread Safety:
442442
- 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.
443443
- 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
1111511115
// If we crash on a NULL g.NavWindow we need to fix the bug elsewhere.
1111611116
if (!(g.LastItemData.ItemFlags & ImGuiItemFlags_NoNav))
1111711117
{
11118-
// FIMXE-NAV: investigate changing the window tests into a simple 'if (g.NavFocusScopeId == g.CurrentFocusScopeId)' test.
11118+
// FIXME-NAV: investigate changing the window tests into a simple 'if (g.NavFocusScopeId == g.CurrentFocusScopeId)' test.
1111911119
window->DC.NavLayersActiveMaskNext |= (1 << window->DC.NavLayerCurrent);
1112011120
if (g.NavId == id || g.NavAnyRequest)
1112111121
if (g.NavWindow->RootWindowForNav == window->RootWindowForNav)
@@ -11897,7 +11897,7 @@ bool ImGui::BeginTooltipEx(ImGuiTooltipFlags tooltip_flags, ImGuiWindowFlags ext
1189711897
}
1189811898

1189911899
SetNextWindowBgAlpha(g.Style.Colors[ImGuiCol_PopupBg].w * 0.60f);
11900-
//PushStyleVar(ImGuiStyleVar_Alpha, g.Style.Alpha * 0.60f); // This would be nice but e.g ColorButton with checkboard has issue with transparent colors :(
11900+
//PushStyleVar(ImGuiStyleVar_Alpha, g.Style.Alpha * 0.60f); // This would be nice but e.g ColorButton with checkerboard has issue with transparent colors :(
1190111901
tooltip_flags |= ImGuiTooltipFlags_OverridePrevious;
1190211902
}
1190311903

@@ -12454,10 +12454,10 @@ ImVec2 ImGui::FindBestWindowPosForPopupEx(const ImVec2& ref_pos, const ImVec2& s
1245412454
// Combo Box policy (we want a connecting edge)
1245512455
if (policy == ImGuiPopupPositionPolicy_ComboBox)
1245612456
{
12457-
const ImGuiDir dir_prefered_order[ImGuiDir_COUNT] = { ImGuiDir_Down, ImGuiDir_Right, ImGuiDir_Left, ImGuiDir_Up };
12457+
const ImGuiDir dir_preferred_order[ImGuiDir_COUNT] = { ImGuiDir_Down, ImGuiDir_Right, ImGuiDir_Left, ImGuiDir_Up };
1245812458
for (int n = (*last_dir != ImGuiDir_None) ? -1 : 0; n < ImGuiDir_COUNT; n++)
1245912459
{
12460-
const ImGuiDir dir = (n == -1) ? *last_dir : dir_prefered_order[n];
12460+
const ImGuiDir dir = (n == -1) ? *last_dir : dir_preferred_order[n];
1246112461
if (n != -1 && dir == *last_dir) // Already tried this direction?
1246212462
continue;
1246312463
ImVec2 pos;
@@ -12476,10 +12476,10 @@ ImVec2 ImGui::FindBestWindowPosForPopupEx(const ImVec2& ref_pos, const ImVec2& s
1247612476
// (Always first try the direction we used on the last frame, if any)
1247712477
if (policy == ImGuiPopupPositionPolicy_Tooltip || policy == ImGuiPopupPositionPolicy_Default)
1247812478
{
12479-
const ImGuiDir dir_prefered_order[ImGuiDir_COUNT] = { ImGuiDir_Right, ImGuiDir_Down, ImGuiDir_Up, ImGuiDir_Left };
12479+
const ImGuiDir dir_preferred_order[ImGuiDir_COUNT] = { ImGuiDir_Right, ImGuiDir_Down, ImGuiDir_Up, ImGuiDir_Left };
1248012480
for (int n = (*last_dir != ImGuiDir_None) ? -1 : 0; n < ImGuiDir_COUNT; n++)
1248112481
{
12482-
const ImGuiDir dir = (n == -1) ? *last_dir : dir_prefered_order[n];
12482+
const ImGuiDir dir = (n == -1) ? *last_dir : dir_preferred_order[n];
1248312483
if (n != -1 && dir == *last_dir) // Already tried this direction?
1248412484
continue;
1248512485

@@ -14671,7 +14671,7 @@ bool ImGui::BeginDragDropSource(ImGuiDragDropFlags flags)
1467114671
ret = BeginTooltipHidden();
1467214672
else
1467314673
ret = BeginTooltip();
14674-
IM_ASSERT(ret); // FIXME-NEWBEGIN: If this ever becomes false, we need to Begin("##Hidden", NULL, ImGuiWindowFlags_NoSavedSettings) + SetWindowHiddendAndSkipItemsForCurrentFrame().
14674+
IM_ASSERT(ret); // FIXME-NEWBEGIN: If this ever becomes false, we need to Begin("##Hidden", NULL, ImGuiWindowFlags_NoSavedSettings) + SetWindowHiddenAndSkipItemsForCurrentFrame().
1467514675
IM_UNUSED(ret);
1467614676
}
1467714677

imgui.h

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -333,7 +333,7 @@ IM_MSVC_RUNTIME_CHECKS_RESTORE
333333
// - You may decide to store a higher-level structure containing texture, sampler, shader etc. with various
334334
// constructors if you like. You will need to implement ==/!= operators.
335335
// History:
336-
// - In v1.91.4 (2024/10/08): the default type for ImTextureID was changed from 'void*' to 'ImU64'. This allowed backends requirig 64-bit worth of data to build on 32-bit architectures. Use intermediary intptr_t cast and read FAQ if you have casting warnings.
336+
// - In v1.91.4 (2024/10/08): the default type for ImTextureID was changed from 'void*' to 'ImU64'. This allowed backends requiring 64-bit worth of data to build on 32-bit architectures. Use intermediary intptr_t cast and read FAQ if you have casting warnings.
337337
// - In v1.92.0 (2025/06/11): added ImTextureRef which carry either a ImTextureID either a pointer to internal texture atlas. All user facing functions taking ImTextureID changed to ImTextureRef
338338
#ifndef ImTextureID
339339
typedef ImU64 ImTextureID; // Default: store up to 64-bits (any pointer or integer). A majority of backends are ok with that.
@@ -738,7 +738,7 @@ namespace ImGui
738738
// Widgets: Trees
739739
// - TreeNode functions return true when the node is open, in which case you need to also call TreePop() when you are finished displaying the tree node contents.
740740
IMGUI_API bool TreeNode(const char* label);
741-
IMGUI_API bool TreeNode(const char* str_id, const char* fmt, ...) IM_FMTARGS(2); // helper variation to easily decorelate the id from the displayed string. Read the FAQ about why and how to use ID. to align arbitrary text at the same level as a TreeNode() you can use Bullet().
741+
IMGUI_API bool TreeNode(const char* str_id, const char* fmt, ...) IM_FMTARGS(2); // helper variation to easily decorrelate the id from the displayed string. Read the FAQ about why and how to use ID. to align arbitrary text at the same level as a TreeNode() you can use Bullet().
742742
IMGUI_API bool TreeNode(const void* ptr_id, const char* fmt, ...) IM_FMTARGS(2); // "
743743
IMGUI_API bool TreeNodeV(const char* str_id, const char* fmt, va_list args) IM_FMTLIST(2);
744744
IMGUI_API bool TreeNodeV(const void* ptr_id, const char* fmt, va_list args) IM_FMTLIST(2);
@@ -1275,7 +1275,7 @@ enum ImGuiInputTextFlags_
12751275
// - It is much slower than regular text fields.
12761276
// Ballpark estimate of cost on my 2019 desktop PC: for a 100 KB text buffer: +~0.3 ms (Optimized) / +~1.0 ms (Debug build).
12771277
// The CPU cost is very roughly proportional to text length, so a 10 KB buffer should cost about ten times less.
1278-
ImGuiInputTextFlags_WordWrap = 1 << 24, // InputTextMultine(): word-wrap lines that are too long.
1278+
ImGuiInputTextFlags_WordWrap = 1 << 24, // InputTextMultiline(): word-wrap lines that are too long.
12791279

12801280
// Obsolete names
12811281
//ImGuiInputTextFlags_AlwaysInsertMode = ImGuiInputTextFlags_AlwaysOverwrite // [renamed in 1.82] name was not matching behavior
@@ -1302,7 +1302,7 @@ enum ImGuiTreeNodeFlags_
13021302
ImGuiTreeNodeFlags_SpanAllColumns = 1 << 14, // Frame will span all columns of its container table (label will still fit in current column)
13031303
ImGuiTreeNodeFlags_LabelSpanAllColumns = 1 << 15, // Label will span all columns of its container table
13041304
//ImGuiTreeNodeFlags_NoScrollOnOpen = 1 << 16, // FIXME: TODO: Disable automatic scroll on TreePop() if node got just open and contents is not visible
1305-
ImGuiTreeNodeFlags_NavLeftJumpsToParent = 1 << 17, // Nav: left arrow moves back to parent. This is processed in TreePop() when there's an unfullfilled Left nav request remaining.
1305+
ImGuiTreeNodeFlags_NavLeftJumpsToParent = 1 << 17, // Nav: left arrow moves back to parent. This is processed in TreePop() when there's an unfulfilled Left nav request remaining.
13061306
ImGuiTreeNodeFlags_CollapsingHeader = ImGuiTreeNodeFlags_Framed | ImGuiTreeNodeFlags_NoTreePushOnOpen | ImGuiTreeNodeFlags_NoAutoOpenOnLog,
13071307

13081308
// [EXPERIMENTAL] Draw lines connecting TreeNode hierarchy. Discuss in GitHub issue #2920.
@@ -2290,7 +2290,7 @@ struct ImGuiStyle
22902290
float ColumnsMinSpacing; // Minimum horizontal spacing between two columns. Preferably > (FramePadding.x + 1).
22912291
float ScrollbarSize; // Width of the vertical scrollbar, Height of the horizontal scrollbar.
22922292
float ScrollbarRounding; // Radius of grab corners for scrollbar.
2293-
float ScrollbarPadding; // Padding of scrollbar grab within its frame (same for both axises).
2293+
float ScrollbarPadding; // Padding of scrollbar grab within its frame (same for both axes).
22942294
float GrabMinSize; // Minimum width/height of a grab box for slider/scrollbar.
22952295
float GrabRounding; // Radius of grabs corners rounding. Set to 0.0f to have rectangular slider grabs.
22962296
float LogSliderDeadzone; // The size in pixels of the dead-zone around zero on logarithmic sliders that cross zero.
@@ -3409,7 +3409,7 @@ struct ImDrawData
34093409
ImVec2 DisplaySize; // Size of the viewport to render (== GetMainViewport()->Size for the main viewport, == io.DisplaySize in most single-viewport applications)
34103410
ImVec2 FramebufferScale; // Amount of pixels for each unit of DisplaySize. Copied from viewport->FramebufferScale (== io.DisplayFramebufferScale for main viewport). Generally (1,1) on normal display, (2,2) on OSX with Retina display.
34113411
ImGuiViewport* OwnerViewport; // Viewport carrying the ImDrawData instance, might be of use to the renderer (generally not).
3412-
ImVector<ImTextureData*>* Textures; // List of textures to update. Most of the times the list is shared by all ImDrawData, has only 1 texture and it doesn't need any update. This almost always points to ImGui::GetPlatformIO().Textures[]. May be overriden or set to NULL if you want to manually update textures.
3412+
ImVector<ImTextureData*>* Textures; // List of textures to update. Most of the times the list is shared by all ImDrawData, has only 1 texture and it doesn't need any update. This almost always points to ImGui::GetPlatformIO().Textures[]. May be overridden or set to NULL if you want to manually update textures.
34133413

34143414
// Functions
34153415
ImDrawData() { Clear(); }
@@ -4133,7 +4133,7 @@ typedef ImFontAtlasRect ImFontAtlasCustomRect;
41334133
//};
41344134

41354135
// RENAMED and MERGED both ImGuiKey_ModXXX and ImGuiModFlags_XXX into ImGuiMod_XXX (from September 2022)
4136-
// RENAMED ImGuiKeyModFlags -> ImGuiModFlags in 1.88 (from April 2022). Exceptionally commented out ahead of obscolescence schedule to reduce confusion and because they were not meant to be used in the first place.
4136+
// RENAMED ImGuiKeyModFlags -> ImGuiModFlags in 1.88 (from April 2022). Exceptionally commented out ahead of obsolescence schedule to reduce confusion and because they were not meant to be used in the first place.
41374137
//typedef ImGuiKeyChord ImGuiModFlags; // == int. We generally use ImGuiKeyChord to mean "a ImGuiKey or-ed with any number of ImGuiMod_XXX value", so you may store mods in there.
41384138
//enum ImGuiModFlags_ { ImGuiModFlags_None = 0, ImGuiModFlags_Ctrl = ImGuiMod_Ctrl, ImGuiModFlags_Shift = ImGuiMod_Shift, ImGuiModFlags_Alt = ImGuiMod_Alt, ImGuiModFlags_Super = ImGuiMod_Super };
41394139
//typedef ImGuiKeyChord ImGuiKeyModFlags; // == int

imgui_demo.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7031,7 +7031,7 @@ static void DemoWindowTables()
70317031
// [2.3] Right-click in columns to open another custom popup
70327032
HelpMarker(
70337033
"Demonstrate mixing table context menu (over header), item context button (over button) "
7034-
"and custom per-colunm context menu (over column body).");
7034+
"and custom per-column context menu (over column body).");
70357035
ImGuiTableFlags flags2 = ImGuiTableFlags_Resizable | ImGuiTableFlags_SizingFixedFit | ImGuiTableFlags_Reorderable | ImGuiTableFlags_Hideable | ImGuiTableFlags_Borders;
70367036
if (ImGui::BeginTable("table_context_menu_2", COLUMNS_COUNT, flags2))
70377037
{

imgui_internal.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2708,7 +2708,7 @@ struct IMGUI_API ImGuiWindow
27082708
ImGuiWindow* RootWindowPopupTree; // Point to ourself or first ancestor that is not a child window. Cross through popups parent<>child.
27092709
ImGuiWindow* RootWindowForTitleBarHighlight; // Point to ourself or first ancestor which will display TitleBgActive color when this window is active.
27102710
ImGuiWindow* RootWindowForNav; // Point to ourself or first ancestor which doesn't have the NavFlattened flag.
2711-
ImGuiWindow* ParentWindowForFocusRoute; // Set to manual link a window to its logical parent so that Shortcut() chain are honoerd (e.g. Tool linked to Document)
2711+
ImGuiWindow* ParentWindowForFocusRoute; // Set to manual link a window to its logical parent so that Shortcut() chain are honored (e.g. Tool linked to Document)
27122712

27132713
ImGuiWindow* NavLastChildNavWindow; // When going to the menu bar, we remember the child window we came from. (This could probably be made implicit if we kept g.Windows sorted by last focused including child window.)
27142714
ImGuiID NavLastIds[ImGuiNavLayer_COUNT]; // Last known NavId for this window, per layer (0/1)
@@ -3029,7 +3029,7 @@ struct IMGUI_API ImGuiTable
30293029
bool IsContextPopupOpen; // Set when default context menu is open (also see: ContextPopupColumn, InstanceInteracted).
30303030
bool DisableDefaultContextMenu; // Disable default context menu. You may submit your own using TableBeginContextMenuPopup()/EndPopup()
30313031
bool IsSettingsRequestLoad;
3032-
bool IsSettingsDirty; // Set when table settings have changed and needs to be reported into ImGuiTableSetttings data.
3032+
bool IsSettingsDirty; // Set when table settings have changed and needs to be reported into ImGuiTableSettings data.
30333033
bool IsDefaultDisplayOrder; // Set when display order is unchanged from default (DisplayOrder contains 0...Count-1)
30343034
bool IsResetAllRequest;
30353035
bool IsResetDisplayOrderRequest;
@@ -3389,7 +3389,7 @@ namespace ImGui
33893389
// Legacy functions use ImGuiKeyOwner_Any meaning that they typically ignore ownership, unless a call to SetKeyOwner() explicitly used ImGuiInputFlags_LockThisFrame or ImGuiInputFlags_LockUntilRelease.
33903390
// - Binding generators may want to ignore those for now, or suffix them with Ex() until we decide if this gets moved into public API.
33913391
IMGUI_API bool IsKeyDown(ImGuiKey key, ImGuiID owner_id);
3392-
IMGUI_API bool IsKeyPressed(ImGuiKey key, ImGuiInputFlags flags, ImGuiID owner_id = 0); // Important: when transitioning from old to new IsKeyPressed(): old API has "bool repeat = true", so would default to repeat. New API requiress explicit ImGuiInputFlags_Repeat.
3392+
IMGUI_API bool IsKeyPressed(ImGuiKey key, ImGuiInputFlags flags, ImGuiID owner_id = 0); // Important: when transitioning from old to new IsKeyPressed(): old API has "bool repeat = true", so would default to repeat. New API requires explicit ImGuiInputFlags_Repeat.
33933393
IMGUI_API bool IsKeyReleased(ImGuiKey key, ImGuiID owner_id);
33943394
IMGUI_API bool IsKeyChordPressed(ImGuiKeyChord key_chord, ImGuiInputFlags flags, ImGuiID owner_id = 0);
33953395
IMGUI_API bool IsMouseDown(ImGuiMouseButton button, ImGuiID owner_id);

imgui_tables.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -451,7 +451,7 @@ bool ImGui::BeginTableEx(const char* name, ImGuiID id, int columns_count, ImG
451451
// But at this point we do NOT have a correct value for .Max.y (unless a height has been explicitly passed in). It will only be updated in EndTable().
452452
table->WorkRect = table->OuterRect = table->InnerRect = outer_rect;
453453
table->HasScrollbarYPrev = table->HasScrollbarYCurr = false;
454-
table->InnerWindow->DC.TreeDepth++; // This is designed to always linking ImGuiTreeNodeFlags_DrawLines linking accross a table
454+
table->InnerWindow->DC.TreeDepth++; // This is designed to always linking ImGuiTreeNodeFlags_DrawLines linking across a table
455455
}
456456

457457
// Push a standardized ID for both child-using and not-child-using tables
@@ -947,7 +947,7 @@ void ImGui::TableUpdateLayout(ImGuiTable* table)
947947
// (e.g. TextWrapped) too much. Otherwise what tends to happen is that TextWrapped would output a very
948948
// large height (= first frame scrollbar display very off + clipper would skip lots of items).
949949
// This is merely making the side-effect less extreme, but doesn't properly fixes it.
950-
// FIXME: Move this to ->WidthGiven to avoid temporary lossyless?
950+
// FIXME: Move this to ->WidthGiven to avoid temporary lossyness?
951951
// FIXME: This break IsPreserveWidthAuto from not flickering if the stored WidthAuto was smaller.
952952
if (column->AutoFitQueue > 0x01 && table->IsInitializing && !column->IsPreserveWidthAuto)
953953
column->WidthRequest = ImMax(column->WidthRequest, table->MinColumnWidth * 4.0f); // FIXME-TABLE: Another constant/scale?
@@ -1191,7 +1191,7 @@ void ImGui::TableUpdateLayout(ImGuiTable* table)
11911191
}
11921192

11931193
// In case the table is visible (e.g. decorations) but all columns clipped, we keep a column visible.
1194-
// Else if give no chance to a clipper-savy user to submit rows and therefore total contents height used by scrollbar.
1194+
// Else if give no chance to a clipper-savvy user to submit rows and therefore total contents height used by scrollbar.
11951195
if (has_at_least_one_column_requesting_output == false)
11961196
{
11971197
table->Columns[table->LeftMostEnabledColumn].IsRequestOutput = true;
@@ -2526,7 +2526,7 @@ void ImGui::TablePopColumnChannel()
25262526
// - NoClip --> 2+D+1 channels: bg0/1 + bg2 + foreground (same clip rect == always 1 draw call)
25272527
// - Clip --> 2+D+N channels
25282528
// - FreezeRows --> 2+D+N*2 (unless scrolling value is zero)
2529-
// - FreezeRows || FreezeColunns --> 3+D+N*2 (unless scrolling value is zero)
2529+
// - FreezeRows || FreezeColumns --> 3+D+N*2 (unless scrolling value is zero)
25302530
// Where D is 1 if any column is clipped or hidden (dummy channel) otherwise 0.
25312531
void ImGui::TableSetupDrawChannels(ImGuiTable* table)
25322532
{

misc/cpp/README.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,5 +9,5 @@ imgui_scoped.h
99
Try by merging: https://github.com/ocornut/imgui/pull/2197
1010
Discuss at: https://github.com/ocornut/imgui/issues/2096
1111

12-
See more C++ related extension (fmt, RAII, syntaxis sugar) on Wiki:
12+
See more C++ related extension (fmt, RAII, syntactic sugar) on Wiki:
1313
https://github.com/ocornut/imgui/wiki/Useful-Extensions#cness

misc/cpp/imgui_stdlib.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
// ImGui::InputText("my string", &my_string);
1717
// }
1818

19-
// See more C++ related extension (fmt, RAII, syntaxis sugar) on Wiki:
19+
// See more C++ related extension (fmt, RAII, syntactic sugar) on Wiki:
2020
// https://github.com/ocornut/imgui/wiki/Useful-Extensions#cness
2121

2222
#include "imgui.h"

0 commit comments

Comments
 (0)