mirror of
https://github.com/ocornut/imgui.git
synced 2026-02-13 23:33:26 +00:00
Docs: fixed some typos (#9217)
This commit is contained in:
@@ -48,7 +48,7 @@ IMGUI_IMPL_API void ImGui_ImplGlfw_InstallEmscriptenCallbacks(GLFWwindow* wi
|
||||
IMGUI_IMPL_API void ImGui_ImplGlfw_InstallCallbacks(GLFWwindow* window);
|
||||
IMGUI_IMPL_API void ImGui_ImplGlfw_RestoreCallbacks(GLFWwindow* window);
|
||||
|
||||
// GFLW callbacks options:
|
||||
// GLFW callbacks options:
|
||||
// - Set 'chain_for_all_windows=true' to enable chaining callbacks for all windows (including secondary viewports created by backends or by user)
|
||||
IMGUI_IMPL_API void ImGui_ImplGlfw_SetCallbacksChainForAllWindows(bool chain_for_all_windows);
|
||||
|
||||
|
||||
@@ -337,7 +337,7 @@ void MyImGuiBackend_UpdateTexture(ImTextureData* tex)
|
||||
{
|
||||
// Create texture based on tex->Width, tex->Height.
|
||||
// - Most backends only support tex->Format == ImTextureFormat_RGBA32.
|
||||
// - Backends for particularly memory constrainted platforms may support tex->Format == ImTextureFormat_Alpha8.
|
||||
// - Backends for particularly memory constrained platforms may support tex->Format == ImTextureFormat_Alpha8.
|
||||
|
||||
// Upload all texture pixels
|
||||
// - Read from our CPU-side copy of the texture and copy to your graphics API.
|
||||
|
||||
@@ -346,7 +346,7 @@ Other Changes:
|
||||
debug/metrics window is not in the same viewport as the table.
|
||||
- Backends:
|
||||
- NULL: added imgui_impl_null platform/renderer backend.
|
||||
This is designed if you need to run e.g. context with no input or no ouput.
|
||||
This is designed if you need to run e.g. context with no input or no output.
|
||||
- GLFW: fixed building on Linux platforms where Wayland headers
|
||||
are not available. (#9024, #8969, #8921, #8920) [@jagot]
|
||||
- GLFW: lower minimum requirement from GLFW 3.1 to GLFW 3.0. Though
|
||||
@@ -828,7 +828,7 @@ Breaking changes:
|
||||
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 before. They are
|
||||
thread-safe even though we had never provided that guarantee before. They are
|
||||
definitively not thread-safe anymore as new glyphs may be loaded.
|
||||
|
||||
- Textures:
|
||||
|
||||
@@ -102,7 +102,7 @@ else() # Native/Desktop build
|
||||
option(DAWN_FETCH_DEPENDENCIES "Use fetch_dawn_dependencies.py as an alternative to using depot_tools" ON)
|
||||
set(DAWN_BUILD_MONOLITHIC_LIBRARY "STATIC" CACHE STRING "Build monolithic library: SHARED, STATIC, or OFF.")
|
||||
|
||||
option(DAWN_USE_GLFW OFF) # disable buildin GLFW in DAWN when we use SDL2 / SDL3
|
||||
option(DAWN_USE_GLFW OFF) # disable builtin GLFW in DAWN when we use SDL2 / SDL3
|
||||
|
||||
# Dawn builds many things by default - disable things we don't need
|
||||
option(DAWN_BUILD_SAMPLES "Enables building Dawn's samples" OFF)
|
||||
|
||||
@@ -89,7 +89,7 @@ Once the procedure for the specific builder is generated, the build command is *
|
||||
---
|
||||
|
||||
### CMake useful options
|
||||
#### Generator types (alternative to **ninja** bulder):
|
||||
#### Generator types (alternative to **ninja** builder):
|
||||
- `-G Ninja` to build with __ninja__ builder
|
||||
- `-G "Unix Makefiles"` to build with __make__ builder
|
||||
- `-G "Visual Studio 17 2022" -A x64` to create a VS 2022 solution (.sln) file, Windows only
|
||||
|
||||
@@ -92,7 +92,7 @@ else() # Native/Desktop build
|
||||
else()
|
||||
set(IMGUI_DAWN_DIR CACHE PATH "Path to Dawn repository")
|
||||
|
||||
option(DAWN_USE_GLFW OFF) # disable buildin GLFW in DAWN when we use SDL2 / SDL3
|
||||
option(DAWN_USE_GLFW OFF) # disable builtin GLFW in DAWN when we use SDL2 / SDL3
|
||||
|
||||
option(DAWN_FETCH_DEPENDENCIES "Use fetch_dawn_dependencies.py as an alternative to using depot_tools" ON)
|
||||
set(DAWN_BUILD_MONOLITHIC_LIBRARY "STATIC" CACHE STRING "Build monolithic library: SHARED, STATIC, or OFF.")
|
||||
|
||||
@@ -89,7 +89,7 @@ Once the procedure for the specific builder is generated, the build command is *
|
||||
---
|
||||
|
||||
### CMake useful options
|
||||
#### Generator types (alternative to **ninja** bulder):
|
||||
#### Generator types (alternative to **ninja** builder):
|
||||
- `-G Ninja` to build with __ninja__ builder
|
||||
- `-G "Unix Makefiles"` to build with __make__ builder
|
||||
- `-G "Visual Studio 17 2022" -A x64` to create a VS 2022 solution (.sln) file, Windows only
|
||||
|
||||
@@ -95,7 +95,7 @@ else() # Native/Desktop build
|
||||
else()
|
||||
set(IMGUI_DAWN_DIR CACHE PATH "Path to Dawn repository")
|
||||
|
||||
option(DAWN_USE_GLFW OFF) # disable buildin GLFW in DAWN when we use SDL2 / SDL3
|
||||
option(DAWN_USE_GLFW OFF) # disable builtin GLFW in DAWN when we use SDL2 / SDL3
|
||||
|
||||
option(DAWN_FETCH_DEPENDENCIES "Use fetch_dawn_dependencies.py as an alternative to using depot_tools" ON)
|
||||
set(DAWN_BUILD_MONOLITHIC_LIBRARY "STATIC" CACHE STRING "Build monolithic library: SHARED, STATIC, or OFF.")
|
||||
|
||||
@@ -89,7 +89,7 @@ Once the procedure for the specific builder is generated, the build command is *
|
||||
---
|
||||
|
||||
### CMake useful options
|
||||
#### Generator types (alternative to **ninja** bulder):
|
||||
#### Generator types (alternative to **ninja** builder):
|
||||
- `-G Ninja` to build with __ninja__ builder
|
||||
- `-G "Unix Makefiles"` to build with __make__ builder
|
||||
- `-G "Visual Studio 17 2022" -A x64` to create a VS 2022 solution (.sln) file, Windows only
|
||||
|
||||
12
imgui.cpp
12
imgui.cpp
@@ -486,7 +486,7 @@ IMPLEMENTING SUPPORT for ImGuiBackendFlags_RendererHasTextures:
|
||||
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 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.
|
||||
- A few functions such as font->CalcTextSizeA() were, by sheer luck (== accidentally) thread-safe even though 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().
|
||||
- Fonts: Removed support for PushFont(NULL) which was a shortcut for "default font".
|
||||
- Fonts: Renamed/moved 'io.FontGlobalScale' to 'style.FontScaleMain'.
|
||||
@@ -1467,7 +1467,7 @@ ImGuiStyle::ImGuiStyle()
|
||||
ColumnsMinSpacing = 6.0f; // Minimum horizontal spacing between two columns. Preferably > (FramePadding.x + 1).
|
||||
ScrollbarSize = 14.0f; // Width of the vertical scrollbar, Height of the horizontal scrollbar
|
||||
ScrollbarRounding = 9.0f; // Radius of grab corners rounding for scrollbar
|
||||
ScrollbarPadding = 2.0f; // Padding of scrollbar grab within its frame (same for both axises)
|
||||
ScrollbarPadding = 2.0f; // Padding of scrollbar grab within its frame (same for both axes)
|
||||
GrabMinSize = 12.0f; // Minimum width/height of a grab box for slider/scrollbar
|
||||
GrabRounding = 0.0f; // Radius of grabs corners rounding. Set to 0.0f to have rectangular slider grabs.
|
||||
LogSliderDeadzone = 4.0f; // The size in pixels of the dead-zone around zero on logarithmic sliders that cross zero.
|
||||
@@ -5215,7 +5215,7 @@ void ImGui::StartMouseMovingWindow(ImGuiWindow* window)
|
||||
g.MovingWindow = window;
|
||||
}
|
||||
|
||||
// This is not 100% symetric with StartMouseMovingWindow().
|
||||
// This is not 100% symmetric with StartMouseMovingWindow().
|
||||
// We do NOT clear ActiveID, because:
|
||||
// - It would lead to rather confusing recursive code paths. Caller can call ClearActiveID() if desired.
|
||||
// - Some code intentionally cancel moving but keep the ActiveID to lock inputs (e.g. code path taken when clicking a disabled item).
|
||||
@@ -5296,7 +5296,7 @@ void ImGui::UpdateMouseMovingWindowEndFrame()
|
||||
StartMouseMovingWindow(hovered_window); //-V595
|
||||
|
||||
// FIXME: In principle we might be able to call StopMouseMovingWindow() below.
|
||||
// Please note how StartMouseMovingWindow() and StopMouseMovingWindow() and not entirely symetrical, at the later doesn't clear ActiveId.
|
||||
// Please note how StartMouseMovingWindow() and StopMouseMovingWindow() and not entirely symmetrical, at the later doesn't clear ActiveId.
|
||||
|
||||
// Cancel moving if clicked outside of title bar
|
||||
if ((hovered_window->BgClickFlags & ImGuiWindowBgClickFlags_Move) == 0) // set by io.ConfigWindowsMoveFromTitleBarOnly
|
||||
@@ -6704,7 +6704,7 @@ static ImVec2 CalcWindowAutoFitSize(ImGuiWindow* window, const ImVec2& size_cont
|
||||
size_desired[ImGuiAxis_Y] = (axis_mask & 2) ? size_contents.y + size_pad.y + decoration_h_without_scrollbars : window->Size.y;
|
||||
|
||||
// Determine maximum window size
|
||||
// Child windows are layed within their parent (unless they are also popups/menus) and thus have no restriction
|
||||
// Child windows are laid within their parent (unless they are also popups/menus) and thus have no restriction
|
||||
ImVec2 size_max = ((window->Flags & ImGuiWindowFlags_ChildWindow) && !(window->Flags & ImGuiWindowFlags_Popup)) ? ImVec2(FLT_MAX, FLT_MAX) : ImGui::GetMainViewport()->WorkSize - style.DisplaySafeAreaPadding * 2.0f;
|
||||
|
||||
if (window->Flags & ImGuiWindowFlags_Tooltip)
|
||||
@@ -8030,7 +8030,7 @@ bool ImGui::Begin(const char* name, bool* p_open, ImGuiWindowFlags flags)
|
||||
g.TooltipPreviousWindow = window;
|
||||
|
||||
// Set default BgClickFlags
|
||||
// This is set at the end of this function, so UpdateWindowManualResize()/ClampWindowPos() may use last-frame value if overriden by user code.
|
||||
// This is set at the end of this function, so UpdateWindowManualResize()/ClampWindowPos() may use last-frame value if overridden by user code.
|
||||
// FIXME: The general intent is that we will later expose config options to default to enable scrolling + select scrolling mouse button.
|
||||
window->BgClickFlags = (flags & ImGuiWindowFlags_ChildWindow) ? parent_window->BgClickFlags : (g.IO.ConfigWindowsMoveFromTitleBarOnly ? ImGuiWindowBgClickFlags_None : ImGuiWindowBgClickFlags_Move);
|
||||
|
||||
|
||||
2
imgui.h
2
imgui.h
@@ -3815,7 +3815,7 @@ struct ImFontBaked
|
||||
unsigned int MetricsTotalSurface:26;// 3 // out // Total surface in pixels to get an idea of the font rasterization/texture cost (not exact, we approximate the cost of padding between glyphs)
|
||||
unsigned int WantDestroy:1; // 0 // // Queued for destroy
|
||||
unsigned int LoadNoFallback:1; // 0 // // Disable loading fallback in lower-level calls.
|
||||
unsigned int LoadNoRenderOnLayout:1;// 0 // // Enable a two-steps mode where CalcTextSize() calls will load AdvanceX *without* rendering/packing glyphs. Only advantagous if you know that the glyph is unlikely to actually be rendered, otherwise it is slower because we'd do one query on the first CalcTextSize and one query on the first Draw.
|
||||
unsigned int LoadNoRenderOnLayout:1;// 0 // // Enable a two-steps mode where CalcTextSize() calls will load AdvanceX *without* rendering/packing glyphs. Only advantageous if you know that the glyph is unlikely to actually be rendered, otherwise it is slower because we'd do one query on the first CalcTextSize and one query on the first Draw.
|
||||
int LastUsedFrame; // 4 // // Record of that time this was bounds
|
||||
ImGuiID BakedId; // 4 // // Unique ID for this baked storage
|
||||
ImFont* OwnerFont; // 4-8 // in // Parent font
|
||||
|
||||
@@ -3695,7 +3695,7 @@ void ImFontAtlasFontDestroySourceData(ImFontAtlas* atlas, ImFontConfig* src)
|
||||
IM_UNUSED(atlas);
|
||||
// IF YOU GET A CRASH IN THE IM_FREE() CALL HERE AND USED AddFontFromMemoryTTF():
|
||||
// - DUE TO LEGACY REASON AddFontFromMemoryTTF() TRANSFERS MEMORY OWNERSHIP BY DEFAULT.
|
||||
// - IT WILL THEREFORE CRASH WHEN PASSED DATA WHICH MAY NOT BE FREEED BY IMGUI.
|
||||
// - IT WILL THEREFORE CRASH WHEN PASSED DATA WHICH MAY NOT BE FREED BY IMGUI.
|
||||
// - USE `ImFontConfig font_cfg; font_cfg.FontDataOwnedByAtlas = false; io.Fonts->AddFontFromMemoryTTF(....., &cfg);` to disable passing ownership/
|
||||
// WE WILL ADDRESS THIS IN A FUTURE REWORK OF THE API.
|
||||
if (src->FontDataOwnedByAtlas)
|
||||
|
||||
Reference in New Issue
Block a user