mirror of
https://github.com/ocornut/imgui.git
synced 2026-01-25 02:24:24 +00:00
Merge branch 'master' into docking
# Conflicts: # backends/imgui_impl_glfw.cpp # docs/CHANGELOG.txt # imgui.cpp
This commit is contained in:
commit
9e30fb0ec1
10 changed files with 111 additions and 45 deletions
|
|
@ -21,6 +21,7 @@
|
|||
// CHANGELOG
|
||||
// (minor and older changes stripped away, please see git history for details)
|
||||
// 2023-XX-XX: Platform: Added support for multiple windows via the ImGuiPlatformIO interface.
|
||||
// 2023-03-14: Emscripten: Avoid using glfwGetError() and glfwGetGamepadState() which are not correctly implemented in Emscripten emulation. (#6240)
|
||||
// 2023-02-03: Emscripten: Registering custom low-level mouse wheel handler to get more accurate scrolling impulses on Emscripten. (#4019, #6096)
|
||||
// 2023-01-18: Handle unsupported glfwGetVideoMode() call on e.g. Emscripten.
|
||||
// 2023-01-04: Inputs: Fixed mods state on Linux when using Alt-GR text input (e.g. German keyboard layout), could lead to broken text input. Revert a 2022/01/17 change were we resumed using mods provided by GLFW, turns out they were faulty.
|
||||
|
|
@ -115,6 +116,7 @@
|
|||
#endif
|
||||
#define GLFW_HAS_GAMEPAD_API (GLFW_VERSION_COMBINED >= 3300) // 3.3+ glfwGetGamepadState() new api
|
||||
#define GLFW_HAS_GETKEYNAME (GLFW_VERSION_COMBINED >= 3200) // 3.2+ glfwGetKeyName()
|
||||
#define GLFW_HAS_GETERROR (GLFW_VERSION_COMBINED >= 3300) // 3.3+ glfwGetError()
|
||||
|
||||
// GLFW data
|
||||
enum GlfwClientApi
|
||||
|
|
@ -353,7 +355,7 @@ static int ImGui_ImplGlfw_TranslateUntranslatedKey(int key, int scancode)
|
|||
GLFWerrorfun prev_error_callback = glfwSetErrorCallback(nullptr);
|
||||
const char* key_name = glfwGetKeyName(key, scancode);
|
||||
glfwSetErrorCallback(prev_error_callback);
|
||||
#if (GLFW_VERSION_COMBINED >= 3300) // Eat errors (see #5908)
|
||||
#if GLFW_HAS_GETERROR && !defined(__EMSCRIPTEN__) // Eat errors (see #5908)
|
||||
(void)glfwGetError(NULL);
|
||||
#endif
|
||||
if (key_name && key_name[0] != 0 && key_name[1] == 0)
|
||||
|
|
@ -582,7 +584,7 @@ static bool ImGui_ImplGlfw_Init(GLFWwindow* window, bool install_callbacks, Glfw
|
|||
bd->MouseCursors[ImGuiMouseCursor_NotAllowed] = glfwCreateStandardCursor(GLFW_ARROW_CURSOR);
|
||||
#endif
|
||||
glfwSetErrorCallback(prev_error_callback);
|
||||
#if (GLFW_VERSION_COMBINED >= 3300) // Eat errors (see #5785)
|
||||
#if GLFW_HAS_GETERROR && !defined(__EMSCRIPTEN__) // Eat errors (see #5908)
|
||||
(void)glfwGetError(NULL);
|
||||
#endif
|
||||
|
||||
|
|
@ -763,7 +765,7 @@ static void ImGui_ImplGlfw_UpdateGamepads()
|
|||
return;
|
||||
|
||||
io.BackendFlags &= ~ImGuiBackendFlags_HasGamepad;
|
||||
#if GLFW_HAS_GAMEPAD_API
|
||||
#if GLFW_HAS_GAMEPAD_API && !defined(__EMSCRIPTEN__)
|
||||
GLFWgamepadstate gamepad;
|
||||
if (!glfwGetGamepadState(GLFW_JOYSTICK_1, &gamepad))
|
||||
return;
|
||||
|
|
|
|||
|
|
@ -99,7 +99,7 @@ Other changes:
|
|||
|
||||
|
||||
-----------------------------------------------------------------------
|
||||
VERSION 1.89.4 WIP (In Progress)
|
||||
VERSION 1.89.4 (Released 2023-03-14)
|
||||
-----------------------------------------------------------------------
|
||||
|
||||
Breaking Changes:
|
||||
|
|
@ -109,7 +109,7 @@ Breaking Changes:
|
|||
- Moved the optional "courtesy maths operators" implementation from imgui_internal.h in imgui.h.
|
||||
Even though we encourage using your own maths types and operators by setting up IM_VEC2_CLASS_EXTRA,
|
||||
it has been frequently requested by people to use our own. We had an opt-in define which was
|
||||
previously fulfilled in imgui_internal.h. It is now fulfilled in imgui.h. (#6164, #6137, #5966, #2832)
|
||||
previously fulfilled by imgui_internal.h. It is now fulfilled by imgui.h. (#6164, #6137, #5966, #2832)
|
||||
OK: #define IMGUI_DEFINE_MATH_OPERATORS / #include "imgui.h" / #include "imgui_internal.h"
|
||||
Error: #include "imgui.h" / #define IMGUI_DEFINE_MATH_OPERATORS / #include "imgui_internal.h"
|
||||
Added a dedicated compile-time check message to help diagnose this.
|
||||
|
|
@ -117,11 +117,22 @@ Breaking Changes:
|
|||
Please only submit contents and call EndTooltip() if BeginTooltip() returns true.
|
||||
In reality the function will _currently_ always return true, but further changes down the
|
||||
line may change this, best to clarify API sooner. Updated demo code accordingly.
|
||||
- Commented out redirecting enums/functions names that were marked obsolete two years ago:
|
||||
- ImGuiSliderFlags_ClampOnInput -> use ImGuiSliderFlags_AlwaysClamp
|
||||
- ImGuiInputTextFlags_AlwaysInsertMode -> use ImGuiInputTextFlags_AlwaysOverwrite
|
||||
- ImDrawList::AddBezierCurve() -> use ImDrawList::AddBezierCubic()
|
||||
- ImDrawList::PathBezierCurveTo() -> use ImDrawList::PathBezierCubicCurveTo()
|
||||
|
||||
Other changes:
|
||||
|
||||
- Nav: Tabbing now cycles through all items when ImGuiConfigFlags_NavEnableKeyboard is set.
|
||||
(#3092, #5759, #787)
|
||||
While this was generally desired and requested by many, note that its addition means
|
||||
that some types of UI may become more fastidious to use TAB key with, if the navigation
|
||||
cursor cycles through too many items. You can mark items items as not tab-spottable:
|
||||
- Public API: PushTabStop(false) / PopTabStop()
|
||||
- Internal: PushItemFlag(ImGuiItemFlags_NoTabStop, true);
|
||||
- Internal: Directly pass ImGuiItemFlags_NoTabStop to ItemAdd() for custom widgets.
|
||||
- Nav: Tabbing/Shift-Tabbing can more reliably be used to step out of an item that is not
|
||||
tab-stoppable. (#3092, #5759, #787)
|
||||
- Nav: Made Enter key submit the same type of Activation event as Space key,
|
||||
|
|
@ -131,23 +142,32 @@ Other changes:
|
|||
- Nav: Fixed an issue with Gamepad navigation when the movement lead to a scroll and
|
||||
frame time > repeat rate. Triggering a new move request on the same frame as a move
|
||||
result lead to an incorrect calculation and loss of navigation id. (#6171)
|
||||
- Nav: Fixed SetItemDefaultFocus() from not scrolling when item is partially visible.
|
||||
(#2814, #2812) [@DomGries]
|
||||
- Tables: Fixed an issue where user's Y cursor movement within a hidden column would
|
||||
have side-effects.
|
||||
- IO: Lifted constraint to call io.AddEventXXX functions from current context. (#4921, #5856, #6199)
|
||||
- InputText: Fixed not being able to use CTRL+Tab while an InputText() using Tab
|
||||
for completion or textinput is active (regresion from 1.89).
|
||||
for completion or text data is active (regression from 1.89).
|
||||
- Drag and Drop: Fixed handling of overlapping targets when smaller one is submitted
|
||||
before and can accept the same data type. (#6183).
|
||||
- Drag and Drop: Clear drag and drop state as soon as delivery is accepted in order to
|
||||
avoid inteferences. (#5817, #6183) [@DimaKoltun]
|
||||
avoid interferences. (#5817, #6183) [@DimaKoltun]
|
||||
- Debug Tools: Added io.ConfigDebugBeginReturnValueOnce / io.ConfigDebugBeginReturnValueLoop
|
||||
options to simulate Begin/BeginChild returning false to facilitate debugging user behavior.
|
||||
- Demo: Updated to test return value of BeginTooltip().
|
||||
- Backends: OpenGL3: Fixed restoration of a potentially deleted OpenGL program. If an active
|
||||
program was pending deletion, attempting to restore it would error. (#6220, #6224) [@Cyphall]
|
||||
- Backends: Win32: Use WM_NCMOUSEMOVE / WM_NCMOUSELEAVE to track mouse positions over
|
||||
non-client area (e.g. OS decorations) when app is not focused. (#6045, #6162)
|
||||
- Backends: SDL2, SDL3: Accept SDL_GetPerformanceCounter() not returning a monotonically
|
||||
- Backends: SDL2, SDL3: Accept SDL_GetPerformanceCounter() not returning a monotonically
|
||||
increasing value. (#6189, #6114, #3644) [@adamkewley]
|
||||
- Backends: GLFW: Avoid using glfwGetError() and glfwGetGamepadState() on Emscripten, which
|
||||
recently updated its GLFW emulation layer to GLFW 3.3 without supporting those. (#6240)
|
||||
- Examples: Android: Fixed example build for Gradle 8. (#6229, #6227) [@duddel]
|
||||
- Examples: Updated all examples application to enable ImGuiConfigFlags_NavEnableKeyboard
|
||||
and ImGuiConfigFlags_NavEnableGamepad by default. (#787)
|
||||
- Demo: Updated to test return value of BeginTooltip().
|
||||
- Internals: Misc tweaks to facilitate applying an explicit-context patch. (#5856) [@Dragnalith]
|
||||
|
||||
-----------------------------------------------------------------------
|
||||
VERSION 1.89.3 (Released 2023-02-14)
|
||||
|
|
|
|||
|
|
@ -127,6 +127,8 @@ static bool InitWGPU()
|
|||
|
||||
static void MainLoopStep(void* window)
|
||||
{
|
||||
ImGuiIO& io = ImGui::GetIO();
|
||||
|
||||
glfwPollEvents();
|
||||
|
||||
int width, height;
|
||||
|
|
|
|||
46
imgui.cpp
46
imgui.cpp
|
|
@ -1,4 +1,4 @@
|
|||
// dear imgui, v1.89.4 WIP
|
||||
// dear imgui, v1.89.4
|
||||
// (main code and documentation)
|
||||
|
||||
// Help:
|
||||
|
|
@ -399,12 +399,17 @@ CODE
|
|||
You can read releases logs https://github.com/ocornut/imgui/releases for more details.
|
||||
|
||||
(Docking/Viewport Branch)
|
||||
- 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/XX/XX (1.XXXX) - 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/03/14 (1.89.4) - commented out redirecting enums/functions names that were marked obsolete two years ago:
|
||||
- ImGuiSliderFlags_ClampOnInput -> use ImGuiSliderFlags_AlwaysClamp
|
||||
- ImGuiInputTextFlags_AlwaysInsertMode -> use ImGuiInputTextFlags_AlwaysOverwrite
|
||||
- ImDrawList::AddBezierCurve() -> use ImDrawList::AddBezierCubic()
|
||||
- ImDrawList::PathBezierCurveTo() -> use ImDrawList::PathBezierCubicCurveTo()
|
||||
- 2023/03/09 (1.89.4) - renamed PushAllowKeyboardFocus()/PopAllowKeyboardFocus() to PushTabStop()/PopTabStop(). Kept inline redirection functions (will obsolete).
|
||||
- 2023/03/09 (1.89.4) - tooltips: Added 'bool' return value to BeginTooltip() for API consistency. Please only submit contents and call EndTooltip() if BeginTooltip() returns true. In reality the function will _currently_ always return true, but further changes down the line may change this, best to clarify API sooner.
|
||||
- 2023/02/15 (1.89.4) - moved the optional "courtesy maths operators" implementation from imgui_internal.h in imgui.h.
|
||||
|
|
@ -1266,6 +1271,8 @@ ImGuiIO::ImGuiIO()
|
|||
ConfigWindowsResizeFromEdges = true;
|
||||
ConfigWindowsMoveFromTitleBarOnly = false;
|
||||
ConfigMemoryCompactTimer = 60.0f;
|
||||
ConfigDebugBeginReturnValueOnce = false;
|
||||
ConfigDebugBeginReturnValueLoop = false;
|
||||
|
||||
// Platform Functions
|
||||
// Note: Initialize() will setup default clipboard/ime handlers.
|
||||
|
|
@ -4791,6 +4798,13 @@ void ImGui::NewFrame()
|
|||
Begin("Debug##Default");
|
||||
IM_ASSERT(g.CurrentWindow->IsFallbackWindow == true);
|
||||
|
||||
// [DEBUG] When io.ConfigDebugBeginReturnValue is set, we make Begin()/BeginChild() return false at different level of the window-stack,
|
||||
// allowing to validate correct Begin/End behavior in user code.
|
||||
if (g.IO.ConfigDebugBeginReturnValueLoop)
|
||||
g.DebugBeginReturnValueCullDepth = (g.DebugBeginReturnValueCullDepth == -1) ? 0 : ((g.DebugBeginReturnValueCullDepth + ((g.FrameCount % 4) == 0 ? 1 : 0)) % 10);
|
||||
else
|
||||
g.DebugBeginReturnValueCullDepth = -1;
|
||||
|
||||
CallContextHooks(&g, ImGuiContextHookType_NewFramePost);
|
||||
}
|
||||
|
||||
|
|
@ -7260,6 +7274,15 @@ bool ImGui::Begin(const char* name, bool* p_open, ImGuiWindowFlags flags)
|
|||
IM_ASSERT(window->Appearing == false); // Please report on GitHub if this triggers: https://github.com/ocornut/imgui/issues/4177
|
||||
}
|
||||
|
||||
// [DEBUG] io.ConfigDebugBeginReturnValue override return value to test Begin/End and BeginChild/EndChild behaviors.
|
||||
// (The implicit fallback window is NOT automatically ended allowing it to always be able to receive commands without crashing)
|
||||
if (!window->IsFallbackWindow && ((g.IO.ConfigDebugBeginReturnValueOnce && window_just_created) || (g.IO.ConfigDebugBeginReturnValueLoop && g.DebugBeginReturnValueCullDepth == g.CurrentWindowStack.Size)))
|
||||
{
|
||||
if (window->AutoFitFramesX > 0) { window->AutoFitFramesX++; }
|
||||
if (window->AutoFitFramesY > 0) { window->AutoFitFramesY++; }
|
||||
return false;
|
||||
}
|
||||
|
||||
return !window->SkipItems;
|
||||
}
|
||||
|
||||
|
|
@ -8104,7 +8127,7 @@ void ImGui::SetItemDefaultFocus()
|
|||
NavUpdateAnyRequestFlag();
|
||||
|
||||
// Scroll could be done in NavInitRequestApplyResult() via an opt-in flag (we however don't want regular init requests to scroll)
|
||||
if (!IsItemVisible())
|
||||
if (!window->ClipRect.Contains(g.LastItemData.Rect))
|
||||
ScrollToRectEx(window, g.LastItemData.Rect, ImGuiScrollFlags_None);
|
||||
}
|
||||
|
||||
|
|
@ -9643,7 +9666,9 @@ static void ImGui::ErrorCheckEndFrameSanityChecks()
|
|||
{
|
||||
if (g.CurrentWindowStack.Size > 1)
|
||||
{
|
||||
ImGuiWindow* window = g.CurrentWindowStack.back().Window; // <-- This window was not Ended!
|
||||
IM_ASSERT_USER_ERROR(g.CurrentWindowStack.Size == 1, "Mismatched Begin/BeginChild vs End/EndChild calls: did you forget to call End/EndChild?");
|
||||
IM_UNUSED(window);
|
||||
while (g.CurrentWindowStack.Size > 1)
|
||||
End();
|
||||
}
|
||||
|
|
@ -10591,7 +10616,8 @@ void ImGui::EndTooltip()
|
|||
|
||||
void ImGui::SetTooltipV(const char* fmt, va_list args)
|
||||
{
|
||||
BeginTooltipEx(ImGuiTooltipFlags_OverridePreviousTooltip, ImGuiWindowFlags_None);
|
||||
if (!BeginTooltipEx(ImGuiTooltipFlags_OverridePreviousTooltip, ImGuiWindowFlags_None))
|
||||
return;
|
||||
TextV(fmt, args);
|
||||
EndTooltip();
|
||||
}
|
||||
|
|
@ -18972,6 +18998,10 @@ void ImGui::ShowMetricsWindow(bool* p_open)
|
|||
}
|
||||
}
|
||||
|
||||
Checkbox("Debug Begin/BeginChild return value", &io.ConfigDebugBeginReturnValueLoop);
|
||||
SameLine();
|
||||
MetricsHelpMarker("Some calls to Begin()/BeginChild() will return false.\n\nWill cycle through window depths then repeat. Windows should be flickering while running.");
|
||||
|
||||
TreePop();
|
||||
}
|
||||
|
||||
|
|
|
|||
37
imgui.h
37
imgui.h
|
|
@ -1,4 +1,4 @@
|
|||
// dear imgui, v1.89.4 WIP
|
||||
// dear imgui, v1.89.4
|
||||
// (headers)
|
||||
|
||||
// Help:
|
||||
|
|
@ -22,8 +22,8 @@
|
|||
|
||||
// Library Version
|
||||
// (Integer encoded as XYYZZ for use in #if preprocessor conditionals, e.g. '#if IMGUI_VERSION_NUM > 12345')
|
||||
#define IMGUI_VERSION "1.89.4 WIP"
|
||||
#define IMGUI_VERSION_NUM 18936
|
||||
#define IMGUI_VERSION "1.89.4"
|
||||
#define IMGUI_VERSION_NUM 18940
|
||||
#define IMGUI_HAS_TABLE
|
||||
#define IMGUI_HAS_VIEWPORT // Viewport WIP branch
|
||||
#define IMGUI_HAS_DOCK // Docking WIP branch
|
||||
|
|
@ -1059,10 +1059,8 @@ enum ImGuiInputTextFlags_
|
|||
ImGuiInputTextFlags_CallbackEdit = 1 << 19, // Callback on any edit (note that InputText() already returns true on edit, the callback is useful mainly to manipulate the underlying buffer while focus is active)
|
||||
ImGuiInputTextFlags_EscapeClearsAll = 1 << 20, // Escape key clears content if not empty, and deactivate otherwise (contrast to default behavior of Escape to revert)
|
||||
|
||||
// Obsolete names (will be removed soon)
|
||||
#ifndef IMGUI_DISABLE_OBSOLETE_FUNCTIONS
|
||||
ImGuiInputTextFlags_AlwaysInsertMode = ImGuiInputTextFlags_AlwaysOverwrite // [renamed in 1.82] name was not matching behavior
|
||||
#endif
|
||||
// Obsolete names
|
||||
//ImGuiInputTextFlags_AlwaysInsertMode = ImGuiInputTextFlags_AlwaysOverwrite // [renamed in 1.82] name was not matching behavior
|
||||
};
|
||||
|
||||
// Flags for ImGui::TreeNodeEx(), ImGui::CollapsingHeader*()
|
||||
|
|
@ -1745,8 +1743,8 @@ enum ImGuiColorEditFlags_
|
|||
ImGuiColorEditFlags_PickerMask_ = ImGuiColorEditFlags_PickerHueWheel | ImGuiColorEditFlags_PickerHueBar,
|
||||
ImGuiColorEditFlags_InputMask_ = ImGuiColorEditFlags_InputRGB | ImGuiColorEditFlags_InputHSV,
|
||||
|
||||
// Obsolete names (will be removed)
|
||||
// ImGuiColorEditFlags_RGB = ImGuiColorEditFlags_DisplayRGB, ImGuiColorEditFlags_HSV = ImGuiColorEditFlags_DisplayHSV, ImGuiColorEditFlags_HEX = ImGuiColorEditFlags_DisplayHex // [renamed in 1.69]
|
||||
// Obsolete names
|
||||
//ImGuiColorEditFlags_RGB = ImGuiColorEditFlags_DisplayRGB, ImGuiColorEditFlags_HSV = ImGuiColorEditFlags_DisplayHSV, ImGuiColorEditFlags_HEX = ImGuiColorEditFlags_DisplayHex // [renamed in 1.69]
|
||||
};
|
||||
|
||||
// Flags for DragFloat(), DragInt(), SliderFloat(), SliderInt() etc.
|
||||
|
|
@ -1761,10 +1759,8 @@ enum ImGuiSliderFlags_
|
|||
ImGuiSliderFlags_NoInput = 1 << 7, // Disable CTRL+Click or Enter key allowing to input text directly into the widget
|
||||
ImGuiSliderFlags_InvalidMask_ = 0x7000000F, // [Internal] We treat using those bits as being potentially a 'float power' argument from the previous API that has got miscast to this enum, and will trigger an assert if needed.
|
||||
|
||||
// Obsolete names (will be removed)
|
||||
#ifndef IMGUI_DISABLE_OBSOLETE_FUNCTIONS
|
||||
ImGuiSliderFlags_ClampOnInput = ImGuiSliderFlags_AlwaysClamp, // [renamed in 1.79]
|
||||
#endif
|
||||
// Obsolete names
|
||||
//ImGuiSliderFlags_ClampOnInput = ImGuiSliderFlags_AlwaysClamp, // [renamed in 1.79]
|
||||
};
|
||||
|
||||
// Identify a mouse button.
|
||||
|
|
@ -2028,6 +2024,14 @@ struct ImGuiIO
|
|||
bool ConfigWindowsMoveFromTitleBarOnly; // = false // Enable allowing to move windows only when clicking on their title bar. Does not apply to windows without a title bar.
|
||||
float ConfigMemoryCompactTimer; // = 60.0f // Timer (in seconds) to free transient windows/tables memory buffers when unused. Set to -1.0f to disable.
|
||||
|
||||
// Debug options
|
||||
// - tools to test correct Begin/End and BeginChild/EndChild behaviors.
|
||||
// - presently Begn()/End() and BeginChild()EndChild() needs to ALWAYS be called in tandem, regardless of return value of BeginXXX()
|
||||
// this is inconsistent with other BeginXXX functions and create confusion for many users.
|
||||
// - we expect to update the API eventually. In the meanwhile we provided tools to facilitate checking user-code behavior.
|
||||
bool ConfigDebugBeginReturnValueOnce; // = false // First-time calls to Begin()/BeginChild() will return false. NEEDS TO BE SET AT APPLICATION BOOT TIME if you don't want to miss windows.
|
||||
bool ConfigDebugBeginReturnValueLoop; // = false // Some calls to Begin()/BeginChild() will return false. Will cycle through window depths then repeat. Suggested use: add "io.ConfigDebugBeginReturnValue = io.KeyShift" in your main loop then occasionally press SHIFT. Windows should be flickering while running.
|
||||
|
||||
//------------------------------------------------------------------
|
||||
// Platform Functions
|
||||
// (the imgui_impl_xxxx backend files are setting those up for you)
|
||||
|
|
@ -2752,10 +2756,9 @@ struct ImDrawList
|
|||
inline void PrimWriteIdx(ImDrawIdx idx) { *_IdxWritePtr = idx; _IdxWritePtr++; }
|
||||
inline void PrimVtx(const ImVec2& pos, const ImVec2& uv, ImU32 col) { PrimWriteIdx((ImDrawIdx)_VtxCurrentIdx); PrimWriteVtx(pos, uv, col); } // Write vertex with unique index
|
||||
|
||||
#ifndef IMGUI_DISABLE_OBSOLETE_FUNCTIONS
|
||||
inline void AddBezierCurve(const ImVec2& p1, const ImVec2& p2, const ImVec2& p3, const ImVec2& p4, ImU32 col, float thickness, int num_segments = 0) { AddBezierCubic(p1, p2, p3, p4, col, thickness, num_segments); } // OBSOLETED in 1.80 (Jan 2021)
|
||||
inline void PathBezierCurveTo(const ImVec2& p2, const ImVec2& p3, const ImVec2& p4, int num_segments = 0) { PathBezierCubicCurveTo(p2, p3, p4, num_segments); } // OBSOLETED in 1.80 (Jan 2021)
|
||||
#endif
|
||||
// Obsolete names
|
||||
//inline void AddBezierCurve(const ImVec2& p1, const ImVec2& p2, const ImVec2& p3, const ImVec2& p4, ImU32 col, float thickness, int num_segments = 0) { AddBezierCubic(p1, p2, p3, p4, col, thickness, num_segments); } // OBSOLETED in 1.80 (Jan 2021)
|
||||
//inline void PathBezierCurveTo(const ImVec2& p2, const ImVec2& p3, const ImVec2& p4, int num_segments = 0) { PathBezierCubicCurveTo(p2, p3, p4, num_segments); } // OBSOLETED in 1.80 (Jan 2021)
|
||||
|
||||
// [Internal helpers]
|
||||
IMGUI_API void _ResetForNewFrame();
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// dear imgui, v1.89.4 WIP
|
||||
// dear imgui, v1.89.4
|
||||
// (demo code)
|
||||
|
||||
// Help:
|
||||
|
|
@ -517,6 +517,15 @@ void ImGui::ShowDemoWindow(bool* p_open)
|
|||
ImGui::Checkbox("io.ConfigWindowsMoveFromTitleBarOnly", &io.ConfigWindowsMoveFromTitleBarOnly);
|
||||
ImGui::Checkbox("io.ConfigMacOSXBehaviors", &io.ConfigMacOSXBehaviors);
|
||||
ImGui::Text("Also see Style->Rendering for rendering options.");
|
||||
|
||||
ImGui::SeparatorText("Debug");
|
||||
ImGui::BeginDisabled();
|
||||
ImGui::Checkbox("io.ConfigDebugBeginReturnValueOnce", &io.ConfigDebugBeginReturnValueOnce); // .
|
||||
ImGui::EndDisabled();
|
||||
ImGui::SameLine(); HelpMarker("First calls to Begin()/BeginChild() will return false.\n\nTHIS OPTION IS DISABLED because it needs to be set at application boot-time to make sense. Showing the disabled option is a way to make this feature easier to discover");
|
||||
ImGui::Checkbox("io.ConfigDebugBeginReturnValueLoop", &io.ConfigDebugBeginReturnValueLoop);
|
||||
ImGui::SameLine(); HelpMarker("Some calls to Begin()/BeginChild() will return false.\n\nWill cycle through window depths then repeat. Windows should be flickering while running.");
|
||||
|
||||
ImGui::TreePop();
|
||||
ImGui::Spacing();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// dear imgui, v1.89.4 WIP
|
||||
// dear imgui, v1.89.4
|
||||
// (drawing and font code)
|
||||
|
||||
/*
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// dear imgui, v1.89.4 WIP
|
||||
// dear imgui, v1.89.4
|
||||
// (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.
|
||||
|
|
@ -2191,6 +2191,7 @@ struct ImGuiContext
|
|||
ImGuiTextIndex DebugLogIndex;
|
||||
ImU8 DebugLogClipperAutoDisableFrames;
|
||||
ImU8 DebugLocateFrames; // For DebugLocateItemOnHover(). This is used together with DebugLocateId which is in a hot/cached spot above.
|
||||
ImS8 DebugBeginReturnValueCullDepth; // Cycle between 0..9 then wrap around.
|
||||
bool DebugItemPickerActive; // Item picker is active (started with DebugStartItemPicker())
|
||||
ImU8 DebugItemPickerMouseButton;
|
||||
ImGuiID DebugItemPickerBreakId; // Will call IM_DEBUG_BREAK() when encountering this ID
|
||||
|
|
@ -2375,6 +2376,7 @@ struct ImGuiContext
|
|||
DebugLocateId = 0;
|
||||
DebugLogClipperAutoDisableFrames = 0;
|
||||
DebugLocateFrames = 0;
|
||||
DebugBeginReturnValueCullDepth = -1;
|
||||
DebugItemPickerActive = false;
|
||||
DebugItemPickerMouseButton = ImGuiMouseButton_Left;
|
||||
DebugItemPickerBreakId = 0;
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// dear imgui, v1.89.4 WIP
|
||||
// dear imgui, v1.89.4
|
||||
// (tables and columns code)
|
||||
|
||||
/*
|
||||
|
|
@ -1999,10 +1999,6 @@ void ImGui::TableBeginCell(ImGuiTable* table, int column_n)
|
|||
window->WorkRect.Max.x = column->WorkMaxX;
|
||||
window->DC.ItemWidth = column->ItemWidth;
|
||||
|
||||
// To allow ImGuiListClipper to function we propagate our row height
|
||||
if (!column->IsEnabled)
|
||||
window->DC.CursorPos.y = ImMax(window->DC.CursorPos.y, table->RowPosY2);
|
||||
|
||||
window->SkipItems = column->IsSkipItems;
|
||||
if (column->IsSkipItems)
|
||||
{
|
||||
|
|
@ -2049,7 +2045,8 @@ void ImGui::TableEndCell(ImGuiTable* table)
|
|||
else
|
||||
p_max_pos_x = table->IsUnfrozenRows ? &column->ContentMaxXUnfrozen : &column->ContentMaxXFrozen;
|
||||
*p_max_pos_x = ImMax(*p_max_pos_x, window->DC.CursorMaxPos.x);
|
||||
table->RowPosY2 = ImMax(table->RowPosY2, window->DC.CursorMaxPos.y + table->CellPaddingY);
|
||||
if (column->IsEnabled)
|
||||
table->RowPosY2 = ImMax(table->RowPosY2, window->DC.CursorMaxPos.y + table->CellPaddingY);
|
||||
column->ItemWidth = window->DC.ItemWidth;
|
||||
|
||||
// Propagate text baseline for the entire row
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// dear imgui, v1.89.4 WIP
|
||||
// dear imgui, v1.89.4
|
||||
// (widgets code)
|
||||
|
||||
/*
|
||||
|
|
@ -5766,7 +5766,8 @@ void ImGui::ColorTooltip(const char* text, const float* col, ImGuiColorEditFlags
|
|||
{
|
||||
ImGuiContext& g = *GImGui;
|
||||
|
||||
BeginTooltipEx(ImGuiTooltipFlags_OverridePreviousTooltip, ImGuiWindowFlags_None);
|
||||
if (!BeginTooltipEx(ImGuiTooltipFlags_OverridePreviousTooltip, ImGuiWindowFlags_None))
|
||||
return;
|
||||
const char* text_end = text ? FindRenderedTextEnd(text, NULL) : text;
|
||||
if (text_end > text)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue