Merge branch 'master' into docking

# Conflicts:
#	docs/CHANGELOG.txt
This commit is contained in:
ocornut
2026-07-31 16:25:00 +02:00
15 changed files with 75 additions and 64 deletions

View File

@@ -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.

View File

@@ -1,5 +1,5 @@
// dear imgui: Platform Binding for Android native app
// This needs to be used along with the OpenGL 3 Renderer (imgui_impl_opengl3)
// This needs to be used along with a Renderer (e.g. OpenGL3, Vulkan..)
// Implemented features:
// [X] Platform: Keyboard support. Since 1.87 we are using the io.AddKeyEvent() function. Pass ImGuiKey values to all key functions e.g. ImGui::IsKeyPressed(ImGuiKey_Space). [Legacy AKEYCODE_* values are obsolete since 1.87 and not supported since 1.91.5]

View File

@@ -1,5 +1,5 @@
// dear imgui: Platform Binding for Android native app
// This needs to be used along with the OpenGL 3 Renderer (imgui_impl_opengl3)
// This needs to be used along with a Renderer (e.g. OpenGL3, Vulkan..)
// Implemented features:
// [X] Platform: Keyboard support. Since 1.87 we are using the io.AddKeyEvent() function. Pass ImGuiKey values to all key functions e.g. ImGui::IsKeyPressed(ImGuiKey_Space). [Legacy AKEYCODE_* values are obsolete since 1.87 and not supported since 1.91.5]

View File

@@ -154,7 +154,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);
@@ -452,7 +452,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;\
@@ -572,10 +572,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);

View File

@@ -163,7 +163,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);
@@ -470,7 +470,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;\
@@ -582,7 +582,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));
@@ -590,10 +589,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);

View File

@@ -282,7 +282,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);
}
@@ -690,11 +690,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;
@@ -797,7 +797,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;\

View File

@@ -451,7 +451,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);
}

View File

@@ -36,18 +36,23 @@ HOW TO UPDATE?
- Please report any issue!
-----------------------------------------------------------------------
VERSION 1.92.9b (In Progress)
VERSION 1.92.9b (Released 2026-07-31)
-----------------------------------------------------------------------
Breaking Changes:
Decorated log and release notes: https://github.com/ocornut/imgui/releases/tag/v1.92.9b
Other Changes:
Changes:
- DragXXX, SliderXXX: fixed a regression in 1.92.9 where clicking a previously
Ctrl+Clicked field would flick it to text edit mode for a frame. (#9476, #701)
- Tables:
- Fixed Y2 position of lower horizontal border (ImGuiTableFlags_BordersOuterH)
being off by one pixel when vertical ones are not also enabled. [@thedmd]
- Fixed X position of angled borders being off by half a pixel. [@thedmd]
- 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)
-----------------------------------------------------------------------
@@ -927,7 +932,7 @@ Docking+Viewports Branch:
- Backends:
- GLFW: dynamically load X11 functions to avoid `-lx11` linking requirement introduced
in 1.92.3. (#9116, #9109) [@ramenguy99]
- GLFW: improve workarounds for cases where GLFW is unable to provide reliable monitor
- GLFW: improve workarounds for cases where GLFW is unable to provide reliable monitor
info. Preserve existing monitor list when none of the new one is valid. (#9195, #7902, #5683)
- SDL2, SDL3: adjust IME offset to match other backends and master branch. (#6071, #1953)
- Win32: viewports created by backend forcefully direct messages to
@@ -1085,7 +1090,7 @@ Docking+Viewports Branch:
- Docking, Style: fixed per-window ImGuiCol_UnsavedMarker changes not being latched
by docked windows. (#8983, #9064)
- Docking: fixed crash loading certain form of invalid .ini settings (e.g. nodes
- Docking: fixed crash loading certain form of invalid .ini settings (e.g. nodes
referring to a missing parent, duplicate nodes id). (#9070)
- Docking: added io.ConfigDockingNoDockingOver helper config flag to prevent
merging windows into a same tab-bar.

View File

@@ -1,4 +1,4 @@
// dear imgui, v1.92.9
// dear imgui, v1.92.9b
// (main code and documentation)
// Help:
@@ -2925,7 +2925,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);
@@ -2956,20 +2956,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;
}
@@ -8189,10 +8189,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);
}
}
@@ -24501,7 +24501,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;

View File

@@ -1,4 +1,4 @@
// dear imgui, v1.92.9
// dear imgui, v1.92.9b
// (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"
#define IMGUI_VERSION_NUM 19290
#define IMGUI_VERSION "1.92.9b"
#define IMGUI_VERSION_NUM 19291
#define IMGUI_HAS_TABLE // Added BeginTable() - from IMGUI_VERSION_NUM >= 18000
#define IMGUI_HAS_TEXTURES // Added ImGuiBackendFlags_RendererHasTextures - from IMGUI_VERSION_NUM >= 19198
#define IMGUI_HAS_VIEWPORT // In 'docking' WIP branch.
@@ -3432,7 +3432,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,
};

View File

@@ -1,4 +1,4 @@
// dear imgui, v1.92.9
// dear imgui, v1.92.9b
// (demo code)
// Help:
@@ -1818,7 +1818,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];
@@ -2272,7 +2272,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.
@@ -9208,7 +9208,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()
{
@@ -9357,10 +9357,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;
}
@@ -10382,6 +10382,7 @@ static void ShowExampleAppCustomRendering(bool* p_open)
{
IMGUI_DEMO_MARKER("Examples/Custom rendering/Primitives");
ImGui::PushItemWidth(-ImGui::GetFontSize() * 15);
ImGui::PushItemFlag(ImGuiItemFlags_LiveEditOnInput, true);
ImDrawList* draw_list = ImGui::GetWindowDrawList();
// Draw gradients
@@ -10408,7 +10409,7 @@ static void ShowExampleAppCustomRendering(bool* p_open)
// Draw a bunch of primitives
ImGui::Text("All primitives");
static float sz = 36.0f;
static float sz = 42.0f;
static float thickness = 3.0f;
static int ngon_sides = 6;
static bool circle_segments_override = false;
@@ -10502,6 +10503,7 @@ static void ShowExampleAppCustomRendering(bool* p_open)
x += sz + spacing;
ImGui::Dummy(ImVec2((sz + spacing) * 13.2f, (sz + spacing) * 3.0f));
ImGui::PopItemFlag();
ImGui::PopItemWidth();
ImGui::EndTabItem();
}

View File

@@ -1,4 +1,4 @@
// dear imgui, v1.92.9
// dear imgui, v1.92.9b
// (drawing and font code)
/*
@@ -3165,10 +3165,10 @@ static void Decode85(const unsigned char* src, unsigned char* dst)
}
}
#if !defined(IMGUI_DISABLE_DEFAULT_FONT) && !defined(IMGUI_DISABLE_DEFAULT_FONT_BITMAP)
static const char* GetDefaultCompressedFontDataProggyClean(int* out_size);
const char* ImGui_GetDefaultCompressedFontDataProggyClean(int* out_size);
#endif
#if !defined(IMGUI_DISABLE_DEFAULT_FONT) && !defined(IMGUI_DISABLE_DEFAULT_FONT_VECTOR)
static const char* GetDefaultCompressedFontDataProggyForever(int* out_size);
const char* ImGui_GetDefaultCompressedFontDataProggyForever(int* out_size);
#endif
// This duplicates some of the logic in UpdateFontsNewFrame() which is a bit chicken-and-eggy/tricky to extract due to variety of codepaths and possible initialization ordering.
@@ -3207,7 +3207,7 @@ ImFont* ImFontAtlas::AddFontDefaultBitmap(const ImFontConfig* font_cfg_template)
font_cfg.GlyphOffset.y += 1.0f * (font_cfg.SizePixels / 13.0f); // Add +1 offset per 13 units
int ttf_compressed_size = 0;
const char* ttf_compressed = GetDefaultCompressedFontDataProggyClean(&ttf_compressed_size);
const char* ttf_compressed = ImGui_GetDefaultCompressedFontDataProggyClean(&ttf_compressed_size);
return AddFontFromMemoryCompressedTTF(ttf_compressed, ttf_compressed_size, font_cfg.SizePixels, &font_cfg);
#else
IM_ASSERT(0 && "Function is disabled in this build.");
@@ -3235,7 +3235,7 @@ ImFont* ImFontAtlas::AddFontDefaultVector(const ImFontConfig* font_cfg_template)
font_cfg.GlyphOffset.y += 0.5f * (font_cfg.SizePixels / 16.0f); // Closer match ProggyClean + avoid descenders going too high (with current code).
int ttf_compressed_size = 0;
const char* ttf_compressed = GetDefaultCompressedFontDataProggyForever(&ttf_compressed_size);
const char* ttf_compressed = ImGui_GetDefaultCompressedFontDataProggyForever(&ttf_compressed_size);
return AddFontFromMemoryCompressedTTF(ttf_compressed, ttf_compressed_size, font_cfg.SizePixels, &font_cfg);
#else
IM_ASSERT(0 && "Function is disabled in this build.");
@@ -6551,7 +6551,7 @@ static const unsigned char proggy_clean_ttf_compressed_data[9583] =
239,32,57,141,239,32,57,141,239,32,57,141,239,32,57,141,239,32,57,141,239,35,57,102,0,0,5,250,72,249,98,247,
};
static const char* GetDefaultCompressedFontDataProggyClean(int* out_size)
const char* ImGui_GetDefaultCompressedFontDataProggyClean(int* out_size)
{
*out_size = proggy_clean_ttf_compressed_size;
return (const char*)proggy_clean_ttf_compressed_data;
@@ -6816,7 +6816,7 @@ static const unsigned char proggy_forever_minimal_ttf_compressed_data[14562] =
3,36,0,229,13,183,147,132,7,42,175,187,66,0,0,0,0,229,178,59,232,5,250,48,120,202,241,
};
static const char* GetDefaultCompressedFontDataProggyForever(int* out_size)
const char* ImGui_GetDefaultCompressedFontDataProggyForever(int* out_size)
{
*out_size = proggy_forever_minimal_ttf_compressed_size;
return (const char*)proggy_forever_minimal_ttf_compressed_data;

View File

@@ -1,4 +1,4 @@
// dear imgui, v1.92.9
// dear imgui, v1.92.9b
// (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.
@@ -1276,6 +1276,7 @@ struct IMGUI_API ImGuiInputTextState
ImStbTexteditState* Stb; // State for stb_textedit.h
ImGuiInputTextFlags Flags; // copy of InputText() flags. may be used to check if e.g. ImGuiInputTextFlags_Password is set.
ImGuiID ID; // widget id owning the text state
//int LastFrameActive; // Last used frame-count (unused)
int TextLen; // UTF-8 length of the string in TextA (in bytes)
const char* TextSrc; // == TextA.Data unless read-only, in which case == buf passed to InputText(). For _ReadOnly fields, pointer will be null outside the InputText() call.
ImVector<char> TextA; // main UTF8 buffer. TextA.Size is a buffer size! Should always be >= buf_size passed by user (and of course >= CurLenA + 1).

View File

@@ -1,4 +1,4 @@
// dear imgui, v1.92.9
// dear imgui, v1.92.9b
// (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);
}
}
@@ -3025,7 +3026,7 @@ void ImGui::TableDrawBorders(ImGuiTable* table)
else if (table->Flags & ImGuiTableFlags_BordersOuterH)
{
inner_drawlist->AddLineH(outer_border.Min.x, outer_border.Max.x, outer_border.Min.y, outer_col, border_size);
inner_drawlist->AddLineH(outer_border.Min.x, outer_border.Max.x, outer_border.Max.y, outer_col, border_size);
inner_drawlist->AddLineH(outer_border.Min.x, outer_border.Max.x, outer_border.Max.y - border_size, outer_col, border_size);
}
}
if ((table->Flags & ImGuiTableFlags_BordersInnerH) && table->RowPosY2 < table->OuterRect.Max.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] - ImVec2(TABLE_BORDER_SIZE * 0.5f, 0.0f), bg_shape[3] - ImVec2(TABLE_BORDER_SIZE * 0.5f, 0.0f), TableGetColumnBorderCol(table, order_n, column_n), TABLE_BORDER_SIZE);
}
}
PopClipRect();

View File

@@ -1,4 +1,4 @@
// dear imgui, v1.92.9
// dear imgui, v1.92.9b
// (widgets code)
/*
@@ -4613,6 +4613,7 @@ void ImGui::InputTextDeactivateHook(ImGuiID id)
if (!state->EditedBefore)
return;
//IMGUI_DEBUG_LOG_ACTIVEID("InputTextDeactivateHook() id = 0x%08X\n", id);
state->EditedBefore = false;
g.InputTextDeactivatedState.ID = state->ID;
g.InputTextDeactivatedState.ElapseFrame = g.FrameCount + 1;
if (state->Flags & ImGuiInputTextFlags_ReadOnly)
@@ -5004,6 +5005,7 @@ bool ImGui::InputTextEx(const char* label, const char* hint, char* buf, int buf_
if (state != NULL && state->ID == id)
{
state->Flags = flags;
//state->LastFrameActive = g.FrameCount;
// Word-wrapping: attempt to keep cursor in view while resizing frame/parent (FIXME-WORDWRAP: would be better to preserve same relative offset)
if (is_wordwrap && state->WrapWidth != wrap_width)
@@ -5491,9 +5493,8 @@ bool ImGui::InputTextEx(const char* label, const char* hint, char* buf, int buf_
// Otherwise request text input ahead for next frame.
if (g.ActiveId == id && clear_active_id)
{
state->ID = 0; // To avoid InputTextDeactivateHook() unnecessarily running, which wouldn't be harmful but wasteful.
state->EditedBefore = false; // Data already applied: avoid InputTextDeactivateHook() taking a record now or later if same id is activated again without editing.
ClearActiveID();
state->ID = id;
}
// Render frame