mirror of
https://github.com/ocornut/imgui.git
synced 2025-10-10 03:56:35 +00:00
Merge branch 'master' into docking (doesn't include viewports-related changes for new SDL3 backend)
# Conflicts: # backends/imgui_impl_dx10.cpp # backends/imgui_impl_dx10.h # backends/imgui_impl_dx11.cpp # backends/imgui_impl_dx11.h # backends/imgui_impl_dx12.cpp # backends/imgui_impl_dx12.h # backends/imgui_impl_dx9.cpp # backends/imgui_impl_dx9.h # backends/imgui_impl_glfw.cpp # backends/imgui_impl_metal.h # backends/imgui_impl_metal.mm # backends/imgui_impl_opengl3.cpp # backends/imgui_impl_opengl3.h # backends/imgui_impl_osx.h # backends/imgui_impl_osx.mm # backends/imgui_impl_sdl2.cpp # backends/imgui_impl_sdlrenderer.cpp # backends/imgui_impl_sdlrenderer.h # backends/imgui_impl_vulkan.cpp # backends/imgui_impl_vulkan.h # backends/imgui_impl_win32.cpp # docs/CHANGELOG.txt # imgui.cpp # imgui_widgets.cpp
This commit is contained in:
14
imgui.cpp
14
imgui.cpp
@@ -388,12 +388,13 @@ CODE
|
||||
You can read releases logs https://github.com/ocornut/imgui/releases for more details.
|
||||
|
||||
(Docking/Viewport Branch)
|
||||
- 2022/XX/XX (1.XX) - when multi-viewports are enabled, all positions will be in your natural OS coordinates space. It means that:
|
||||
- 2023/XX/XX (1.XX) - when multi-viewports are enabled, all positions will be in your natural OS coordinates space. It means that:
|
||||
- reference to hard-coded positions such as in SetNextWindowPos(ImVec2(0,0)) are probably not what you want anymore.
|
||||
you may use GetMainViewport()->Pos to offset hard-coded positions, e.g. SetNextWindowPos(GetMainViewport()->Pos)
|
||||
- likewise io.MousePos and GetMousePos() will use OS coordinates.
|
||||
If you query mouse positions to interact with non-imgui coordinates you will need to offset them, e.g. subtract GetWindowViewport()->Pos.
|
||||
|
||||
- 2023/02/07 (1.89.3) - backends: renamed "imgui_impl_sdl.cpp" to "imgui_impl_sdl2.cpp" and "imgui_impl_sdl.h" to "imgui_impl_sdl2.h". (#6146) This is in prevision for the future release of SDL3.
|
||||
- 2022/10/26 (1.89) - commented out redirecting OpenPopupContextItem() which was briefly the name of OpenPopupOnItemClick() from 1.77 to 1.79.
|
||||
- 2022/10/12 (1.89) - removed runtime patching of invalid "%f"/"%0.f" format strings for DragInt()/SliderInt(). This was obsoleted in 1.61 (May 2018). See 1.61 changelog for details.
|
||||
- 2022/09/26 (1.89) - renamed and merged keyboard modifiers key enums and flags into a same set. Kept inline redirection enums (will obsolete).
|
||||
@@ -1920,7 +1921,7 @@ static const ImU32 GCrc32LookupTable[256] =
|
||||
// Known size hash
|
||||
// It is ok to call ImHashData on a string with known length but the ### operator won't be supported.
|
||||
// FIXME-OPT: Replace with e.g. FNV1a hash? CRC32 pretty much randomly access 1KB. Need to do proper measurements.
|
||||
ImGuiID ImHashData(const void* data_p, size_t data_size, ImU32 seed)
|
||||
ImGuiID ImHashData(const void* data_p, size_t data_size, ImGuiID seed)
|
||||
{
|
||||
ImU32 crc = ~seed;
|
||||
const unsigned char* data = (const unsigned char*)data_p;
|
||||
@@ -1936,7 +1937,7 @@ ImGuiID ImHashData(const void* data_p, size_t data_size, ImU32 seed)
|
||||
// - If we reach ### in the string we discard the hash so far and reset to the seed.
|
||||
// - We don't do 'current += 2; continue;' after handling ### to keep the code smaller/faster (measured ~10% diff in Debug build)
|
||||
// FIXME-OPT: Replace with e.g. FNV1a hash? CRC32 pretty much randomly access 1KB. Need to do proper measurements.
|
||||
ImGuiID ImHashStr(const char* data_p, size_t data_size, ImU32 seed)
|
||||
ImGuiID ImHashStr(const char* data_p, size_t data_size, ImGuiID seed)
|
||||
{
|
||||
seed = ~seed;
|
||||
ImU32 crc = seed;
|
||||
@@ -10635,7 +10636,7 @@ void ImGui::OpenPopupEx(ImGuiID id, ImGuiPopupFlags popup_flags)
|
||||
const int current_stack_size = g.BeginPopupStack.Size;
|
||||
|
||||
if (popup_flags & ImGuiPopupFlags_NoOpenOverExistingPopup)
|
||||
if (IsPopupOpen(0u, ImGuiPopupFlags_AnyPopupId))
|
||||
if (IsPopupOpen((ImGuiID)0, ImGuiPopupFlags_AnyPopupId))
|
||||
return;
|
||||
|
||||
ImGuiPopupData popup_ref; // Tagged as new ref as Window will be set back to NULL if we write this into OpenPopupStack.
|
||||
@@ -19646,8 +19647,7 @@ void ImGui::DebugNodeTabBar(ImGuiTabBar* tab_bar, const char* label)
|
||||
for (int tab_n = 0; tab_n < ImMin(tab_bar->Tabs.Size, 3); tab_n++)
|
||||
{
|
||||
ImGuiTabItem* tab = &tab_bar->Tabs[tab_n];
|
||||
p += ImFormatString(p, buf_end - p, "%s'%s'",
|
||||
tab_n > 0 ? ", " : "", (tab->Window || tab->NameOffset != -1) ? TabBarGetTabName(tab_bar, tab) : "???");
|
||||
p += ImFormatString(p, buf_end - p, "%s'%s'", tab_n > 0 ? ", " : "", TabBarGetTabName(tab_bar, tab));
|
||||
}
|
||||
p += ImFormatString(p, buf_end - p, (tab_bar->Tabs.Size > 3) ? " ... }" : " } ");
|
||||
if (!is_active) { PushStyleColor(ImGuiCol_Text, GetStyleColorVec4(ImGuiCol_TextDisabled)); }
|
||||
@@ -19669,7 +19669,7 @@ void ImGui::DebugNodeTabBar(ImGuiTabBar* tab_bar, const char* label)
|
||||
if (SmallButton("<")) { TabBarQueueReorder(tab_bar, tab, -1); } SameLine(0, 2);
|
||||
if (SmallButton(">")) { TabBarQueueReorder(tab_bar, tab, +1); } SameLine();
|
||||
Text("%02d%c Tab 0x%08X '%s' Offset: %.2f, Width: %.2f/%.2f",
|
||||
tab_n, (tab->ID == tab_bar->SelectedTabId) ? '*' : ' ', tab->ID, (tab->Window || tab->NameOffset != -1) ? TabBarGetTabName(tab_bar, tab) : "???", tab->Offset, tab->Width, tab->ContentWidth);
|
||||
tab_n, (tab->ID == tab_bar->SelectedTabId) ? '*' : ' ', tab->ID, TabBarGetTabName(tab_bar, tab), tab->Offset, tab->Width, tab->ContentWidth);
|
||||
PopID();
|
||||
}
|
||||
TreePop();
|
||||
|
Reference in New Issue
Block a user