mirror of
https://github.com/ocornut/imgui.git
synced 2026-11-08 23:45:46 +01:00
Merge branch 'ocornut:master' into master
This commit is contained in:
commit
51282f1b53
4
.github/pull_request_template.md
vendored
4
.github/pull_request_template.md
vendored
@ -6,5 +6,7 @@
|
||||
|
||||
3. Consider running the [imgui_test_suite](https://github.com/ocornut/imgui_test_engine) or adding new tests to test for expected behaviors.
|
||||
|
||||
4. Clear this template before submitting your PR.
|
||||
4. PLEASE DO NOT SUBMIT AI SLOP OR AUTOMATED REPORTS. Submissions that are lacking proper human review/judgement before being passed to us are not welcome.
|
||||
|
||||
5. Clear this template before submitting your PR.
|
||||
|
||||
|
||||
@ -148,7 +148,7 @@ static void ImGui_ImplDX10_SetupRenderState(ImDrawData* draw_data, ID3D10Device*
|
||||
device->GSSetShader(nullptr);
|
||||
|
||||
// Setup render state
|
||||
const float blend_factor[4] = { 0.f, 0.f, 0.f, 0.f };
|
||||
const float blend_factor[4] = { 0.0f, 0.0f, 0.0f, 0.0f };
|
||||
device->OMSetBlendState(bd->pBlendState, blend_factor, 0xffffffff);
|
||||
device->OMSetDepthStencilState(bd->pDepthStencilState, 0);
|
||||
device->RSSetState(bd->pRasterizerState);
|
||||
@ -446,7 +446,7 @@ bool ImGui_ImplDX10_CreateDeviceObjects()
|
||||
PS_INPUT main(VS_INPUT input)\
|
||||
{\
|
||||
PS_INPUT output;\
|
||||
output.pos = mul( ProjectionMatrix, float4(input.pos.xy, 0.f, 1.f));\
|
||||
output.pos = mul( ProjectionMatrix, float4(input.pos.xy, 0.0f, 1.0f));\
|
||||
output.col = input.col;\
|
||||
output.uv = input.uv;\
|
||||
return output;\
|
||||
@ -566,10 +566,10 @@ bool ImGui_ImplDX10_CreateDeviceObjects()
|
||||
desc.AddressU = D3D10_TEXTURE_ADDRESS_CLAMP;
|
||||
desc.AddressV = D3D10_TEXTURE_ADDRESS_CLAMP;
|
||||
desc.AddressW = D3D10_TEXTURE_ADDRESS_CLAMP;
|
||||
desc.MipLODBias = 0.f;
|
||||
desc.MipLODBias = 0.0f;
|
||||
desc.ComparisonFunc = D3D10_COMPARISON_ALWAYS;
|
||||
desc.MinLOD = 0.f;
|
||||
desc.MaxLOD = 0.f;
|
||||
desc.MinLOD = 0.0f;
|
||||
desc.MaxLOD = 0.0f;
|
||||
bd->pd3dDevice->CreateSamplerState(&desc, &bd->pTexSamplerLinear);
|
||||
desc.Filter = D3D10_FILTER_MIN_MAG_MIP_POINT;
|
||||
bd->pd3dDevice->CreateSamplerState(&desc, &bd->pTexSamplerNearest);
|
||||
|
||||
@ -155,7 +155,7 @@ static void ImGui_ImplDX11_SetupRenderState(const ImDrawData* draw_data, ID3D11D
|
||||
device_ctx->CSSetShader(nullptr, nullptr, 0); // In theory we should backup and restore this as well.. very infrequently used..
|
||||
|
||||
// Setup render state
|
||||
const float blend_factor[4] = { 0.f, 0.f, 0.f, 0.f };
|
||||
const float blend_factor[4] = { 0.0f, 0.0f, 0.0f, 0.0f };
|
||||
device_ctx->OMSetBlendState(bd->pBlendState, blend_factor, 0xffffffff);
|
||||
device_ctx->OMSetDepthStencilState(bd->pDepthStencilState, 0);
|
||||
device_ctx->RSSetState(bd->pRasterizerState);
|
||||
@ -462,7 +462,7 @@ bool ImGui_ImplDX11_CreateDeviceObjects()
|
||||
PS_INPUT main(VS_INPUT input)\
|
||||
{\
|
||||
PS_INPUT output;\
|
||||
output.pos = mul( ProjectionMatrix, float4(input.pos.xy, 0.f, 1.f));\
|
||||
output.pos = mul( ProjectionMatrix, float4(input.pos.xy, 0.0f, 1.0f));\
|
||||
output.col = input.col;\
|
||||
output.uv = input.uv;\
|
||||
return output;\
|
||||
@ -574,7 +574,6 @@ bool ImGui_ImplDX11_CreateDeviceObjects()
|
||||
}
|
||||
|
||||
// Create texture sampler
|
||||
// (Bilinear sampling is required by default. Set 'io.Fonts->Flags |= ImFontAtlasFlags_NoBakedLines' or 'style.AntiAliasedLinesUseTex = false' to allow point/nearest sampling)
|
||||
{
|
||||
D3D11_SAMPLER_DESC desc;
|
||||
ZeroMemory(&desc, sizeof(desc));
|
||||
@ -582,10 +581,10 @@ bool ImGui_ImplDX11_CreateDeviceObjects()
|
||||
desc.AddressU = D3D11_TEXTURE_ADDRESS_CLAMP;
|
||||
desc.AddressV = D3D11_TEXTURE_ADDRESS_CLAMP;
|
||||
desc.AddressW = D3D11_TEXTURE_ADDRESS_CLAMP;
|
||||
desc.MipLODBias = 0.f;
|
||||
desc.MipLODBias = 0.0f;
|
||||
desc.ComparisonFunc = D3D11_COMPARISON_ALWAYS;
|
||||
desc.MinLOD = 0.f;
|
||||
desc.MaxLOD = 0.f;
|
||||
desc.MinLOD = 0.0f;
|
||||
desc.MaxLOD = 0.0f;
|
||||
bd->pd3dDevice->CreateSamplerState(&desc, &bd->pTexSamplerLinear);
|
||||
desc.Filter = D3D11_FILTER_MIN_MAG_MIP_POINT;
|
||||
bd->pd3dDevice->CreateSamplerState(&desc, &bd->pTexSamplerNearest);
|
||||
|
||||
@ -207,7 +207,7 @@ static void ImGui_ImplDX12_SetupRenderState(ImDrawData* draw_data, ID3D12Graphic
|
||||
command_list->SetGraphicsRoot32BitConstants(0, 16, &vertex_constant_buffer, 0);
|
||||
|
||||
// Setup blend factor
|
||||
const float blend_factor[4] = { 0.f, 0.f, 0.f, 0.f };
|
||||
const float blend_factor[4] = { 0.0f, 0.0f, 0.0f, 0.0f };
|
||||
command_list->OMSetBlendFactor(blend_factor);
|
||||
}
|
||||
|
||||
@ -614,11 +614,11 @@ bool ImGui_ImplDX12_CreateDeviceObjects()
|
||||
staticSampler[0].AddressU = D3D12_TEXTURE_ADDRESS_MODE_CLAMP;
|
||||
staticSampler[0].AddressV = D3D12_TEXTURE_ADDRESS_MODE_CLAMP;
|
||||
staticSampler[0].AddressW = D3D12_TEXTURE_ADDRESS_MODE_CLAMP;
|
||||
staticSampler[0].MipLODBias = 0.f;
|
||||
staticSampler[0].MipLODBias = 0.0f;
|
||||
staticSampler[0].MaxAnisotropy = 0;
|
||||
staticSampler[0].ComparisonFunc = D3D12_COMPARISON_FUNC_ALWAYS;
|
||||
staticSampler[0].BorderColor = D3D12_STATIC_BORDER_COLOR_TRANSPARENT_BLACK;
|
||||
staticSampler[0].MinLOD = 0.f;
|
||||
staticSampler[0].MinLOD = 0.0f;
|
||||
staticSampler[0].MaxLOD = D3D12_FLOAT32_MAX;
|
||||
staticSampler[0].ShaderRegister = 0;
|
||||
staticSampler[0].RegisterSpace = 0;
|
||||
@ -721,7 +721,7 @@ bool ImGui_ImplDX12_CreateDeviceObjects()
|
||||
PS_INPUT main(VS_INPUT input)\
|
||||
{\
|
||||
PS_INPUT output;\
|
||||
output.pos = mul( ProjectionMatrix, float4(input.pos.xy, 0.f, 1.f));\
|
||||
output.pos = mul( ProjectionMatrix, float4(input.pos.xy, 0.0f, 1.0f));\
|
||||
output.col = input.col;\
|
||||
output.uv = input.uv;\
|
||||
return output;\
|
||||
|
||||
@ -449,7 +449,7 @@ static void ImGui_ImplWGPU_SetupRenderState(ImDrawData* draw_data, WGPURenderPas
|
||||
wgpuRenderPassEncoderSetBindGroup(ctx, 0, bd->renderResources.CommonBindGroupLinear, 0, nullptr);
|
||||
|
||||
// Setup blend factor
|
||||
WGPUColor blend_color = { 0.f, 0.f, 0.f, 0.f };
|
||||
WGPUColor blend_color = { 0.0f, 0.0f, 0.0f, 0.0f };
|
||||
wgpuRenderPassEncoderSetBlendConstant(ctx, &blend_color);
|
||||
}
|
||||
|
||||
|
||||
@ -117,7 +117,7 @@ If you are not sure which backend to use, the recommended platform/frameworks fo
|
||||
| GLFW | https://github.com/glfw/glfw | imgui_impl_glfw.cpp | |
|
||||
| Sokol | https://github.com/floooh/sokol | [util/sokol_imgui.h](https://github.com/floooh/sokol/blob/master/util/sokol_imgui.h) | Lower-level than GLFW/SDL |
|
||||
|
||||
If your application runs on Windows or if you are using multi-viewport, the win32 backend handles some details a little better than other backends.
|
||||
If your application runs on Windows or if you are using multi-viewports, the imgui_impl_win32 backend handles some details better than other backends.
|
||||
|
||||
## Using third-party Backends
|
||||
|
||||
|
||||
@ -36,38 +36,45 @@ HOW TO UPDATE?
|
||||
- Please report any issue!
|
||||
|
||||
-----------------------------------------------------------------------
|
||||
VERSION 1.92.9 WIP (In Progress)
|
||||
VERSION 1.92.9b (In Progress)
|
||||
-----------------------------------------------------------------------
|
||||
|
||||
Breaking Changes:
|
||||
|
||||
- TreeNode: commented out legacy name `ImGuiTreeNodeFlags_SpanTextWidth` which
|
||||
was obsoleted in 1.90.7 (May 2024). Use `ImGuiTreeNodeFlags_SpanLabelWidth`.
|
||||
- ColorEdit: obsoleted SetColorEditOptions() function added in 1.51 (June 2017) in
|
||||
of directly poking to io.ConfigColorEditFlags. More consistent and easier to discover.
|
||||
- Drag and Drop: commented out legacy name `ImGuiDragDropFlags_SourceAutoExpirePayload`
|
||||
which obsoleted in 1.90.9 (July 2024). Use `ImGuiDragDropFlags_PayloadAutoExpire`.
|
||||
Other Changes:
|
||||
|
||||
- ImDrawData: fixed a regression in 1.92.9 where legacy `ImDrawData::CmdListsCount` was always 0.
|
||||
Prefer using `ImDrawData::CmdList.Size` anyway.
|
||||
|
||||
|
||||
|
||||
-----------------------------------------------------------------------
|
||||
VERSION 1.92.9 (Released 2026-07-25)
|
||||
-----------------------------------------------------------------------
|
||||
|
||||
Decorated log and release notes: https://github.com/ocornut/imgui/releases/tag/v1.92.9
|
||||
|
||||
Breaking Changes:
|
||||
|
||||
- DragXXX, SliderXXX, InputScalar: with `ImGuiItemFlags_LiveEditOnInputScalar` now
|
||||
defaulting to being disabled: inputting a value with the keyboard doesn't write
|
||||
intermediate values to the backing variable. (#9476)
|
||||
Before: DragFloat() with user typing "123" --> write back 1, then 12, then 123.
|
||||
After: DragFloat() with user typing "123" --> write back 123 when validated/unfocused.
|
||||
You can enable the flag back for a given scope if needed by specific widget/behavior.
|
||||
Read below for details.
|
||||
- TreeNode: commented out legacy name `ImGuiTreeNodeFlags_SpanTextWidth` which
|
||||
was obsoleted in 1.90.7 (May 2024). Use `ImGuiTreeNodeFlags_SpanLabelWidth`.
|
||||
- ColorEdit: obsoleted SetColorEditOptions() function added in 1.51 (June 2017) in favor
|
||||
of directly poking to io.ConfigColorEditFlags. More consistent and easier to discover.
|
||||
- Drag and Drop: commented out legacy name `ImGuiDragDropFlags_SourceAutoExpirePayload`
|
||||
which obsoleted in 1.90.9 (July 2024). Use `ImGuiDragDropFlags_PayloadAutoExpire`.
|
||||
- ImDrawData: marked `CmdListsCount` as obsolete (technically was obsoleted in 1.89.8).
|
||||
Before: `draw_data->CmdListsCount`, After: `draw_data->CmdLists.Size`.
|
||||
|
||||
Other Changes:
|
||||
|
||||
- Windows:
|
||||
- Clicking on a window's empty-space to move/focus a window checks
|
||||
for lack of mouse button ownership. This gives an additional opportunity
|
||||
for user code to bypass it without using a clickable item. (#9382)
|
||||
- Clicking on a window's empty-space to move/focus a window checks
|
||||
for lack of queued focus request. (#9382)
|
||||
- Fixed double-click collapse toggle not owning the mouse button. If a
|
||||
`SetNextWindowPos()` with pivot was queued in the same frame, the second
|
||||
click could trigger another item in the same window. (#9439) [@Cleroth]
|
||||
- Added `ImGuiItemFlags_LiveEditOnInputText` and `ImGuiItemFlags_LiveEditOnInputScalar`
|
||||
- LiveEdit on/off: added `ImGuiItemFlags_LiveEditOnInputText` and `ImGuiItemFlags_LiveEditOnInputScalar`
|
||||
flags to configure the timing of applying edits of backing variables when typing
|
||||
values using a keyboard.
|
||||
(#9476, #701, #3936, #3946, #5904, #6284, #8149, #8065, #8665, #9117, #9299, #700, #1351,
|
||||
@ -106,13 +113,22 @@ Other Changes:
|
||||
- We intentionally are not adding `io.ConfigLiveEditXXX` fields to dictate the
|
||||
default value of each `ImGuiItemFlags_LiveEditXXX`, because this is not expected
|
||||
to be a user preference but a programmer/widget preferences.
|
||||
Also, we strive to make the toolkit consistent.
|
||||
And we strive to make the toolkit consistent.
|
||||
- Windows:
|
||||
- Clicking on a window's empty-space to move/focus a window checks
|
||||
for lack of mouse button ownership. This gives an additional opportunity
|
||||
for user code to bypass it without using a clickable item. (#9382)
|
||||
- Clicking on a window's empty-space to move/focus a window checks
|
||||
for lack of queued focus request. (#9382)
|
||||
- Fixed double-click collapse toggle not owning the mouse button. If a
|
||||
`SetNextWindowPos()` with pivot was queued in the same frame, the second
|
||||
click could trigger another item in the same window. (#9439) [@Cleroth]
|
||||
- Popups:
|
||||
- Added bool return value to `OpenPopup()`, `OpenPopupOnItemClick()` functions
|
||||
to notify when the popup was just opened. (#9429)
|
||||
- InputText:
|
||||
- Added `style.InputTextCursorSize` to configure cursor/caret thickness. (#7031, #9409)
|
||||
This is automatically scaled by `style.ScaleAllSizes()`.
|
||||
It is automatically scaled by `style.ScaleAllSizes()`.
|
||||
- Reworked `io.ConfigInputTextEnterKeepActive` mode so that pressing
|
||||
Ctrl+Enter or Shift+Enter still allows to deactivate. (#9239)
|
||||
- Tables:
|
||||
@ -135,9 +151,9 @@ Other Changes:
|
||||
even when no sort marker is displayed. Auto-fitting a column still accounts
|
||||
for the possible marker, so that sorting after an auto-fit doesn't clip the label.
|
||||
- Multi-Select:
|
||||
- Reworked ImGuiMultiSelectFlags_NoAutoSelect as it carried side-effects that
|
||||
- Reworked `ImGuiMultiSelectFlags_NoAutoSelect` as it carried side-effects that
|
||||
were hardcoded/designed to use multi-selection on checkboxes. (#9391)
|
||||
Specifically removed those undocumented behaviors from _NoAutoSelect:
|
||||
Specifically removed those undocumented behaviors from `_NoAutoSelect`:
|
||||
- Clicking a selected/checked item always unselect/uncheck.
|
||||
- Shift+Click inverts targets value and copy to range.
|
||||
- Shift+Keyboard copy selection source value to range.
|
||||
@ -146,27 +162,27 @@ Other Changes:
|
||||
- Added `IMGUI_DISABLE_DEFAULT_FONT_BITMAP`/`IMGUI_DISABLE_DEFAULT_FONT_VECTOR` to
|
||||
disable embedding either fonts separately. (#9407)
|
||||
- Tweak `CalcTextSize()` awkward width rounding/ceiling code to reduce floating-point
|
||||
imprecisions altering the result by 1 even at relatively small width. (#791)
|
||||
- Better document the fact that ImFontAtlas::Clear()/ClearFonts() functions are
|
||||
precision issues altering the result by 1 even at relatively small width. (#791)
|
||||
- Better document the fact that `ImFontAtlas::Clear()`/`ClearFonts()` functions are
|
||||
unlikely to be useful nowadays. Better recover to an edge case of mistakenly
|
||||
calling ClearFonts() during rendering.
|
||||
calling `ClearFonts()` during rendering.
|
||||
- Fixed an issue where passing a manually created ImFontAtlas to CreateContext() would
|
||||
incorrectly destroy it in DestroyContext() when ref-count gets back to zero. (#9426)
|
||||
- Destroying an ImGui context using a ImFontAtlas checks that the later has no references.
|
||||
incorrectly destroy it in `DestroyContext()` when ref-count gets back to zero. (#9426)
|
||||
- Destroying an ImGui context using a `ImFontAtlas` checks that the later has no references.
|
||||
- Nav:
|
||||
- Fixed context menu activation with gamepad erroneously testing for _NavEnableKeyboard
|
||||
instead of _NavEnableGamepad. (#9454, #8803, #9270) [@Clownacy]
|
||||
- TreeNode:
|
||||
- Fixed nav cursor rendering with rounding even though tree nodes don't have it. (#7589)
|
||||
- Inputs:
|
||||
- Added GetItemClickedCountWithSingleClickDelay() helper for easy disambiguation
|
||||
- Added `GetItemClickedCountWithSingleClickDelay()` helper for easy disambiguation
|
||||
between single-click and double-click for actions that needs single-click to do
|
||||
something other than selection. (#8337)
|
||||
- Returns 1 on single-click but delayed by io.MouseSingleClickDelay.
|
||||
- Returns 2 on double-click, and 2+ on subsequent repeated cicks.
|
||||
- Added io.MouseSingleClickDelay to configure default delayed single click delay when
|
||||
using GetItemClickedCountWithSingleClickDelay() or IsMouseReleasedWithDelay(). (#8337)
|
||||
Note that io.MouseSingleClickDelay is always > io.MouseDoubleClickTime.
|
||||
- Returns 2 on double-click, and 2+ on subsequent repeated clicks.
|
||||
- Added `io.MouseSingleClickDelay` to configure default delayed single click delay when
|
||||
using `GetItemClickedCountWithSingleClickDelay()` or `IsMouseReleasedWithDelay()`. (#8337)
|
||||
Note that `io.MouseSingleClickDelay` is always `> io.MouseDoubleClickTime`.
|
||||
- ColorEdit:
|
||||
- Added `io.ConfigColorEditFlags` to read/modify current color edit/picker settings.
|
||||
- ColorPicker: added `ImGuiColorEditFlags_PickerNoRotate` to disable rotation of the
|
||||
@ -182,13 +198,13 @@ Other Changes:
|
||||
- Settings:
|
||||
- Windows/Tables settings entries can now record the last used date in YYYYMMDD format,
|
||||
allowing tools to run to e.g. delete entries that haven't been used in X months. (#9460)
|
||||
- Added bool io.ConfigIniSettingsSaveLastUsedDate to disable saving that info. (#9460)
|
||||
- Added int io.ConfigIniSettingsAutoDiscardMonths to enable a mode where unused settings
|
||||
- Added `bool io.ConfigIniSettingsSaveLastUsedDate` to disable saving that info. (#9460)
|
||||
- Added `int io.ConfigIniSettingsAutoDiscardMonths` to enable a mode where unused settings
|
||||
are automatically discard after xx months. (#9460)
|
||||
- Added a trimming tool under Metrics->Settings, along with a yet-unexposed function.
|
||||
- The current system date is fed through ImGuiPlatformIO::Platform_SessionDate,
|
||||
- The current system date is fed through `ImGuiPlatformIO::Platform_SessionDate`,
|
||||
which is automatically set by a call to time() done during context creation. (#9460)
|
||||
- Added IMGUI_DISABLE_TIME_FUNCTIONS to disable setting platform_io.Platform_SessionDate.
|
||||
- Added `IMGUI_DISABLE_TIME_FUNCTIONS` to disable setting platform_io.Platform_SessionDate.
|
||||
A custom backend may still set it manually. (#9460)
|
||||
- DrawList:
|
||||
- Minor optimization to `AddLine()`, `AddLineH()`, `AddLineV()` functions. (#4091)
|
||||
@ -197,11 +213,11 @@ Other Changes:
|
||||
- Demo:
|
||||
- Extract 'Widgets->Tree Nodes->Selectable Nodes' out of the 'Advanced'
|
||||
demo for clarity (manual reimplementation of basic selection).
|
||||
- Misc:
|
||||
- Added IM_DEBUG_BREAK() handler for GCC+AArch64/ARM64. [@tom-seddon]
|
||||
- Debug Tools:
|
||||
- Added `IM_DEBUG_BREAK()` handler for GCC+AArch64/ARM64. [@tom-seddon]
|
||||
- Backends:
|
||||
- Android:
|
||||
- Clear mouse position on touch release (AMOTION_EVENT_ACTION_UP) to prevent
|
||||
- Clear mouse position on touch release (`AMOTION_EVENT_ACTION_UP`) to prevent
|
||||
items from staying in hovered state. (#6627, #9474) [@Turtle-PB]
|
||||
- Metal4:
|
||||
- Added new Metal 4 backend (forked from Metal 3 backend). (#9458, #9451) [@AmelieHeinrich]
|
||||
@ -215,14 +231,14 @@ Other Changes:
|
||||
all other backends. Prevents potential use-after-free in multi-threaded rendering
|
||||
pipelines. (#8597, #9481) [@Turtle-PB]
|
||||
- OpenGL2:
|
||||
- Backup and restore GL_UNPACK_ROW_LENGTH and GL_UNPACK_ALIGNMENT when updating texture
|
||||
- Backup and restore `GL_UNPACK_ROW_LENGTH` and `GL_UNPACK_ALIGNMENT` when updating texture
|
||||
to avoid altering caller GL state. (#8802, #9473) [@Turtle-PB]
|
||||
- OpenGL3:
|
||||
- GLSL version detection assume GLSL 410 when GL context is 4.1.
|
||||
Fixes an issue running on macOS with Wine. [#9427, #6577) [@perminovVS]
|
||||
- Expose selected render state in ImGui_ImplOpenGL3_RenderState, allowing to
|
||||
dynamically select between use of glBindSampler() and glTexParameter(). (#9378)
|
||||
- Backup and restore GL_UNPACK_ROW_LENGTH and GL_UNPACK_ALIGNMENT when updating texture
|
||||
- Expose selected render state in `ImGui_ImplOpenGL3_RenderState`, allowing to
|
||||
dynamically select between use of `glBindSampler()` and `glTexParameter()`. (#9378)
|
||||
- Backup and restore `GL_UNPACK_ROW_LENGTH` and `GL_UNPACK_ALIGNMENT` when updating texture
|
||||
to avoid altering caller GL state. (#8802, #9473) [@Turtle-PB]
|
||||
- SDL2:
|
||||
- Restore SDL_StartTextInput()/SDL_StopTextInput() in IME handler for on-screen keyboard
|
||||
@ -1118,7 +1134,7 @@ Other Changes:
|
||||
not available. (#5924, #5562)
|
||||
- SDL3+DirectX11: Added SDL3+DirectX11 example. (#8956, #8957) [@tomaz82]
|
||||
- Win32+DirectX12: Rework synchronization logic. (#8961) [@RT2Code]
|
||||
- Made examples's main.cpp consistent with returning 1 on error.
|
||||
- Made examples' main.cpp consistent with returning 1 on error.
|
||||
|
||||
|
||||
-----------------------------------------------------------------------
|
||||
|
||||
105
docs/FAQ.md
105
docs/FAQ.md
@ -9,42 +9,58 @@ or view this file with any Markdown viewer.
|
||||
|
||||
## Index
|
||||
|
||||
| **Q&A: Basics** |
|
||||
:---------------------------------------------------------- |
|
||||
| [Where is the documentation?](#q-where-is-the-documentation) |
|
||||
| [What is this library called?](#q-what-is-this-library-called) |
|
||||
| [What is the difference between Dear ImGui and traditional UI toolkits?](#q-what-is-the-difference-between-dear-imgui-and-traditional-ui-toolkits) |
|
||||
| [Which version should I get?](#q-which-version-should-i-get) |
|
||||
| **Q&A: Integration** |
|
||||
| **[How to get started?](#q-how-to-get-started)** |
|
||||
| **[How can I tell whether to dispatch mouse/keyboard to Dear ImGui or my application?](#q-how-can-i-tell-whether-to-dispatch-mousekeyboard-to-dear-imgui-or-my-application)** |
|
||||
| [How can I enable keyboard or gamepad controls?](#q-how-can-i-enable-keyboard-or-gamepad-controls) |
|
||||
| [How can I use this on a machine without mouse, keyboard or screen? (input share, remote display)](#q-how-can-i-use-this-on-a-machine-without-mouse-keyboard-or-screen-input-share-remote-display) |
|
||||
| [How can I create my own backend?](#q-how-can-i-create-my-own-backend)
|
||||
| [I integrated Dear ImGui in my engine and little squares are showing instead of text...](#q-i-integrated-dear-imgui-in-my-engine-and-little-squares-are-showing-instead-of-text) |
|
||||
| [I integrated Dear ImGui in my engine and some elements are clipping or disappearing when I move windows around...](#q-i-integrated-dear-imgui-in-my-engine-and-some-elements-are-clipping-or-disappearing-when-i-move-windows-around) |
|
||||
| [I integrated Dear ImGui in my engine and some elements are displaying outside their expected windows boundaries...](#q-i-integrated-dear-imgui-in-my-engine-and-some-elements-are-displaying-outside-their-expected-windows-boundaries) |
|
||||
| **Q&A: Usage** |
|
||||
| **[About the ID Stack system...](#q-about-the-id-stack-system)**<br>**[How can I have multiple widgets with the same label?](#q-how-can-i-have-multiple-widgets-with-the-same-label) (using `##` or `PushID()`)**<br>**[How can I have widgets with an empty label?](#q-how-can-i-have-widgets-with-an-empty-label) (using `##`)**<br>**[How can I make a label dynamic?](#q-how-can-i-make-a-label-dynamic) (using `###`)**<br>**[General description of the label and ID Stack system.](#general-description-of-the-label-and-id-stack-system)** |
|
||||
| [How can I display an image?](#q-how-can-i-display-an-image)<br>[What are ImTextureID/ImTextureRef?](#q-what-are-imtextureidimtextureref)|
|
||||
| [How can I use maths operators with ImVec2?](#q-how-can-i-use-maths-operators-with-imvec2) |
|
||||
| [How can I use my own maths types instead of ImVec2/ImVec4?](#q-how-can-i-use-my-own-maths-types-instead-of-imvec2imvec4) |
|
||||
| [How can I interact with standard C++ types (such as std::string and std::vector)?](#q-how-can-i-interact-with-standard-c-types-such-as-stdstring-and-stdvector) |
|
||||
| [How can I display custom shapes? (using low-level ImDrawList API)](#q-how-can-i-display-custom-shapes-using-low-level-imdrawlist-api) |
|
||||
| **Q&A: Fonts, Text** |
|
||||
| [How should I handle DPI in my application?](#q-how-should-i-handle-dpi-in-my-application) |
|
||||
| [How can I load a different font than the default?](#q-how-can-i-load-a-different-font-than-the-default) |
|
||||
| [How can I easily use icons in my application?](#q-how-can-i-easily-use-icons-in-my-application) |
|
||||
| [How can I load multiple fonts?](#q-how-can-i-load-multiple-fonts) |
|
||||
| [How can I display and input non-Latin characters such as Chinese, Japanese, Korean, Cyrillic?](#q-how-can-i-display-and-input-non-latin-characters-such-as-chinese-japanese-korean-cyrillic) |
|
||||
| **Q&A: Concerns** |
|
||||
| [Who uses Dear ImGui?](#q-who-uses-dear-imgui) |
|
||||
| [Can you create elaborate/serious tools with Dear ImGui?](#q-can-you-create-elaborateserious-tools-with-dear-imgui) |
|
||||
| [Can you reskin the look of Dear ImGui?](#q-can-you-reskin-the-look-of-dear-imgui) |
|
||||
| [Why using C++ (as opposed to C)?](#q-why-using-c-as-opposed-to-c) |
|
||||
| **Q&A: Community** |
|
||||
| [How can I help?](#q-how-can-i-help) |
|
||||
### Basics
|
||||
|
||||
- [Where is the documentation?](#q-where-is-the-documentation)
|
||||
- [What is this library called?](#q-what-is-this-library-called)
|
||||
- [What is the difference between Dear ImGui and traditional UI toolkits?](#q-what-is-the-difference-between-dear-imgui-and-traditional-ui-toolkits)
|
||||
- [Which version should I get?](#q-which-version-should-i-get)
|
||||
|
||||
### Integration
|
||||
|
||||
- **[How to get started?](#q-how-to-get-started)**
|
||||
- **[How can I tell whether to dispatch mouse/keyboard to Dear ImGui or my application?](#q-how-can-i-tell-whether-to-dispatch-mousekeyboard-to-dear-imgui-or-my-application)**
|
||||
- [How can I enable keyboard or gamepad controls?](#q-how-can-i-enable-keyboard-or-gamepad-controls)
|
||||
- [How can I use this on a machine without mouse, keyboard or screen? (input share, remote display)](#q-how-can-i-use-this-on-a-machine-without-mouse-keyboard-or-screen-input-share-remote-display)
|
||||
- [How can I create my own backend?](#q-how-can-i-create-my-own-backend)
|
||||
- [I integrated Dear ImGui in my engine and little squares are showing instead of text...](#q-i-integrated-dear-imgui-in-my-engine-and-little-squares-are-showing-instead-of-text)
|
||||
- [I integrated Dear ImGui in my engine and some elements are clipping or disappearing when I move windows around...](#q-i-integrated-dear-imgui-in-my-engine-and-some-elements-are-clipping-or-disappearing-when-i-move-windows-around)
|
||||
- [I integrated Dear ImGui in my engine and some elements are displaying outside their expected windows boundaries...](#q-i-integrated-dear-imgui-in-my-engine-and-some-elements-are-displaying-outside-their-expected-windows-boundaries)
|
||||
|
||||
### Usage
|
||||
|
||||
- **[About the ID Stack system...](#q-about-the-id-stack-system)**
|
||||
- **[How can I have multiple widgets with the same label?](#q-how-can-i-have-multiple-widgets-with-the-same-label) (using `##` or `PushID()`)**
|
||||
- **[How can I have widgets with an empty label?](#q-how-can-i-have-widgets-with-an-empty-label) (using `##`)**
|
||||
- **[How can I make a label dynamic?](#q-how-can-i-make-a-label-dynamic) (using `###`)**
|
||||
- **[General description of the label and ID Stack system.](#general-description-of-the-label-and-id-stack-system)**
|
||||
- [How can I display an image?](#q-how-can-i-display-an-image), [What are ImTextureID/ImTextureRef?](#q-what-are-imtextureidimtextureref)
|
||||
- [How can I use maths operators with ImVec2?](#q-how-can-i-use-maths-operators-with-imvec2)
|
||||
- [How can I use my own maths types instead of ImVec2/ImVec4?](#q-how-can-i-use-my-own-maths-types-instead-of-imvec2imvec4)
|
||||
- [How can I interact with standard C++ types (such as std::string and std::vector)?](#q-how-can-i-interact-with-standard-c-types-such-as-stdstring-and-stdvector)
|
||||
- [How can I display custom shapes? (using low-level ImDrawList API)](#q-how-can-i-display-custom-shapes-using-low-level-imdrawlist-api)
|
||||
- [About Multi-Threading](#about-multi-threading)
|
||||
|
||||
### Fonts, Text
|
||||
|
||||
- [How should I handle DPI in my application?](#q-how-should-i-handle-dpi-in-my-application)
|
||||
- [How can I load a different font than the default?](#q-how-can-i-load-a-different-font-than-the-default)
|
||||
- [How can I easily use icons in my application?](#q-how-can-i-easily-use-icons-in-my-application)
|
||||
- [How can I load multiple fonts?](#q-how-can-i-load-multiple-fonts)
|
||||
- [How can I display and input non-Latin characters such as Chinese, Japanese, Korean, Cyrillic?](#q-how-can-i-display-and-input-non-latin-characters-such-as-chinese-japanese-korean-cyrillic)
|
||||
|
||||
### Concerns
|
||||
|
||||
- [Who uses Dear ImGui?](#q-who-uses-dear-imgui)
|
||||
- [Can you create elaborate/serious tools with Dear ImGui?](#q-can-you-create-elaborateserious-tools-with-dear-imgui)
|
||||
- [Can you reskin the look of Dear ImGui?](#q-can-you-reskin-the-look-of-dear-imgui)
|
||||
- [Why using C++ (as opposed to C)?](#q-why-using-c-as-opposed-to-c)
|
||||
|
||||
### Community
|
||||
|
||||
- [How can I help?](#q-how-can-i-help)
|
||||
|
||||
--------
|
||||
|
||||
# Q&A: Basics
|
||||
|
||||
@ -667,6 +683,7 @@ This way you will be able to use your own types everywhere, e.g. passing `MyVect
|
||||
---
|
||||
|
||||
### Q: How can I interact with standard C++ types (such as std::string and std::vector)?
|
||||
|
||||
- Being highly portable (backends/bindings for several languages, frameworks, programming styles, obscure or older platforms/compilers), and aiming for compatibility & performance suitable for every modern real-time game engine, Dear ImGui does not use any of std C++ types. We use raw types (e.g. char* instead of std::string) because they adapt to more use cases.
|
||||
- To use ImGui::InputText() with a std::string or any resizable string class, see [misc/cpp/imgui_stdlib.h](https://github.com/ocornut/imgui/blob/master/misc/cpp/imgui_stdlib.h).
|
||||
- To use combo boxes and list boxes with `std::vector` or any other data structure: the `BeginCombo()/EndCombo()` API
|
||||
@ -686,6 +703,10 @@ One possible implementation of a helper to facilitate printf-style building of s
|
||||
This is a small helper where you can instance strings with configurable local buffers length. Many game engines will
|
||||
provide similar or better string helpers.
|
||||
|
||||
Using string views:
|
||||
|
||||
- String view types such as `std::string_view` may be used with the [feature/string_view](https://github.com/ocornut/imgui/tree/features/string_view) branch. This branch is actively maintained and supported. Please provide feedback if you use it. We are waiting for a good moment to merge it.
|
||||
|
||||
##### [Return to Index](#index)
|
||||
|
||||
---
|
||||
@ -726,6 +747,20 @@ ImGui::End();
|
||||
|
||||
---
|
||||
|
||||
### About Multi-Threading
|
||||
|
||||
A same Dear ImGui context may be not used from multiple threads in parallel.
|
||||
|
||||
If you want to use a same context within parallel tasks for occasional debug purpose, consider using a lock.
|
||||
|
||||
If you want to submit contents from a main/update thread but render Dear ImGui output in a dedicated render thread, you'll need to stage `ImDrawData` and texture requests. See the `ImDrawDataSnapshot` and `ImTextureQueue` helpers in [imgui_threaded_rendering](https://github.com/ocornut/imgui_club#imgui_threaded_rendering). Also see topics with [label: multi-threading](https://github.com/ocornut/imgui/issues?q=label%3Amulti-threading).
|
||||
|
||||
If you use multiple Dear ImGui contexts and want to use them from multiple threads, you need to `#define GImGui` to become a TLS variable (see details near the definition of `GImGui`. If you need to display multiple contexts simultaneously, consider using [imgui_multicontext_compositor](https://github.com/ocornut/imgui_club#imgui_multicontext_compositor). Also see topics with [label: multi-contexts](https://github.com/ocornut/imgui/issues?q=label%3Amulti-contexts).
|
||||
|
||||
There is a script/patch to make the API take an explicit context pointer: [#5856](https://github.com/ocornut/imgui/pull/5856). It is presently unmaintained and likely to easy to update. It has been decided that the change is not currently worth applying to main-line but maybe will be in a future version.
|
||||
|
||||
---
|
||||
|
||||
# Q&A: Fonts, Text
|
||||
|
||||
### Q: How should I handle DPI in my application?
|
||||
|
||||
29
imgui.cpp
29
imgui.cpp
@ -1,4 +1,4 @@
|
||||
// dear imgui, v1.92.9 WIP
|
||||
// dear imgui, v1.92.9
|
||||
// (main code and documentation)
|
||||
|
||||
// Help:
|
||||
@ -32,7 +32,7 @@
|
||||
// See LICENSE.txt for copyright and licensing details (standard MIT License).
|
||||
// This library is free but needs your support to sustain development and maintenance.
|
||||
// Businesses: you can support continued development via B2B invoiced technical support, maintenance and sponsoring contracts.
|
||||
// PLEASE reach out at omar AT dearimgui DOT com. See https://github.com/ocornut/imgui/wiki/Funding
|
||||
// PLEASE reach out at omar AT discohello DOT com. See https://github.com/ocornut/imgui/wiki/Funding
|
||||
// Businesses: you can also purchase licenses for the Dear ImGui Automation/Test Engine.
|
||||
|
||||
// It is recommended that you don't modify imgui.cpp! It will become difficult for you to update the library.
|
||||
@ -1198,6 +1198,7 @@ IMPLEMENTING SUPPORT for ImGuiBackendFlags_RendererHasTextures:
|
||||
Q: How can I use my own math types instead of ImVec2?
|
||||
Q: How can I interact with standard C++ types (such as std::string and std::vector)?
|
||||
Q: How can I display custom shapes? (using low-level ImDrawList API)
|
||||
Q: About Multi-Threading
|
||||
>> See https://www.dearimgui.com/faq
|
||||
|
||||
Q&A: Fonts, Text
|
||||
@ -1223,7 +1224,7 @@ IMPLEMENTING SUPPORT for ImGuiBackendFlags_RendererHasTextures:
|
||||
==============
|
||||
|
||||
Q: How can I help?
|
||||
A: - Businesses: please reach out to "omar AT dearimgui DOT com" if you work in a place using Dear ImGui!
|
||||
A: - Businesses: please reach out to "omar AT discohello DOT com" if you work in a place using Dear ImGui!
|
||||
We can discuss ways for your company to fund development via invoiced technical support, maintenance or sponsoring contacts.
|
||||
This is among the most useful thing you can do for Dear ImGui. With increased funding, we sustain and grow work on this project.
|
||||
>>> See https://github.com/ocornut/imgui/wiki/Funding
|
||||
@ -2859,7 +2860,7 @@ IM_MSVC_RUNTIME_CHECKS_RESTORE
|
||||
|
||||
IMGUI_API ImU32 ImAlphaBlendColors(ImU32 col_a, ImU32 col_b)
|
||||
{
|
||||
float t = ((col_b >> IM_COL32_A_SHIFT) & 0xFF) / 255.f;
|
||||
float t = ((col_b >> IM_COL32_A_SHIFT) & 0xFF) / 255.0f;
|
||||
int r = ImLerp((int)(col_a >> IM_COL32_R_SHIFT) & 0xFF, (int)(col_b >> IM_COL32_R_SHIFT) & 0xFF, t);
|
||||
int g = ImLerp((int)(col_a >> IM_COL32_G_SHIFT) & 0xFF, (int)(col_b >> IM_COL32_G_SHIFT) & 0xFF, t);
|
||||
int b = ImLerp((int)(col_a >> IM_COL32_B_SHIFT) & 0xFF, (int)(col_b >> IM_COL32_B_SHIFT) & 0xFF, t);
|
||||
@ -2890,20 +2891,20 @@ ImU32 ImGui::ColorConvertFloat4ToU32(const ImVec4& in)
|
||||
// Optimized http://lolengine.net/blog/2013/01/13/fast-rgb-to-hsv
|
||||
void ImGui::ColorConvertRGBtoHSV(float r, float g, float b, float& out_h, float& out_s, float& out_v)
|
||||
{
|
||||
float K = 0.f;
|
||||
float K = 0.0f;
|
||||
if (g < b)
|
||||
{
|
||||
ImSwap(g, b);
|
||||
K = -1.f;
|
||||
K = -1.0f;
|
||||
}
|
||||
if (r < g)
|
||||
{
|
||||
ImSwap(r, g);
|
||||
K = -2.f / 6.f - K;
|
||||
K = -2.0f / 6.0f - K;
|
||||
}
|
||||
|
||||
const float chroma = r - (g < b ? g : b);
|
||||
out_h = ImFabs(K + (g - b) / (6.f * chroma + 1e-20f));
|
||||
out_h = ImFabs(K + (g - b) / (6.0f * chroma + 1e-20f));
|
||||
out_s = chroma / (r + 1e-20f);
|
||||
out_v = r;
|
||||
}
|
||||
@ -6242,7 +6243,9 @@ void ImGui::Render()
|
||||
ImDrawData* draw_data = &viewport->DrawDataP;
|
||||
for (ImDrawList* draw_list : draw_data->CmdLists)
|
||||
draw_list->_PopUnusedDrawCmd();
|
||||
|
||||
#ifndef IMGUI_DISABLE_OBSOLETE_FUNCTIONS
|
||||
draw_data->CmdListsCount = draw_data->CmdLists.Size;
|
||||
#endif
|
||||
g.IO.MetricsRenderVertices += draw_data->TotalVtxCount;
|
||||
g.IO.MetricsRenderIndices += draw_data->TotalIdxCount;
|
||||
}
|
||||
@ -7743,10 +7746,10 @@ bool ImGui::Begin(const char* name, bool* p_open, ImGuiWindowFlags flags)
|
||||
if (flags & ImGuiWindowFlags_AlwaysAutoResize)
|
||||
{
|
||||
if (!window_size_x_set_by_api)
|
||||
window->Size.x = window->SizeFull.x = 0.f;
|
||||
window->Size.x = window->SizeFull.x = 0.0f;
|
||||
if (!window_size_y_set_by_api)
|
||||
window->Size.y = window->SizeFull.y = 0.f;
|
||||
window->ContentSize = window->ContentSizeIdeal = ImVec2(0.f, 0.f);
|
||||
window->Size.y = window->SizeFull.y = 0.0f;
|
||||
window->ContentSize = window->ContentSizeIdeal = ImVec2(0.0f, 0.0f);
|
||||
}
|
||||
}
|
||||
|
||||
@ -18516,7 +18519,7 @@ void ImGui::ShowIDStackToolWindow(bool* p_open)
|
||||
Checkbox("Ctrl+C: copy path", &tool->OptCopyToClipboardOnCtrlC);
|
||||
PopStyleVar();
|
||||
SameLine();
|
||||
TextColored((time_since_copy >= 0.0f && time_since_copy < 0.75f && ImFmod(time_since_copy, 0.25f) < 0.25f * 0.5f) ? ImVec4(1.f, 1.f, 0.3f, 1.f) : ImVec4(), "*COPIED*");
|
||||
TextColored((time_since_copy >= 0.0f && time_since_copy < 0.75f && ImFmod(time_since_copy, 0.25f) < 0.25f * 0.5f) ? ImVec4(1.0f, 1.0f, 0.3f, 1.0f) : ImVec4(), "*COPIED*");
|
||||
if (tool->OptCopyToClipboardOnCtrlC && Shortcut(ImGuiMod_Ctrl | ImGuiKey_C, ImGuiInputFlags_RouteGlobal | ImGuiInputFlags_RouteOverFocused))
|
||||
{
|
||||
tool->CopyToClipboardLastTime = (float)g.Time;
|
||||
|
||||
8
imgui.h
8
imgui.h
@ -1,4 +1,4 @@
|
||||
// dear imgui, v1.92.9 WIP
|
||||
// dear imgui, v1.92.9
|
||||
// (headers)
|
||||
|
||||
// Help:
|
||||
@ -29,8 +29,8 @@
|
||||
|
||||
// Library Version
|
||||
// (Integer encoded as XYYZZ for use in #if preprocessor conditionals, e.g. '#if IMGUI_VERSION_NUM >= 12345')
|
||||
#define IMGUI_VERSION "1.92.9 WIP"
|
||||
#define IMGUI_VERSION_NUM 19287
|
||||
#define IMGUI_VERSION "1.92.9"
|
||||
#define IMGUI_VERSION_NUM 19290
|
||||
#define IMGUI_HAS_TABLE // Added BeginTable() - from IMGUI_VERSION_NUM >= 18000
|
||||
#define IMGUI_HAS_TEXTURES // Added ImGuiBackendFlags_RendererHasTextures - from IMGUI_VERSION_NUM >= 19198
|
||||
|
||||
@ -3298,7 +3298,7 @@ enum ImDrawFlags_
|
||||
|
||||
// Stroke options
|
||||
ImDrawFlags_Closed = 1 << 9, // PathStroke(), AddPolyline(): specify that shape should be closed.
|
||||
//ImDrawFlags_Closed = 1 << 0, // Prior to 1.92.8 (May 2026), ImDrawFlags_Closed was guaranteed to be == 1<<0 == 1 for legacy compatibility reason. Hardcoded use of 1 or true should be replaced.
|
||||
//ImDrawFlags_Closed = 1, // Prior to 1.92.8 (May 2026), ImDrawFlags_Closed was guaranteed to be == 1<<0 == 1 for legacy compatibility reason. Hardcoded use of 1 or true should be replaced.
|
||||
|
||||
ImDrawFlags_InvalidMask_ = ~0x7FFFFFF0, // == 0x8000000F,
|
||||
};
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
// dear imgui, v1.92.9 WIP
|
||||
// dear imgui, v1.92.9
|
||||
// (demo code)
|
||||
|
||||
// Help:
|
||||
@ -1747,7 +1747,7 @@ static void DemoWindowWidgetsDragAndDrop()
|
||||
|
||||
if (ImGui::IsItemActive() && !ImGui::IsItemHovered())
|
||||
{
|
||||
int n_next = n + (ImGui::GetMouseDragDelta(0).y < 0.f ? -1 : 1);
|
||||
int n_next = n + (ImGui::GetMouseDragDelta(0).y < 0.0f ? -1 : 1);
|
||||
if (n_next >= 0 && n_next < IM_COUNTOF(item_names))
|
||||
{
|
||||
item_names[n] = item_names[n_next];
|
||||
@ -2201,7 +2201,7 @@ static void DemoWindowWidgetsProgressBars()
|
||||
|
||||
char buf[32];
|
||||
sprintf(buf, "%d/%d", (int)(progress * 1753), 1753);
|
||||
ImGui::ProgressBar(progress, ImVec2(0.f, 0.f), buf);
|
||||
ImGui::ProgressBar(progress, ImVec2(0.0f, 0.0f), buf);
|
||||
|
||||
// Pass an animated negative value, e.g. -1.0f * (float)ImGui::GetTime() is the recommended value.
|
||||
// Adjust the factor if you want to adjust the animation speed.
|
||||
@ -9094,7 +9094,7 @@ struct ExampleAppConsole
|
||||
static int Stricmp(const char* s1, const char* s2) { int d; while ((d = toupper(*s2) - toupper(*s1)) == 0 && *s1) { s1++; s2++; } return d; }
|
||||
static int Strnicmp(const char* s1, const char* s2, int n) { int d = 0; while (n > 0 && (d = toupper(*s2) - toupper(*s1)) == 0 && *s1) { s1++; s2++; n--; } return d; }
|
||||
static char* Strdup(const char* s) { IM_ASSERT(s); size_t len = strlen(s) + 1; void* buf = ImGui::MemAlloc(len); IM_ASSERT(buf); return (char*)memcpy(buf, (const void*)s, len); }
|
||||
static void Strtrim(char* s) { char* str_end = s + strlen(s); while (str_end > s && str_end[-1] == ' ') str_end--; *str_end = 0; }
|
||||
static void Strtrimblanks(char* s) { char* str_end = s + strlen(s); while (str_end > s && str_end[-1] == ' ') str_end--; *str_end = 0; }
|
||||
|
||||
void ClearLog()
|
||||
{
|
||||
@ -9243,10 +9243,10 @@ struct ExampleAppConsole
|
||||
if (ImGui::InputText("Input", InputBuf, IM_COUNTOF(InputBuf), input_text_flags, &TextEditCallbackStub, (void*)this))
|
||||
{
|
||||
char* s = InputBuf;
|
||||
Strtrim(s);
|
||||
Strtrimblanks(s);
|
||||
if (s[0])
|
||||
ExecCommand(s);
|
||||
strcpy(s, "");
|
||||
s[0] = 0;
|
||||
reclaim_focus = true;
|
||||
}
|
||||
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
// dear imgui, v1.92.9 WIP
|
||||
// dear imgui, v1.92.9
|
||||
// (drawing and font code)
|
||||
|
||||
/*
|
||||
@ -2340,9 +2340,6 @@ void ImDrawData::AddDrawList(ImDrawList* draw_list)
|
||||
{
|
||||
draw_list->_PopUnusedDrawCmd();
|
||||
ImGui::AddDrawListToDrawDataEx(this, &CmdLists, draw_list);
|
||||
#ifndef IMGUI_DISABLE_OBSOLETE_FUNCTIONS
|
||||
CmdListsCount = CmdLists.Size;
|
||||
#endif
|
||||
}
|
||||
|
||||
// For backward compatibility: convert all buffers from indexed to de-indexed, in case you cannot render indexed. Note: this is slow and most likely a waste of resources. Always prefer indexed rendering!
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
// dear imgui, v1.92.9 WIP
|
||||
// dear imgui, v1.92.9
|
||||
// (internal structures/api)
|
||||
|
||||
// You may use this file to debug, understand or extend Dear ImGui features but we don't provide any guarantee of forward compatibility.
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
// dear imgui, v1.92.9 WIP
|
||||
// dear imgui, v1.92.9
|
||||
// (tables and columns code)
|
||||
|
||||
/*
|
||||
@ -490,17 +490,18 @@ bool ImGui::BeginTableEx(const char* name, ImGuiID id, int columns_count, ImG
|
||||
// FIXME: Because inner_window's Scrollbar doesn't know about border size, since it's not encoded in window->WindowBorderSize,
|
||||
// it already overlaps it and doesn't need an extra offset. Ideally we should be able to pass custom border size with
|
||||
// different x/y values to BeginChild().
|
||||
const float border_size = TABLE_BORDER_SIZE;
|
||||
if (flags & ImGuiTableFlags_BordersOuterV)
|
||||
{
|
||||
table->HostClipRect.Min.x = ImMin(table->HostClipRect.Min.x + TABLE_BORDER_SIZE, table->HostClipRect.Max.x);
|
||||
table->HostClipRect.Min.x = ImMin(table->HostClipRect.Min.x + border_size, table->HostClipRect.Max.x);
|
||||
if (inner_window->DecoOuterSizeX2 == 0.0f)
|
||||
table->HostClipRect.Max.x = ImMax(table->HostClipRect.Max.x - TABLE_BORDER_SIZE, table->HostClipRect.Min.x);
|
||||
table->HostClipRect.Max.x = ImMax(table->HostClipRect.Max.x - border_size, table->HostClipRect.Min.x);
|
||||
}
|
||||
if (flags & ImGuiTableFlags_BordersOuterH)
|
||||
{
|
||||
table->HostClipRect.Min.y = ImMin(table->HostClipRect.Min.y + TABLE_BORDER_SIZE, table->HostClipRect.Max.y);
|
||||
table->HostClipRect.Min.y = ImMin(table->HostClipRect.Min.y + border_size, table->HostClipRect.Max.y);
|
||||
if (inner_window->DecoOuterSizeY2 == 0.0f)
|
||||
table->HostClipRect.Max.y = ImMax(table->HostClipRect.Max.y - TABLE_BORDER_SIZE, table->HostClipRect.Min.y);
|
||||
table->HostClipRect.Max.y = ImMax(table->HostClipRect.Max.y - border_size, table->HostClipRect.Min.y);
|
||||
}
|
||||
}
|
||||
|
||||
@ -3626,7 +3627,7 @@ void ImGui::TableAngledHeadersRowEx(ImGuiID row_id, float angle, float max_label
|
||||
if (pass == 1)
|
||||
{
|
||||
// Draw border
|
||||
draw_list->AddLine(bg_shape[0], bg_shape[3], TableGetColumnBorderCol(table, order_n, column_n));
|
||||
draw_list->AddLine(bg_shape[0], bg_shape[3], TableGetColumnBorderCol(table, order_n, column_n), TABLE_BORDER_SIZE);
|
||||
}
|
||||
}
|
||||
PopClipRect();
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
// dear imgui, v1.92.9 WIP
|
||||
// dear imgui, v1.92.9
|
||||
// (widgets code)
|
||||
|
||||
/*
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user