mirror of
https://github.com/kevinporetti/UnrealImGui.git
synced 2025-01-18 08:20:32 +00:00
Updated to ImGui 1.65
This commit is contained in:
parent
6b97a7b724
commit
36cdd0c337
@ -10,6 +10,8 @@ Dear ImGui simplifies and helps with creation of quality visualisation and debug
|
|||||||
|
|
||||||
Status
|
Status
|
||||||
------
|
------
|
||||||
|
ImGui version: 1.65
|
||||||
|
|
||||||
Supported engine version: 4.20.2*
|
Supported engine version: 4.20.2*
|
||||||
|
|
||||||
\* *Plugin has been tested and if necessary updated to compile and work with this engine version. As long as possible I will try to maintain backward compatibility of existing features and possibly but not necessarily when adding new features. Right now it should be at least backward compatible with the engine version 4.15.*
|
\* *Plugin has been tested and if necessary updated to compile and work with this engine version. As long as possible I will try to maintain backward compatibility of existing features and possibly but not necessarily when adding new features. Right now it should be at least backward compatible with the engine version 4.15.*
|
||||||
|
@ -20,7 +20,8 @@ public class ImGui : ModuleRules
|
|||||||
|
|
||||||
PublicIncludePaths.AddRange(
|
PublicIncludePaths.AddRange(
|
||||||
new string[] {
|
new string[] {
|
||||||
Path.Combine(ModuleDirectory, "../ThirdParty/ImGuiLibrary/Include")
|
Path.Combine(ModuleDirectory, "../ThirdParty/ImGuiLibrary/Include"),
|
||||||
|
Path.Combine(ModuleDirectory, "../ThirdParty/ImGuiLibrary/Include/misc/stl")
|
||||||
// ... add public include paths required here ...
|
// ... add public include paths required here ...
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
@ -31,6 +31,8 @@ ImGuiContext** GImGuiContextPtrHandle = &GImGuiContextPtr;
|
|||||||
#include "imgui.cpp"
|
#include "imgui.cpp"
|
||||||
#include "imgui_demo.cpp"
|
#include "imgui_demo.cpp"
|
||||||
#include "imgui_draw.cpp"
|
#include "imgui_draw.cpp"
|
||||||
|
#include "imgui_widgets.cpp"
|
||||||
|
#include "misc/stl/imgui_stl.cpp"
|
||||||
|
|
||||||
#if PLATFORM_WINDOWS
|
#if PLATFORM_WINDOWS
|
||||||
#include <HideWindowsPlatformTypes.h>
|
#include <HideWindowsPlatformTypes.h>
|
||||||
|
501
Source/ThirdParty/ImGuiLibrary/CHANGELOG.txt
vendored
501
Source/ThirdParty/ImGuiLibrary/CHANGELOG.txt
vendored
@ -1,85 +1,292 @@
|
|||||||
dear imgui
|
dear imgui
|
||||||
CHANGELOG
|
CHANGELOG
|
||||||
|
|
||||||
-----------------------------------------------------------------------
|
This document holds the user-facing changelog that we also use in release notes.
|
||||||
|
We generally fold multiple commits pertaining to the same topic as a single entry.
|
||||||
|
Changes to the examples/bindings are included within the individual .cpp files in the examples/ folder.
|
||||||
|
|
||||||
This document holds the programmer changelog that we also use in release notes.
|
RELEASE NOTES: https://github.com/ocornut/imgui/releases
|
||||||
We generally fold multiple commits pertaining to the same topic as a single entry, and simplify various things.
|
REPORT ISSUES, ASK QUESTIONS: https://github.com/ocornut/imgui/issues
|
||||||
|
COMMITS HISTORY: https://github.com/ocornut/imgui/commits/master
|
||||||
Release notes: (with links and screenshots)
|
|
||||||
https://github.com/ocornut/imgui/releases
|
|
||||||
|
|
||||||
Changes to the examples/bindings are included within the individual .cpp files in examples.
|
|
||||||
|
|
||||||
Individual commits:
|
|
||||||
https://github.com/ocornut/imgui/commits/master
|
|
||||||
|
|
||||||
Report issues, ask questions:
|
|
||||||
https://github.com/ocornut/imgui/issues
|
|
||||||
|
|
||||||
-----------------------------------------------------------------------
|
|
||||||
|
|
||||||
WHEN TO UPDATE?
|
WHEN TO UPDATE?
|
||||||
|
|
||||||
It is generally safe to sync to the latest commit in master. The library is fairly stable and regressions tends to be fixed fast when reported.
|
- Keeping your copy of dear imgui updated once in a while is recommended.
|
||||||
Keeping your copy of dear imgui updated once in a while is recommended.
|
- It is generally safe to sync to the latest commit in master.
|
||||||
|
The library is fairly stable and regressions tends to be fixed fast when reported.
|
||||||
|
|
||||||
HOW TO UPDATE?
|
HOW TO UPDATE?
|
||||||
|
|
||||||
- Overwrite every file except imconfig.h (if you have modified it).
|
- Overwrite every file except imconfig.h (if you have modified it).
|
||||||
- You may also locally branch to modify imconfig.h and merge latest into your branch.
|
- You may also locally branch to modify imconfig.h and merge latest into your branch.
|
||||||
- Read the `Breaking Changes` section (in imgui.cpp or here in the Changelog).
|
- Read the `Breaking Changes` section (in imgui.cpp or here in the Changelog).
|
||||||
- If you have a problem with a missing function/symbols, search for its name in the code, there will likely be a comment about it.
|
- If you have a problem with a missing function/symbols, search for its name in the code, there will likely be a comment about it.
|
||||||
- If you are dropping this repository in your codebase, please leave the demo and text files in there, they will be useful.
|
- If you are dropping this repository in your codebase, please leave the demo and text files in there, they will be useful.
|
||||||
- You may diff your previous Changelog with the one you just copied and read that diff.
|
- You may diff your previous Changelog with the one you just copied and read that diff.
|
||||||
- You may enable `IMGUI_DISABLE_OBSOLETE_FUNCTIONS` in imconfig.h to forcefully disable legacy names and symbols. Doing it every once in a while is a good way to make sure you are not using obsolete symbols. Dear ImGui is in active development API updates have a little more frequent lately. They are carefully documented and should not affect all users.
|
- You may enable `IMGUI_DISABLE_OBSOLETE_FUNCTIONS` in imconfig.h to forcefully disable legacy names and symbols.
|
||||||
|
Doing it every once in a while is a good way to make sure you are not using obsolete symbols. Dear ImGui is in active development,
|
||||||
|
and API updates have been a little more frequent lately. They are documented below and in imgui.cpp and should not affect all users.
|
||||||
- Please report any issue!
|
- Please report any issue!
|
||||||
|
|
||||||
|
|
||||||
|
-----------------------------------------------------------------------
|
||||||
|
VERSION 1.65 (Released 2018-09-06)
|
||||||
-----------------------------------------------------------------------
|
-----------------------------------------------------------------------
|
||||||
|
|
||||||
VERSION 1.61 WIP
|
|
||||||
|
|
||||||
Breaking Changes:
|
Breaking Changes:
|
||||||
(IN PROGRESS, WILL ADD TO THIS LIST AS WE WORK ON 1.61)
|
|
||||||
|
|
||||||
- Misc: IM_DELETE() helper function added in 1.60 doesn't set the input pointer to NULL, more consistent with standard expectation and allows passing r-value.
|
- Renamed stb_truetype.h to imstb_truetype.h, stb_textedit.h to imstb_textedit.h, and
|
||||||
|
stb_rect_pack.h to imstb_rectpack.h. If you were conveniently using the imgui copy of those
|
||||||
|
STB headers in your project, you will have to update your include paths. (#1718, #2036)
|
||||||
|
The reason for this change is to avoid conflicts for projects that may also be importing
|
||||||
|
their own copy of the STB libraries. Note that imgui's copy of stb_textedit.h is modified.
|
||||||
|
- Renamed io.ConfigCursorBlink to io.ConfigInputTextCursorBlink. (#1427)
|
||||||
|
|
||||||
Other Changes:
|
Other Changes:
|
||||||
(IN PROGRESS, WILL ADD TO THIS LIST AS WE WORK ON 1.61)
|
|
||||||
|
|
||||||
- Window: Fixed default proportional item width lagging by one frame on resize.
|
- This is a minor release following the 1.64 refactor, with a little more shuffling of code.
|
||||||
|
- Clarified and improved the source code sectioning in all files (easier to search or browse sections).
|
||||||
|
- Nav: Removed the [Beta] tag from various descriptions of the gamepad/keyboard navigation system.
|
||||||
|
Although it is not perfect and will keep being improved, it is fairly functional and used by many. (#787)
|
||||||
|
- Fixed a build issue with non-Cygwin GCC under Windows.
|
||||||
|
- Demo: Added a "Configuration" block to make io.ConfigFlags/io.BackendFlags more prominent.
|
||||||
|
- Examples: OpenGL3: Fixed error condition when using the GLAD loader. (#2059, #2002). [@jiri]
|
||||||
|
|
||||||
|
|
||||||
|
-----------------------------------------------------------------------
|
||||||
|
VERSION 1.64 (Released 2018-08-31)
|
||||||
|
-----------------------------------------------------------------------
|
||||||
|
|
||||||
|
Changes:
|
||||||
|
|
||||||
|
- Moved README, CHANGELOG and TODO files to the docs/ folder.
|
||||||
|
If you are updating dear imgui by copying files, take the chance to delete the old files.
|
||||||
|
- Added imgui_widgets.cpp file, extracted and moved widgets code out of imgui.cpp into imgui_widgets.cpp.
|
||||||
|
Re-ordered some of the code remaining in imgui.cpp.
|
||||||
|
NONE OF THE FUNCTIONS HAVE CHANGED. THE CODE IS SEMANTICALLY 100% IDENTICAL, BUT _EVERY_ FUNCTIONS HAS BEEN MOVED.
|
||||||
|
Because of this, any local modifications to imgui.cpp will likely conflict when you update.
|
||||||
|
If you have any modifications to imgui.cpp, it is suggested that you first update to 1.63, then
|
||||||
|
isolate your patches. You can peak at imgui_widgets.cpp from 1.64 to get a sense of what is included in it,
|
||||||
|
then separate your changes into several patches that can more easily be applied to 1.64 on a per-file basis.
|
||||||
|
What I found worked nicely for me, was to open the diff of the old patches in an interactive merge/diff tool,
|
||||||
|
search for the corresponding function in the new code and apply the chunks manually.
|
||||||
|
- As a reminder, if you have any change to imgui.cpp it is a good habit to discuss them on the github,
|
||||||
|
so a solution applicable on the Master branch can be found. If your company has changes that you cannot
|
||||||
|
disclose you may also contact me privately.
|
||||||
|
|
||||||
|
|
||||||
|
-----------------------------------------------------------------------
|
||||||
|
VERSION 1.63 (Released 2018-08-29)
|
||||||
|
-----------------------------------------------------------------------
|
||||||
|
|
||||||
|
Breaking Changes:
|
||||||
|
|
||||||
|
- Style: Renamed ImGuiCol_ModalWindowDarkening to ImGuiCol_ModalWindowDimBg for consistency with other features. Kept redirection enum (will obsolete).
|
||||||
|
- Changed ImGui::GetTime() return value from float to double to avoid accumulating floating point imprecision over time.
|
||||||
|
- Removed per-window ImGuiWindowFlags_ResizeFromAnySide Beta flag in favor `io.ConfigResizeWindowsFromEdges=true` to enable the feature globally. (#1495)
|
||||||
|
The feature is not currently enabled by default because it is not satisfying enough, but will eventually be.
|
||||||
|
- InputText: Renamed ImGuiTextEditCallback to ImGuiInputTextCallback, ImGuiTextEditCallbackData to ImGuiInputTextCallbackData for consistency.
|
||||||
|
Kept redirection types (will obsolete).
|
||||||
|
- InputText: Removed ImGuiTextEditCallbackData::ReadOnly since it is a duplication of (ImGuiTextEditCallbackData::Flags & ImGuiInputTextFlags_ReadOnly).
|
||||||
|
- Renamed IsItemDeactivatedAfterChange() to IsItemDeactivatedAfterEdit() for consistency with new IsItemEdited() API.
|
||||||
|
Kept redirection function (will obsolete soonish as IsItemDeactivatedAfterChange() is very recent).
|
||||||
|
- Renamed io.OptCursorBlink to io.ConfigCursorBlink [-> io.ConfigInputTextCursorBlink in 1.65], io.OptMacOSXBehaviors to io.ConfigMacOSXBehaviors for consistency. (#1427, #473)
|
||||||
|
- Removed obsolete redirection functions: CollapsingHeader() variation with 2 bools - marked obsolete in v1.49, May 2016.
|
||||||
|
|
||||||
|
Other Changes:
|
||||||
|
|
||||||
|
- ArrowButton: Fixed to honor PushButtonRepeat() setting (and internals' ImGuiItemFlags_ButtonRepeat).
|
||||||
|
- ArrowButton: Setup current line text baseline so that ArrowButton() + SameLine() + Text() are aligned properly.
|
||||||
|
- Nav: Added a CTRL+TAB window list and changed the highlight system accordingly. The change is motivated by upcoming Docking features. (#787)
|
||||||
|
- Nav: Made CTRL+TAB skip menus + skip the current navigation window if is has the ImGuiWindow_NoNavFocus set. (#787)
|
||||||
|
While it was previously possible, you won't be able to CTRL-TAB out and immediately back in a window with the ImGuiWindow_NoNavFocus flag.
|
||||||
|
- Window: Allow menu and popups windows from ignoring the style.WindowMinSize values so short menus/popups are not padded. (#1909)
|
||||||
|
- Window: Added global io.ConfigResizeWindowsFromEdges option to enable resizing windows from their edges and from the lower-left corner. (#1495)
|
||||||
|
- Window: Collapse button shows hovering highlight + clicking and dragging on it allows to drag the window as well.
|
||||||
|
- Added IsItemEdited() to query if the last item modified its value (or was pressed). This is equivalent to the bool returned by most widgets.
|
||||||
|
It is useful in some situation e.g. using InputText() with ImGuiInputTextFlags_EnterReturnsTrue. (#2034)
|
||||||
|
- InputText: Added support for buffer size/capacity changes via the ImGuiInputTextFlags_CallbackResize flag. (#2006, #1443, #1008).
|
||||||
|
- InputText: Fixed not tracking the cursor horizontally when modifying the text buffer through a callback.
|
||||||
|
- InputText: Fixed minor off-by-one issue when submitting a buffer size smaller than the initial zero-terminated buffer contents.
|
||||||
|
- InputText: Fixed a few pathological crash cases on single-line InputText widget with multiple millions characters worth of contents.
|
||||||
|
Because the current text drawing function reserve for a worst-case amount of vertices and how we handle horizontal clipping,
|
||||||
|
we currently just avoid displaying those single-line widgets when they are over a threshold of 2 millions characters,
|
||||||
|
until a better solution is found.
|
||||||
|
- Drag and Drop: Fixed an incorrect assert when dropping a source that is submitted after the target (bug introduced with 1.62 changes
|
||||||
|
related to the addition of IsItemDeactivated()). (#1875, #143)
|
||||||
|
- Drag and Drop: Fixed ImGuiDragDropFlags_SourceNoDisableHover to affect hovering state prior to calling IsItemHovered() + fixed description. (#143)
|
||||||
|
- Drag and Drop: Calling BeginTooltip() between a BeginDragSource()/EndDragSource() or BeginDropTarget()/EndDropTarget() uses adjusted tooltip
|
||||||
|
settings matching the one created when calling BeginDragSource() without the ImGuiDragDropFlags_SourceNoPreviewTooltip flag. (#143)
|
||||||
|
- Drag and Drop: Payload stays available and under the mouse if the source stops being submitted, however the tooltip is replaced by "...". (#1725)
|
||||||
|
- Drag and Drop: Added ImGuiDragDropFlags_SourceAutoExpirePayload flag to force payload to expire if the source stops being submitted. (#1725, #143).
|
||||||
|
- IsItemHovered(): Added ImGuiHoveredFlags_AllowWhenDisabled flag to query hovered status on disabled items. (#1940, #211)
|
||||||
|
- Selectable: Added ImGuiSelectableFlags_Disabled flag in the public API. (#211)
|
||||||
|
- ColorEdit4: Fixed a bug when text input or drag and drop leading to unsaturated HSV values would erroneously alter the resulting color. (#2050)
|
||||||
|
- Misc: Added optional misc/stl/imgui_stl.h wrapper to use with STL types (e.g. InputText with std::string). (#2006, #1443, #1008)
|
||||||
|
- Misc: Added IMGUI_VERSION_NUM for easy compile-time testing. (#2025)
|
||||||
|
- Misc: Added ImGuiMouseCursor_Hand cursor enum + corresponding software cursor. (#1913, 1914) [@aiekick, @ocornut]
|
||||||
|
- Misc: Tweaked software mouse cursor offset to match the offset of the corresponding Windows 10 cursors.
|
||||||
|
- Made assertion more clear when trying to call Begin() outside of the NewFrame()..EndFrame() scope. (#1987)
|
||||||
|
- Fixed assertion when transitioning from an active ID to another within a group, affecting ColorPicker (broken in 1.62). (#2023, #820, #956, #1875).
|
||||||
|
- Fixed PushID() from keeping alive the new ID Stack top value (if a previously active widget shared the ID it would be erroneously kept alive).
|
||||||
|
- Fixed horizontal mouse wheel not forwarding the request to the parent window if ImGuiWindowFlags_NoScrollWithMouse is set. (#1463, #1380, #1502)
|
||||||
|
- Fixed a include build issue for Cygwin in non-POSIX (Win32) mode. (#1917, #1319, #276)
|
||||||
|
- ImDrawList: Improved handling for worst-case vertices reservation policy when large amount of text (e.g. 1+ million character strings)
|
||||||
|
are being submitted in a single call. It would typically have crashed InputTextMultiline(). (#200)
|
||||||
|
- OS/Windows: Fixed missing ImmReleaseContext() call in the default Win32 IME handler. (#1932) [@vby]
|
||||||
|
- Metrics: Changed io.MetricsActiveWindows to reflect the number of active windows (!= from visible windows), which is useful
|
||||||
|
for lazy/idle render mechanisms as new windows are typically not visible for one frame.
|
||||||
|
- Metrics: Added io.MetricsRenderWindow to reflect the number of visible windows.
|
||||||
|
- Metrics: Added io.MetricsActiveAllocations, moving away from the cross-context global counters than we previously used. (#1565, #1599, #586)
|
||||||
|
- Demo: Added basic Drag and Drop demo. (#143)
|
||||||
|
- Demo: Modified the Console example to use InsertChars() in the input text callback instead of poking directly into the buffer.
|
||||||
|
Although this won't make a difference in the example itself, using InsertChars() will honor the resizing callback properly. (#2006, #1443, #1008).
|
||||||
|
- Demo: Clarified the use of IsItemHovered()/IsItemActive() right after being in the "Active, Focused, Hovered & Focused Tests" section.
|
||||||
|
- Examples: Tweaked the main.cpp of each example.
|
||||||
|
- Examples: Metal: Added Metal rendering backend. (#1929, #1873) [@warrenm]
|
||||||
|
- Examples: OSX: Added early raw OSX platform backend. (#1873) [@pagghiu, @itamago, @ocornut]
|
||||||
|
- Examples: Added mac OSX & iOS + Metal example in example_apple_metal/. (#1929, #1873) [@warrenm]
|
||||||
|
- Examples: Added mac OSX + OpenGL2 example in example_apple_opengl2/. (#1873)
|
||||||
|
- Examples: OpenGL3: Added shaders more versions of GLSL. (#1938, #1941, #1900, #1513, #1466, etc.)
|
||||||
|
- Examples: OpenGL3: Tweaked the imgui_impl_opengl3.cpp to work as-is with Emscripten + WebGL 2.0. (#1941). [@o-micron]
|
||||||
|
- Examples: OpenGL3: Made the example app default to GL 3.0 + GLSL 130 (instead of GL 3.2 + GLSL 150) unless on Mac.
|
||||||
|
- Examples: OpenGL3: Added error output when shaders fail to compile/link.
|
||||||
|
- Examples: OpenGL3: Added support for glew and glad OpenGL loaders out of the box. (#2001, #2002) [@jdumas]
|
||||||
|
- Examples: OpenGL2: Disabling/restoring GL_LIGHTING and GL_COLOR_MATERIAL to increase compatibility with legacy OpenGL applications. (#1996)
|
||||||
|
- Examples: DirectX10, DirectX11: Fixed unreleased resources in Init and Shutdown functions. (#1944)
|
||||||
|
- Examples: DirectX11: Querying for IDXGIFactory instead of IDXGIFactory1 to increase compatibility. (#1989) [@matt77hias]
|
||||||
|
- Examples: Vulkan: Fixed handling of VkSurfaceCapabilitiesKHR::maxImageCount = 0 case. Tweaked present mode selections.
|
||||||
|
- Examples: Win32, Glfw, SDL: Added support for the ImGuiMouseCursor_Hand cursor.
|
||||||
|
|
||||||
|
|
||||||
|
-----------------------------------------------------------------------
|
||||||
|
VERSION 1.62 (Released 2018-06-22)
|
||||||
|
-----------------------------------------------------------------------
|
||||||
|
|
||||||
|
Breaking Changes:
|
||||||
|
|
||||||
|
- TreeNodeEx(): The helper ImGuiTreeNodeFlags_CollapsingHeader flag now include ImGuiTreeNodeFlags_NoTreePushOnOpen. The flag was already set by CollapsingHeader().
|
||||||
|
The only difference is if you were using TreeNodeEx() manually with ImGuiTreeNodeFlags_CollapsingHeader and without ImGuiTreeNodeFlags_NoTreePushOnOpen.
|
||||||
|
In this case you can remove the ImGuiTreeNodeFlags_NoTreePushOnOpen flag from your call (ImGuiTreeNodeFlags_CollapsingHeader & ~ImGuiTreeNodeFlags_NoTreePushOnOpen). (#1864)
|
||||||
|
This also apply if you were using internal's TreeNodeBehavior() with the ImGuiTreeNodeFlags_CollapsingHeader flag directly.
|
||||||
|
- ImFontAtlas: Renamed GetGlyphRangesChinese() to GetGlyphRangesChineseFull() to distinguish new smaller variants and discourage using the full set. (#1859)
|
||||||
|
|
||||||
|
Other Changes:
|
||||||
|
|
||||||
|
- Examples back-ends have been refactored to separate the platform code (e.g. Win32, Glfw, SDL2) from the renderer code (e.g. DirectX11, OpenGL3, Vulkan).
|
||||||
|
The "Platform" bindings are in charge of: mouse/keyboard/gamepad inputs, cursor shape, timing, etc.
|
||||||
|
The "Renderer" bindings are in charge of: creating the main font texture, rendering imgui draw data.
|
||||||
|
before: imgui_impl_dx11.cpp --> after: imgui_impl_win32.cpp + imgui_impl_dx11.cpp
|
||||||
|
before: imgui_impl_dx12.cpp --> after: imgui_impl_win32.cpp + imgui_impl_dx12.cpp
|
||||||
|
before: imgui_impl_glfw_gl3.cpp --> after: imgui_impl_glfw.cpp + imgui_impl_opengl2.cpp
|
||||||
|
before: imgui_impl_glfw_vulkan.cpp --> after: imgui_impl_glfw.cpp + imgui_impl_vulkan.cpp
|
||||||
|
before: imgui_impl_sdl_gl3.cpp --> after: imgui_impl_sdl2.cpp + imgui_impl_opengl2.cpp
|
||||||
|
before: imgui_impl_sdl_gl3.cpp --> after: imgui_impl_sdl2.cpp + imgui_impl_opengl3.cpp etc.
|
||||||
|
- The idea is what we can now easily combine and maintain back-ends and reduce code redundancy. Individual files are smaller and more reusable.
|
||||||
|
Integration of imgui into a new/custom engine may also be easier as there is less overlap between "windowing / inputs" and "rendering" code,
|
||||||
|
so you may study or grab one half of the code and not the other.
|
||||||
|
- This change was motivated by the fact that adding support for the upcoming multi-viewport feature requires more work from the Platform and Renderer
|
||||||
|
back-ends, and the amount of redundancy across files was becoming too difficult to maintain. If you use default back-ends, you'll benefit from an
|
||||||
|
easy update path to support multi-viewports later (for future ImGui 1.7x).
|
||||||
|
- This is not strictly a breaking change if you keep your old bindings, but when you'll want to fully update your bindings,
|
||||||
|
expect to have to reshuffle a few things.
|
||||||
|
- Each example still has its own main.cpp which you may refer you to understand how to initialize and glue everything together.
|
||||||
|
- Some frameworks (such as the Allegro, Marmalade) handle both the "platform" and "rendering" part, and your custom engine may as well.
|
||||||
|
- Read examples/README.txt for details.
|
||||||
|
- Added IsItemDeactivated() to query if the last item was active previously and isn't anymore. Useful for Undo/Redo patterns. (#820, #956, #1875)
|
||||||
|
- Added IsItemDeactivatedAfterChange() [*EDIT* renamed to IsItemDeactivatedAfterEdit() in 1.63) if the last item was active previously,
|
||||||
|
is not anymore, and during its active state modified a value. Note that you may still get false positive (e.g. drag value and while
|
||||||
|
holding return on the same value). (#820, #956, #1875)
|
||||||
|
- Nav: Added support for PageUp/PageDown (explorer-style: first aim at bottom/top most item, when scroll a page worth of contents). (#787)
|
||||||
|
- Nav: To keep the navigated item in view we also attempt to scroll the parent window as well as the current window. (#787)
|
||||||
|
- ColorEdit3, ColorEdit4, ColorButton: Added ImGuiColorEditFlags_NoDragDrop flag to disable ColorEditX as drag target and ColorButton as drag source. (#1826)
|
||||||
|
- BeginDragDropSource(): Offset tooltip position so it is off the mouse cursor, but also closer to it than regular tooltips, and not clamped by viewport. (#1739)
|
||||||
|
- BeginDragDropTarget(): Added ImGuiDragDropFlags_AcceptNoPreviewTooltip flag to request hiding the drag source tooltip from the target site. (#143)
|
||||||
|
- BeginCombo(), BeginMainMenuBar(), BeginChildFrame(): Temporary style modification are restored at the end of BeginXXX instead of EndXXX, to not affect tooltips and child windows.
|
||||||
|
- Popup: Improved handling of (erroneously) repeating calls to OpenPopup() to not close the popup's child popups. (#1497, #1533, #1865).
|
||||||
|
- InputTextMultiline(): Fixed double navigation highlight when scrollbar is active. (#787)
|
||||||
|
- InputText(): Fixed Undo corruption after pasting large amount of text (Redo will still fail when undo buffers are exhausted, but text won't be corrupted).
|
||||||
|
- SliderFloat(): When using keyboard/gamepad and a zero precision format string (e.g. "%.0f"), always step in integer units. (#1866)
|
||||||
|
- ImFontConfig: Added GlyphMinAdvanceX/GlyphMaxAdvanceX settings useful to make a font appears monospaced, particularly useful for icon fonts. (#1869)
|
||||||
|
- ImFontAtlas: Added GetGlyphRangesChineseSimplifiedCommon() helper that returns a list of ~2500 most common Simplified Chinese characters. (#1859) [@JX-Master, @ocornut]
|
||||||
|
- Examples: OSX: Added imgui_impl_osx.mm binding to be used along with e.g. imgui_impl_opengl2.cpp. (#281, #1870) [@pagghiu, @itamago, @ocornut]
|
||||||
|
- Examples: GLFW: Made it possible to Shutdown/Init the backend again (by reseting the time storage properly). (#1827) [@ice1000]
|
||||||
|
- Examples: Win32: Fixed handling of mouse wheel messages to support sub-unit scrolling messages (typically sent by track-pads). (#1874) [@zx64]
|
||||||
|
- Examples: SDL+Vulkan: Added SDL+Vulkan example.
|
||||||
|
- Examples: Allegro5: Added support for ImGuiConfigFlags_NoMouseCursorChange flag. Added clipboard support.
|
||||||
|
- Examples: Allegro5: Unindexing buffers ourselves as Allegro indexed drawing primitives are buggy in the DirectX9 back-end (will be fixed in Allegro 5.2.5+).
|
||||||
|
- Examples: DirectX12: Moved the ID3D12GraphicsCommandList* parameter from ImGui_ImplDX12_NewFrame() to ImGui_ImplDX12_RenderDrawData() which makes a lots more sense. (#301)
|
||||||
|
- Examples: Vulkan: Reordered parameters ImGui_ImplVulkan_RenderDrawData() to be consistent with other bindings, a good occasion since we refactored the code.
|
||||||
|
- Examples: FreeGLUT: Added FreeGLUT bindings. Added FreeGLUT+OpenGL2 example. (#801)
|
||||||
|
- Examples: The functions in imgui_impl_xxx.cpp are prefixed with IMGUI_IMPL_API (which defaults to IMGUI_API) to facilitate some uses. (#1888)
|
||||||
|
- Examples: Fixed bindings to use ImGuiMouseCursor_COUNT instead of old name ImGuiMouseCursor_Count_ so they can compile with IMGUI_DISABLE_OBSOLETE_FUNCTIONS. (#1887)
|
||||||
|
- Misc: Updated stb_textedit from 1.09 + patches to 1.12 + minor patches.
|
||||||
|
- Internals: PushItemFlag() flags are inherited by BeginChild().
|
||||||
|
|
||||||
|
|
||||||
|
-----------------------------------------------------------------------
|
||||||
|
VERSION 1.61 (Released 2018-05-14)
|
||||||
|
-----------------------------------------------------------------------
|
||||||
|
|
||||||
|
Breaking Changes:
|
||||||
|
|
||||||
|
- DragInt(): The default compile-time format string has been changed from "%.0f" to "%d", as we are not using integers internally any more.
|
||||||
|
If you used DragInt() with custom format strings, make sure you change them to use %d or an integer-compatible format.
|
||||||
|
To honor backward-compatibility, the DragInt() code will currently parse and modify format strings to replace %*f with %d, giving time to users to upgrade their code.
|
||||||
|
If you have IMGUI_DISABLE_OBSOLETE_FUNCTIONS enabled, the code will instead assert! You may run a reg-exp search on your codebase for e.g. "DragInt.*%f" to you find them.
|
||||||
|
- InputFloat(): Obsoleted InputFloat() functions taking an optional "int decimal_precision" in favor of an equivalent and more flexible "const char* format",
|
||||||
|
consistent with other functions. Kept redirection functions (will obsolete).
|
||||||
|
- Misc: IM_DELETE() helper function added in 1.60 doesn't set the input pointer to NULL, more consistent with standard expectation and allows passing r-values.
|
||||||
|
|
||||||
|
Other Changes:
|
||||||
|
|
||||||
|
- Added DragScalar, DragScalarN: supports signed/unsigned, 32/64 bits, float/double data types. (#643, #320, #708, #1011)
|
||||||
|
- Added InputScalar, InputScalarN: supports signed/unsigned, 32/64 bits, float/double data types. (#643, #320, #708, #1011)
|
||||||
|
- Added SliderScalar, SliderScalarN: supports signed/unsigned, 32/64 bits, float/double data types. (#643, #320, #708, #1011)
|
||||||
- Window: Fixed pop-ups/tooltips/menus not honoring style.DisplaySafeAreaPadding as well as it should have (part of menus displayed outside the safe area, etc.).
|
- Window: Fixed pop-ups/tooltips/menus not honoring style.DisplaySafeAreaPadding as well as it should have (part of menus displayed outside the safe area, etc.).
|
||||||
- Window: Fixed windows using the ImGuiWindowFlags_NoSavedSettings flag from not using the same default position as other windows. (#1760)
|
- Window: Fixed windows using the ImGuiWindowFlags_NoSavedSettings flag from not using the same default position as other windows. (#1760)
|
||||||
- Window: Relaxed the internal stack size checker to allow Push/Begin/Pop/.../End patterns to be used with PushStyleColor, PushStyleVar, PushFont without causing a false positive assert. (#1767)
|
- Window: Relaxed the internal stack size checker to allow Push/Begin/Pop/.../End patterns to be used with PushStyleColor, PushStyleVar, PushFont without causing a false positive assert. (#1767)
|
||||||
|
- Window: Fixed the default proportional item width lagging by one frame on resize.
|
||||||
- Columns: Fixed a bug introduced in 1.51 where columns would affect the contents size of their container, often creating feedback loops when ImGuiWindowFlags_AlwaysAutoResize was used. (#1760)
|
- Columns: Fixed a bug introduced in 1.51 where columns would affect the contents size of their container, often creating feedback loops when ImGuiWindowFlags_AlwaysAutoResize was used. (#1760)
|
||||||
- Settings: Fixed saving an empty .ini file if CreateContext/DestroyContext are called without a single call to NewFrame(). (#1741)
|
- Settings: Fixed saving an empty .ini file if CreateContext/DestroyContext are called without a single call to NewFrame(). (#1741)
|
||||||
- Settings: Added LoadIniSettingsFromDisk(), LoadIniSettingsFromMemory(), SaveIniSettingsToDisk(), SaveIniSettingsToMemory() to manually load/save .ini settings. (#923, #993)
|
- Settings: Added LoadIniSettingsFromDisk(), LoadIniSettingsFromMemory(), SaveIniSettingsToDisk(), SaveIniSettingsToMemory() to manually load/save .ini settings. (#923, #993)
|
||||||
- Settings: Added io.WantSaveIniSettings flag, which is set to notify the application that e.g. SaveIniSettingsToMemory() should be called. (#923, #993)
|
- Settings: Added io.WantSaveIniSettings flag, which is set to notify the application that e.g. SaveIniSettingsToMemory() should be called. (#923, #993)
|
||||||
|
- Scrolling: Fixed a case where using SetScrollHere(1.0f) at the bottom of a window on the same frame the window height has been growing would have the scroll clamped using the previous height. (#1804)
|
||||||
- MenuBar: Made BeginMainMenuBar() honor style.DisplaySafeAreaPadding so the text can be made visible on TV settings that don't display all pixels. (#1439) [@dougbinks]
|
- MenuBar: Made BeginMainMenuBar() honor style.DisplaySafeAreaPadding so the text can be made visible on TV settings that don't display all pixels. (#1439) [@dougbinks]
|
||||||
- InputText: On Mac OS X, filter out characters when the CMD modifier is held. (#1747) [@sivu]
|
- InputText: On Mac OS X, filter out characters when the CMD modifier is held. (#1747) [@sivu]
|
||||||
- InputText: On Mac OS X, support CMD+SHIFT+Z for Redo. CMD+Y is also supported as major apps seems to default to support both. (#1765) [@lfnoise]
|
- InputText: On Mac OS X, support CMD+SHIFT+Z for Redo. CMD+Y is also supported as major apps seems to default to support both. (#1765) [@lfnoise]
|
||||||
- InputText: Fixed returning true when edition is canceled with ESC and the current buffer matches the initial value.
|
- InputText: Fixed returning true when edition is cancelled with ESC and the current buffer matches the initial value.
|
||||||
- InputFloat,InputFloat2,InputFloat3,InputFloat4: Added variations taking a more flexible and consistent optional "const char* format" parameter instead of "int decimal_precision".
|
- InputFloat,InputFloat2,InputFloat3,InputFloat4: Added variations taking a more flexible and consistent optional "const char* format" parameter instead of "int decimal_precision".
|
||||||
This allow using custom formats to display values in scientific notation, and is generally more consistent with other API. Obsoleted functions using the optional "int decimal_precision" parameter. (#648)
|
This allow using custom formats to display values in scientific notation, and is generally more consistent with other API. Obsoleted functions using the optional "int decimal_precision" parameter. (#648)
|
||||||
- DragFloat, DragInt: Cancel mouse tweak when current value is initially past the min/max boundaries and mouse is pushing in the same direction (keyboard/gamepad version already did this).
|
- DragFloat, DragInt: Cancel mouse tweak when current value is initially past the min/max boundaries and mouse is pushing in the same direction (keyboard/gamepad version already did this).
|
||||||
|
- DragFloat, DragInt: Honor natural type limits (e.g. INT_MAX, FLT_MAX) instead of wrapping around. (#708, #320)
|
||||||
- DragFloat, SliderFloat: Fixes to allow input of scientific notation numbers when using CTRL+Click to input the value. (~#648, #1011)
|
- DragFloat, SliderFloat: Fixes to allow input of scientific notation numbers when using CTRL+Click to input the value. (~#648, #1011)
|
||||||
- DragFloat, SliderFloat: Rounding-on-write uses the provided format string instead of parsing the precision from the string, which allows for finer uses of %e %g etc. (#648, #642)
|
- DragFloat, SliderFloat: Rounding-on-write uses the provided format string instead of parsing the precision from the string, which allows for finer uses of %e %g etc. (#648, #642)
|
||||||
|
- DragFloat: Improved computation when using the power curve. Improved lost of input precision with very small steps. Added an assert than power-curve requires a min/max range. (~#642)
|
||||||
|
- DragFloat: The 'power' parameter is only honored if the min/max parameter are also setup.
|
||||||
|
- DragInt, SliderInt: Fixed handling of large integers (we previously passed data around internally as float, which reduced the range of valid integers).
|
||||||
|
- ColorEdit: Fixed not being able to pass the ImGuiColorEditFlags_NoAlpha or ImGuiColorEditFlags_HDR flags to SetColorEditOptions().
|
||||||
- Nav: Fixed hovering a Selectable() with the mouse so that it update the navigation cursor (as it happened in the pre-1.60 navigation branch). (#787)
|
- Nav: Fixed hovering a Selectable() with the mouse so that it update the navigation cursor (as it happened in the pre-1.60 navigation branch). (#787)
|
||||||
- Style: Changed default style.DisplaySafeAreaPadding values from (4,4) to (3,3) so it is smaller than FramePadding and has no effect on main menu bar on a computer. (#1439)
|
- Style: Changed default style.DisplaySafeAreaPadding values from (4,4) to (3,3) so it is smaller than FramePadding and has no effect on main menu bar on a computer. (#1439)
|
||||||
- Fonts: When building font atlas, glyphs that are missing in the fonts are not using the glyph slot to render a dummy/default glyph. Saves space and allow merging fonts with
|
- Fonts: When building font atlas, glyphs that are missing in the fonts are not using the glyph slot to render a dummy/default glyph. Saves space and allow merging fonts with
|
||||||
overlapping font ranges such as FontAwesome5 which split out the Brands separately from the Solid fonts. (#1703, #1671)
|
overlapping font ranges such as FontAwesome5 which split out the Brands separately from the Solid fonts. (#1703, #1671)
|
||||||
- Misc: Added IMGUI_CHECKVERSION() macro to compare version string and data structure sizes in order to catch issues with mismatching compilation unit settings. (#1695, #1769)
|
- Misc: Added IMGUI_CHECKVERSION() macro to compare version string and data structure sizes in order to catch issues with mismatching compilation unit settings. (#1695, #1769)
|
||||||
|
- Misc: Added IMGUI_DISABLE_MATH_FUNCTIONS in imconfig.h to make it easier to redefine wrappers for std/crt math functions.
|
||||||
- Misc: Fix to allow compiling in unity builds where stb_rectpack/stb_truetype may be already included in the same compilation unit.
|
- Misc: Fix to allow compiling in unity builds where stb_rectpack/stb_truetype may be already included in the same compilation unit.
|
||||||
- Demo: Fixed Overlay: Added a context menu item to enable freely moving the window.
|
- Demo: Simple Overlay: Added a context menu item to enable freely moving the window.
|
||||||
|
- Demo: Added demo for DragScalar(), InputScalar(), SliderScalar(). (#643)
|
||||||
- Examples: Calling IMGUI_CHECKVERSION() in the main.cpp of every example application.
|
- Examples: Calling IMGUI_CHECKVERSION() in the main.cpp of every example application.
|
||||||
- Examples: Allegro 5: Added support for 32-bit indices setup via defining ImDrawIdx, to avoid an unnecessary conversion (Allegro 5 doesn't support 16-bit indices).
|
- Examples: Allegro 5: Added support for 32-bit indices setup via defining ImDrawIdx, to avoid an unnecessary conversion (Allegro 5 doesn't support 16-bit indices).
|
||||||
- Examples: Allegro 5: Renamed bindings from imgui_impl_a5.cpp to imgui_impl_allegro5.cpp.
|
- Examples: Allegro 5: Renamed bindings from imgui_impl_a5.cpp to imgui_impl_allegro5.cpp.
|
||||||
- Examples: DirectX 9 : Saving/restoring Transform because they don't seem to be included in the StateBlock. Setting shading mode to Gouraud. (#1790, #1687) [@sr-tream]
|
- Examples: DirectX 9: Saving/restoring Transform because they don't seem to be included in the StateBlock. Setting shading mode to Gouraud. (#1790, #1687) [@sr-tream]
|
||||||
|
- Examples: SDL: Fixed clipboard paste memory leak in the SDL binding code. (#1803) [@eliasdaler]
|
||||||
- Various minor fixes, tweaks, refactoring, comments.
|
- Various minor fixes, tweaks, refactoring, comments.
|
||||||
|
|
||||||
|
|
||||||
|
-----------------------------------------------------------------------
|
||||||
|
VERSION 1.60 (Released 2018-04-07)
|
||||||
-----------------------------------------------------------------------
|
-----------------------------------------------------------------------
|
||||||
|
|
||||||
VERSION 1.60 (Released 2018-04-07)
|
|
||||||
Decorated log: https://github.com/ocornut/imgui/releases/tag/v1.60
|
Decorated log: https://github.com/ocornut/imgui/releases/tag/v1.60
|
||||||
|
|
||||||
The gamepad/keyboard navigation branch (which has been in the work since July 2016) has been merged.
|
The gamepad/keyboard navigation branch (which has been in the work since July 2016) has been merged.
|
||||||
@ -88,46 +295,46 @@ Various internal refactoring have also been done, as part of the navigation work
|
|||||||
|
|
||||||
Breaking Changes:
|
Breaking Changes:
|
||||||
|
|
||||||
- Obsoleted the io.RenderDrawListsFn callback, you can call your graphics engine render function after ImGui::Render().
|
- Obsoleted the io.RenderDrawListsFn callback, you can call your graphics engine render function after ImGui::Render().
|
||||||
e.g. with example backends, call ImDrawData* draw_data = ImGui::GetDrawData(); ImGui_ImplXXXX_RenderDrawData(draw_data).
|
e.g. with example backends, call ImDrawData* draw_data = ImGui::GetDrawData(); ImGui_ImplXXXX_RenderDrawData(draw_data).
|
||||||
- Reorganized context handling to be more explicit: (#1599)
|
- Reorganized context handling to be more explicit: (#1599)
|
||||||
- YOU NOW NEED TO CALL ImGui::CreateContext() AT THE BEGINNING OF YOUR APP, AND CALL ImGui::DestroyContext() AT THE END.
|
- YOU NOW NEED TO CALL ImGui::CreateContext() AT THE BEGINNING OF YOUR APP, AND CALL ImGui::DestroyContext() AT THE END.
|
||||||
- removed Shutdown() function, as DestroyContext() serve this purpose. If you are using an old backend from the examples/ folder, remove the line that calls Shutdown().
|
- removed Shutdown() function, as DestroyContext() serve this purpose. If you are using an old backend from the examples/ folder, remove the line that calls Shutdown().
|
||||||
- you may pass a ImFontAtlas* pointer to CreateContext() to share a font atlas between contexts. Otherwise CreateContext() will create its own font atlas instance.
|
- you may pass a ImFontAtlas* pointer to CreateContext() to share a font atlas between contexts. Otherwise CreateContext() will create its own font atlas instance.
|
||||||
- removed allocator parameters from CreateContext(), they are now setup with SetAllocatorFunctions(), and shared by all contexts.
|
- removed allocator parameters from CreateContext(), they are now setup with SetAllocatorFunctions(), and shared by all contexts.
|
||||||
- removed the default global context and font atlas instance, which were confusing for users of DLL reloading and users of multiple contexts.
|
- removed the default global context and font atlas instance, which were confusing for users of DLL reloading and users of multiple contexts.
|
||||||
- Renamed ImGuiStyleVar_Count_ to ImGuiStyleVar_COUNT and ImGuiMouseCursor_Count_ to ImGuiMouseCursor_COUNT for consistency with other public enums.
|
- Renamed ImGuiStyleVar_Count_ to ImGuiStyleVar_COUNT and ImGuiMouseCursor_Count_ to ImGuiMouseCursor_COUNT for consistency with other public enums.
|
||||||
- Fonts: Moved sample TTF files from extra_fonts/ to misc/fonts/. If you loaded files directly from the imgui repo you may need to update your paths.
|
- Fonts: Moved sample TTF files from extra_fonts/ to misc/fonts/. If you loaded files directly from the imgui repo you may need to update your paths.
|
||||||
- Fonts: changed ImFont::DisplayOffset.y to defaults to 0 instead of +1. Fixed vertical rounding of Ascent/Descent to match TrueType renderer.
|
- Fonts: changed ImFont::DisplayOffset.y to defaults to 0 instead of +1. Fixed vertical rounding of Ascent/Descent to match TrueType renderer.
|
||||||
If you were adding or subtracting (not assigning) to ImFont::DisplayOffset check if your fonts are correctly aligned vertically. (#1619)
|
If you were adding or subtracting (not assigning) to ImFont::DisplayOffset check if your fonts are correctly aligned vertically. (#1619)
|
||||||
- BeginDragDropSource(): temporarily removed the optional mouse_button=0 parameter because it is not really usable in many situations at the moment.
|
- BeginDragDropSource(): temporarily removed the optional mouse_button=0 parameter because it is not really usable in many situations at the moment.
|
||||||
- Obsoleted IsAnyWindowHovered() in favor of IsWindowHovered(ImGuiHoveredFlags_AnyWindow). Kept redirection function (will obsolete).
|
- Obsoleted IsAnyWindowHovered() in favor of IsWindowHovered(ImGuiHoveredFlags_AnyWindow). Kept redirection function (will obsolete).
|
||||||
- Obsoleted IsAnyWindowFocused() in favor of IsWindowFocused(ImGuiFocusedFlags_AnyWindow). Kept redirection function (will obsolete).
|
- Obsoleted IsAnyWindowFocused() in favor of IsWindowFocused(ImGuiFocusedFlags_AnyWindow). Kept redirection function (will obsolete).
|
||||||
- Renamed io.WantMoveMouse to io.WantSetMousePos for consistency and ease of understanding (was added in 1.52, not used by core, and honored by some binding ahead of merging the Nav branch).
|
- Renamed io.WantMoveMouse to io.WantSetMousePos for consistency and ease of understanding (was added in 1.52, not used by core, and honored by some binding ahead of merging the Nav branch).
|
||||||
- Removed ImGuiCol_CloseButton, ImGuiCol_CloseButtonActive, ImGuiCol_CloseButtonHovered style colors as the closing cross uses regular button colors now.
|
- Removed ImGuiCol_CloseButton, ImGuiCol_CloseButtonActive, ImGuiCol_CloseButtonHovered style colors as the closing cross uses regular button colors now.
|
||||||
- Renamed ImGuiSizeConstraintCallback to ImGuiSizeCallback, ImGuiSizeConstraintCallbackData to ImGuiSizeCallbackData.
|
- Renamed ImGuiSizeConstraintCallback to ImGuiSizeCallback, ImGuiSizeConstraintCallbackData to ImGuiSizeCallbackData.
|
||||||
- Removed CalcItemRectClosestPoint() which was weird and not really used by anyone except demo code. If you need it it's easy to replicate on your side.
|
- Removed CalcItemRectClosestPoint() which was weird and not really used by anyone except demo code. If you need it should be easy to replicate on your side (you can find the code in 1.53).
|
||||||
|
|
||||||
Other Changes:
|
Other Changes:
|
||||||
|
|
||||||
- Doc: Added a Changelog file in the repository to ease comparing versions (it goes back to dear imgui 1.48), until now it was only on GitHub.
|
- Doc: Added a Changelog file in the repository to ease comparing versions (it goes back to dear imgui 1.48), until now it was only on GitHub.
|
||||||
- Navigation: merged in the gamepad/keyboard navigation (about a million changes!). (#787, #323)
|
- Navigation: merged in the gamepad/keyboard navigation (about a million changes!). (#787, #323)
|
||||||
The initial focus was to support game controllers, but keyboard is becoming increasingly and decently usable.
|
The initial focus was to support game controllers, but keyboard is becoming increasingly and decently usable.
|
||||||
- To use Gamepad Navigation:
|
- To use Gamepad Navigation:
|
||||||
- Set io.ConfigFlags |= ImGuiConfigFlags_NavEnableGamepad to enable.
|
- Set io.ConfigFlags |= ImGuiConfigFlags_NavEnableGamepad to enable.
|
||||||
- Backend: Set io.BackendFlags |= ImGuiBackendFlags_HasGamepad + fill the io.NavInputs[] fields before calling NewFrame(). Read imgui.cpp for more details.
|
- Backend: Set io.BackendFlags |= ImGuiBackendFlags_HasGamepad + fill the io.NavInputs[] fields before calling NewFrame(). Read imgui.cpp for more details.
|
||||||
- See https://github.com/ocornut/imgui/issues/1599 for recommended gamepad mapping or download PNG/PSD at http://goo.gl/9LgVZW
|
- See https://github.com/ocornut/imgui/issues/1599 for recommended gamepad mapping or download PNG/PSD at http://goo.gl/9LgVZW
|
||||||
- See 'enum ImGuiNavInput_' in imgui.h for a description of inputs. Read imgui.cpp for more details.
|
- See 'enum ImGuiNavInput_' in imgui.h for a description of inputs. Read imgui.cpp for more details.
|
||||||
- To use Keyboard Navigation:
|
- To use Keyboard Navigation:
|
||||||
- Set io.ConfigFlags |= ImGuiConfigFlags_NavEnableKeyboard to enable. NewFrame() will automatically fill io.NavInputs[] based on your io.KeysDown[] + io.KeyMap[] arrays.
|
- Set io.ConfigFlags |= ImGuiConfigFlags_NavEnableKeyboard to enable. NewFrame() will automatically fill io.NavInputs[] based on your io.KeysDown[] + io.KeyMap[] arrays.
|
||||||
- Basic controls: arrows to navigate, Alt to enter menus, Space to activate item, Enter to edit text, Escape to cancel/close, Ctrl-Tab to focus windows, etc.
|
- Basic controls: arrows to navigate, Alt to enter menus, Space to activate item, Enter to edit text, Escape to cancel/close, Ctrl-Tab to focus windows, etc.
|
||||||
- When keyboard navigation is active (io.NavActive + ImGuiConfigFlags_NavEnableKeyboard), the io.WantCaptureKeyboard flag will be set.
|
- When keyboard navigation is active (io.NavActive + ImGuiConfigFlags_NavEnableKeyboard), the io.WantCaptureKeyboard flag will be set.
|
||||||
For more advanced uses, you may want to read from io.NavActive or io.NavVisible. Read imgui.cpp for more details.
|
For more advanced uses, you may want to read from io.NavActive or io.NavVisible. Read imgui.cpp for more details.
|
||||||
- Navigation: SetItemDefaultFocus() sets the navigation position in addition to scrolling. (#787)
|
- Navigation: SetItemDefaultFocus() sets the navigation position in addition to scrolling. (#787)
|
||||||
- Navigation: Added IsItemFocused(), added IsAnyItemFocused(). (#787)
|
- Navigation: Added IsItemFocused(), added IsAnyItemFocused(). (#787)
|
||||||
- Navigation: Added window flags: ImGuiWindowFlags_NoNav (== ImGuiWindowFlags_NoNavInputs | ImGuiWindowFlags_NoNavFocus).
|
- Navigation: Added window flags: ImGuiWindowFlags_NoNav (== ImGuiWindowFlags_NoNavInputs | ImGuiWindowFlags_NoNavFocus).
|
||||||
- Navigation: Style: Added ImGuiCol_NavHighlight, ImGuiCol_NavWindowingHighlight colors. (#787)
|
- Navigation: Style: Added ImGuiCol_NavHighlight, ImGuiCol_NavWindowingHighlight colors. (#787)
|
||||||
- Navigation: TreeNode: Added ImGuiTreeNodeFlags_NavLeftJumpsBackHere flag to allow Nav Left direction to jump back to parent tree node from any of its child. (#1079)
|
- Navigation: TreeNode: Added ImGuiTreeNodeFlags_NavLeftJumpsBackHere flag to allow Nav Left direction to jump back to parent tree node from any of its child. (#1079)
|
||||||
- Navigation: IO: Added io.ConfigFlags (input), io.NavActive (output), io.NavVisible (output). (#787)
|
- Navigation: IO: Added io.ConfigFlags (input), io.NavActive (output), io.NavVisible (output). (#787)
|
||||||
- Context: Removed the default global context and font atlas instances, which caused various problems to users of multiple contexts and DLL users. (#1565, #1599)
|
- Context: Removed the default global context and font atlas instances, which caused various problems to users of multiple contexts and DLL users. (#1565, #1599)
|
||||||
YOU NOW NEED TO CALL ImGui::CreateContext() AT THE BEGINNING OF YOUR APP, AND CALL ImGui::DestroyContext() AT THE END. Existing apps will assert/crash without it.
|
YOU NOW NEED TO CALL ImGui::CreateContext() AT THE BEGINNING OF YOUR APP, AND CALL ImGui::DestroyContext() AT THE END. Existing apps will assert/crash without it.
|
||||||
@ -135,12 +342,12 @@ Other Changes:
|
|||||||
- Context: You may pass a ImFontAtlas to CreateContext() to specify a font atlas to share. Shared font atlas are not owned by the context and not destroyed along with it. (#1599)
|
- Context: You may pass a ImFontAtlas to CreateContext() to specify a font atlas to share. Shared font atlas are not owned by the context and not destroyed along with it. (#1599)
|
||||||
- Context: Added IMGUI_DISABLE_DEFAULT_ALLOCATORS to disable linking with malloc/free. (#1565, #586, #992, #1007, #1558)
|
- Context: Added IMGUI_DISABLE_DEFAULT_ALLOCATORS to disable linking with malloc/free. (#1565, #586, #992, #1007, #1558)
|
||||||
- IO: Added io.ConfigFlags for user application to store settings for imgui and for the backend:
|
- IO: Added io.ConfigFlags for user application to store settings for imgui and for the backend:
|
||||||
- ImGuiConfigFlags_NavEnableKeyboard: Enable keyboard navigation.
|
- ImGuiConfigFlags_NavEnableKeyboard: Enable keyboard navigation.
|
||||||
- ImGuiConfigFlags_NavEnableGamepad: Enable gamepad navigation (provided ImGuiBackendFlags_HasGamepad is also set by backend).
|
- ImGuiConfigFlags_NavEnableGamepad: Enable gamepad navigation (provided ImGuiBackendFlags_HasGamepad is also set by backend).
|
||||||
- ImGuiConfigFlags_NavEnableSetMousePos: Instruct navigation to move the mouse cursor. May be useful on TV/console systems where moving a virtual mouse is awkward.
|
- ImGuiConfigFlags_NavEnableSetMousePos: Instruct navigation to move the mouse cursor. May be useful on TV/console systems where moving a virtual mouse is awkward.
|
||||||
- ImGuiConfigFlags_NoMouseCursorChange: Instruct backend to not alter mouse cursor shape and visibility (by default the example backend use mouse cursor API of the platform when available)
|
- ImGuiConfigFlags_NoMouseCursorChange: Instruct backend to not alter mouse cursor shape and visibility (by default the example backend use mouse cursor API of the platform when available)
|
||||||
- ImGuiConfigFlags_NoMouse: Instruct imgui to clear mouse position/buttons in NewFrame(). This allows ignoring the mouse information passed by the backend.
|
- ImGuiConfigFlags_NoMouse: Instruct imgui to clear mouse position/buttons in NewFrame(). This allows ignoring the mouse information passed by the backend.
|
||||||
- ImGuiConfigFlags_IsSRGB, ImGuiConfigFlags_IsTouchScreen: Flags for general application use.
|
- ImGuiConfigFlags_IsSRGB, ImGuiConfigFlags_IsTouchScreen: Flags for general application use.
|
||||||
- IO: Added io.BackendFlags for backend to store its capabilities (currently: _HasGamepad, _HasMouseCursors, _HasSetMousePos). This will be used more in the next version.
|
- IO: Added io.BackendFlags for backend to store its capabilities (currently: _HasGamepad, _HasMouseCursors, _HasSetMousePos). This will be used more in the next version.
|
||||||
- IO: Added ImGuiKey_Insert, ImGuiKey_Space keys. Setup in all example bindings. (#1541)
|
- IO: Added ImGuiKey_Insert, ImGuiKey_Space keys. Setup in all example bindings. (#1541)
|
||||||
- IO: Added Horizontal Mouse Wheel support for horizontal scrolling. (#1463) [@tseeker]
|
- IO: Added Horizontal Mouse Wheel support for horizontal scrolling. (#1463) [@tseeker]
|
||||||
@ -153,7 +360,7 @@ Other Changes:
|
|||||||
- InputText: Added alternative clipboard shortcuts: Shift+Delete (cut), CTRL+Insert (copy), Shift+Insert (paste). (#1541)
|
- InputText: Added alternative clipboard shortcuts: Shift+Delete (cut), CTRL+Insert (copy), Shift+Insert (paste). (#1541)
|
||||||
- InputText: Fixed losing Cursor X position when clicking outside on an item that's submitted after the InputText(). It was only noticeable when restoring focus programmatically. (#1418, #1554)
|
- InputText: Fixed losing Cursor X position when clicking outside on an item that's submitted after the InputText(). It was only noticeable when restoring focus programmatically. (#1418, #1554)
|
||||||
- InputText: Added ImGuiInputTextFlags_CharsScientific flag to also allow 'e'/'E' for input of values using scientific notation. Automatically used by InputFloat.
|
- InputText: Added ImGuiInputTextFlags_CharsScientific flag to also allow 'e'/'E' for input of values using scientific notation. Automatically used by InputFloat.
|
||||||
- Style: Default style is now StyleColorsDark(), instead of the old StyleColorsClassic(). (#707)
|
- Style: Default style is now StyleColorsDark(), instead of the old StyleColorsClassic(). (#707)
|
||||||
- Style: Enable window border by default. (#707)
|
- Style: Enable window border by default. (#707)
|
||||||
- Style: Exposed ImGuiStyleVar_WindowTitleAlign, ImGuiStyleVar_ScrollbarSize, ImGuiStyleVar_ScrollbarRounding, ImGuiStyleVar_GrabRounding + added an assert to reduce accidental breakage. (#1181)
|
- Style: Exposed ImGuiStyleVar_WindowTitleAlign, ImGuiStyleVar_ScrollbarSize, ImGuiStyleVar_ScrollbarRounding, ImGuiStyleVar_GrabRounding + added an assert to reduce accidental breakage. (#1181)
|
||||||
- Style: Added style.MouseCursorScale help when using the software mouse cursor facility. (#939).
|
- Style: Added style.MouseCursorScale help when using the software mouse cursor facility. (#939).
|
||||||
@ -179,10 +386,10 @@ Other Changes:
|
|||||||
- InputDouble: Added InputDouble() function. We use a format string instead of a decimal_precision parameter to also for "%e" and variants. (#1011)
|
- InputDouble: Added InputDouble() function. We use a format string instead of a decimal_precision parameter to also for "%e" and variants. (#1011)
|
||||||
- Slider, Combo: Use ImGuiCol_FrameBgHovered color when hovered. (#1456) [@stfx]
|
- Slider, Combo: Use ImGuiCol_FrameBgHovered color when hovered. (#1456) [@stfx]
|
||||||
- Combo: BeginCombo(): Added ImGuiComboFlags_NoArrowButton to disable the arrow button and only display the wide value preview box.
|
- Combo: BeginCombo(): Added ImGuiComboFlags_NoArrowButton to disable the arrow button and only display the wide value preview box.
|
||||||
- Combo: BeginCombo(): Added ImGuiComboFlags_NoPreview to disable the preview and only display a square arrow button.
|
- Combo: BeginCombo(): Added ImGuiComboFlags_NoPreview to disable the preview and only display a square arrow button.
|
||||||
- Combo: Arrow button isn't displayed over frame background so its blended color matches other buttons. Left side of the button isn't rounded.
|
- Combo: Arrow button isn't displayed over frame background so its blended color matches other buttons. Left side of the button isn't rounded.
|
||||||
- PlotLines: plot a flat line if scale_min==scale_max. (#1621)
|
- PlotLines: plot a flat line if scale_min==scale_max. (#1621)
|
||||||
- Fonts: Changed DisplayOffset.y to defaults to 0 instead of +1. Fixed rounding of Ascent/Descent to match TrueType renderer.
|
- Fonts: Changed DisplayOffset.y to defaults to 0 instead of +1. Fixed rounding of Ascent/Descent to match TrueType renderer.
|
||||||
If you were adding or subtracting (not assigning) to ImFont::DisplayOffset check if your fonts are correctly aligned vertically. (#1619)
|
If you were adding or subtracting (not assigning) to ImFont::DisplayOffset check if your fonts are correctly aligned vertically. (#1619)
|
||||||
- Fonts: Updated stb_truetype from 1.14 to stb_truetype 1.19. (w/ include fix from some platforms #1622)
|
- Fonts: Updated stb_truetype from 1.14 to stb_truetype 1.19. (w/ include fix from some platforms #1622)
|
||||||
- Fonts: Added optional FreeType rasterizer in misc/freetype. Moved from imgui_club repo. (#618) [@Vuhdo, @mikesart, @ocornut]
|
- Fonts: Added optional FreeType rasterizer in misc/freetype. Moved from imgui_club repo. (#618) [@Vuhdo, @mikesart, @ocornut]
|
||||||
@ -208,7 +415,7 @@ Other Changes:
|
|||||||
- Metrics: Added display of Columns state.
|
- Metrics: Added display of Columns state.
|
||||||
- Demo: Improved Selectable() examples. (#1528)
|
- Demo: Improved Selectable() examples. (#1528)
|
||||||
- Demo: Tweaked the Child demos, added a menu bar to the second child to test some navigation functions.
|
- Demo: Tweaked the Child demos, added a menu bar to the second child to test some navigation functions.
|
||||||
- Demo: Console: Using ImGuiCol_Text to be more friendly to color changes.
|
- Demo: Console: Using ImGuiCol_Text to be more friendly to color changes.
|
||||||
- Demo: Using IM_COL32() instead of ImColor() in ImDrawList centric contexts. Trying to phase out use of the ImColor helper whenever possible.
|
- Demo: Using IM_COL32() instead of ImColor() in ImDrawList centric contexts. Trying to phase out use of the ImColor helper whenever possible.
|
||||||
- Examples: Files in examples/ now include their own changelog so it is easier to occasionally update your bindings if needed.
|
- Examples: Files in examples/ now include their own changelog so it is easier to occasionally update your bindings if needed.
|
||||||
- Examples: Using Dark theme by default. (#707). Tweaked demo code.
|
- Examples: Using Dark theme by default. (#707). Tweaked demo code.
|
||||||
@ -238,9 +445,11 @@ Other Changes:
|
|||||||
- Examples: Visual Studio: Disabled extraneous function-level check in Release build.
|
- Examples: Visual Studio: Disabled extraneous function-level check in Release build.
|
||||||
- Various fixes, tweaks, internal refactoring, optimizations, comments.
|
- Various fixes, tweaks, internal refactoring, optimizations, comments.
|
||||||
|
|
||||||
|
|
||||||
|
-----------------------------------------------------------------------
|
||||||
|
VERSION 1.53 (Released 2017-12-25)
|
||||||
-----------------------------------------------------------------------
|
-----------------------------------------------------------------------
|
||||||
|
|
||||||
VERSION 1.53 (Released 2017-12-25)
|
|
||||||
Decorated log: https://github.com/ocornut/imgui/releases/tag/v1.53
|
Decorated log: https://github.com/ocornut/imgui/releases/tag/v1.53
|
||||||
|
|
||||||
Breaking Changes:
|
Breaking Changes:
|
||||||
@ -255,24 +464,24 @@ Breaking Changes:
|
|||||||
- Renamed `ImGuiTextBuffer::append()` helper to `appendf()`, and `appendv()` to `appendfv()` for consistency. If you copied the 'Log' demo in your code, it uses appendv() so that needs to be renamed.
|
- Renamed `ImGuiTextBuffer::append()` helper to `appendf()`, and `appendv()` to `appendfv()` for consistency. If you copied the 'Log' demo in your code, it uses appendv() so that needs to be renamed.
|
||||||
- ImDrawList: Removed 'bool anti_aliased = true' final parameter of `ImDrawList::AddPolyline()` and `ImDrawList::AddConvexPolyFilled()`. Prefer manipulating ImDrawList::Flags if you need to toggle them during the frame.
|
- ImDrawList: Removed 'bool anti_aliased = true' final parameter of `ImDrawList::AddPolyline()` and `ImDrawList::AddConvexPolyFilled()`. Prefer manipulating ImDrawList::Flags if you need to toggle them during the frame.
|
||||||
- Style, ImDrawList: Renamed `style.AntiAliasedShapes` to `style.AntiAliasedFill` for consistency and as a way to explicitly break code that manipulate those flag at runtime. You can now manipulate ImDrawList::Flags.
|
- Style, ImDrawList: Renamed `style.AntiAliasedShapes` to `style.AntiAliasedFill` for consistency and as a way to explicitly break code that manipulate those flag at runtime. You can now manipulate ImDrawList::Flags.
|
||||||
- Style, Begin: Removed `ImGuiWindowFlags_ShowBorders` window flag. Borders are now fully set up in the ImGuiStyle structure (see e.g. `style.FrameBorderSize`, `style.WindowBorderSize`, `style.PopupBorderSize`).
|
- Style, Begin: Removed `ImGuiWindowFlags_ShowBorders` window flag. Borders are now fully set up in the ImGuiStyle structure (see e.g. `style.FrameBorderSize`, `style.WindowBorderSize`, `style.PopupBorderSize`).
|
||||||
Use `ImGui::ShowStyleEditor()` to look them up.
|
Use `ImGui::ShowStyleEditor()` to look them up.
|
||||||
Please note that the style system will keep evolving (hopefully stabilizing in Q1 2018), and so custom styles will probably subtly break over time.
|
Please note that the style system will keep evolving (hopefully stabilizing in Q1 2018), and so custom styles will probably subtly break over time.
|
||||||
It is recommended that you use the `StyleColorsClassic()`, `StyleColorsDark()`, `StyleColorsLight()` functions. Also see `ShowStyleSelector()`.
|
It is recommended that you use the `StyleColorsClassic()`, `StyleColorsDark()`, `StyleColorsLight()` functions. Also see `ShowStyleSelector()`.
|
||||||
- Style: Removed `ImGuiCol_ComboBg` in favor of combo boxes using `ImGuiCol_PopupBg` for consistency. Combo are normal pop-ups.
|
- Style: Removed `ImGuiCol_ComboBg` in favor of combo boxes using `ImGuiCol_PopupBg` for consistency. Combo are normal pop-ups.
|
||||||
- Style: Renamed `ImGuiCol_ChildWindowBg` to `ImGuiCol_ChildBg`.
|
- Style: Renamed `ImGuiCol_ChildWindowBg` to `ImGuiCol_ChildBg`.
|
||||||
- Style: Renamed `style.ChildWindowRounding` to `style.ChildRounding`, `ImGuiStyleVar_ChildWindowRounding` to `ImGuiStyleVar_ChildRounding`.
|
- Style: Renamed `style.ChildWindowRounding` to `style.ChildRounding`, `ImGuiStyleVar_ChildWindowRounding` to `ImGuiStyleVar_ChildRounding`.
|
||||||
- Removed obsolete redirection functions: SetScrollPosHere() - marked obsolete in v1.42, July 2015.
|
- Removed obsolete redirection functions: SetScrollPosHere() - marked obsolete in v1.42, July 2015.
|
||||||
- Removed obsolete redirection functions: GetWindowFont(), GetWindowFontSize() - marked obsolete in v1.48, March 2016.
|
- Removed obsolete redirection functions: GetWindowFont(), GetWindowFontSize() - marked obsolete in v1.48, March 2016.
|
||||||
|
|
||||||
Other Changes:
|
Other Changes:
|
||||||
|
|
||||||
- Added `io.OptCursorBlink` option to allow disabling cursor blinking. (#1427)
|
- Added `io.OptCursorBlink` option to allow disabling cursor blinking. (#1427) [renamed to io.ConfigCursorBlink in 1.63]
|
||||||
- Added `GetOverlayDrawList()` helper to quickly get access to a ImDrawList that will be rendered in front of every windows.
|
- Added `GetOverlayDrawList()` helper to quickly get access to a ImDrawList that will be rendered in front of every windows.
|
||||||
- Added `GetFrameHeight()` helper which returns `(FontSize + style.FramePadding.y * 2)`.
|
- Added `GetFrameHeight()` helper which returns `(FontSize + style.FramePadding.y * 2)`.
|
||||||
- Drag and Drop: Added Beta API to easily use drag and drop patterns between imgui widgets.
|
- Drag and Drop: Added Beta API to easily use drag and drop patterns between imgui widgets.
|
||||||
- Setup a source on a widget with `BeginDragDropSource()`, `SetDragDropPayload()`, `EndDragDropSource()` functions.
|
- Setup a source on a widget with `BeginDragDropSource()`, `SetDragDropPayload()`, `EndDragDropSource()` functions.
|
||||||
- Receive data with `BeginDragDropTarget()`, `AcceptDragDropPayload()`, `EndDragDropTarget()`.
|
- Receive data with `BeginDragDropTarget()`, `AcceptDragDropPayload()`, `EndDragDropTarget()`.
|
||||||
- See ImGuiDragDropFlags for various options.
|
- See ImGuiDragDropFlags for various options.
|
||||||
- The ColorEdit4() and ColorButton() widgets now support Drag and Drop.
|
- The ColorEdit4() and ColorButton() widgets now support Drag and Drop.
|
||||||
- The API is tagged as Beta as it still may be subject to small changes.
|
- The API is tagged as Beta as it still may be subject to small changes.
|
||||||
@ -280,11 +489,11 @@ Other Changes:
|
|||||||
- Renamed io.OSXBehaviors to io.OptMacOSXBehaviors. Should not affect users as the compile-time default is usually enough. (#473, #650)
|
- Renamed io.OSXBehaviors to io.OptMacOSXBehaviors. Should not affect users as the compile-time default is usually enough. (#473, #650)
|
||||||
- Style: Added StyleColorsDark() style. (#707) [@dougbinks]
|
- Style: Added StyleColorsDark() style. (#707) [@dougbinks]
|
||||||
- Style: Added StyleColorsLight() style. Best used with frame borders + thicker font than the default font. (#707)
|
- Style: Added StyleColorsLight() style. Best used with frame borders + thicker font than the default font. (#707)
|
||||||
- Style: Added style.PopupRounding setting. (#1112)
|
- Style: Added style.PopupRounding setting. (#1112)
|
||||||
- Style: Added style.FrameBorderSize, style.WindowBorderSize, style.PopupBorderSize. Removed ImGuiWindowFlags_ShowBorders window flag!
|
- Style: Added style.FrameBorderSize, style.WindowBorderSize, style.PopupBorderSize. Removed ImGuiWindowFlags_ShowBorders window flag!
|
||||||
Borders are now fully set up in the ImGuiStyle structure. Use ImGui::ShowStyleEditor() to look them up. (#707, fix #819, #1031)
|
Borders are now fully set up in the ImGuiStyle structure. Use ImGui::ShowStyleEditor() to look them up. (#707, fix #819, #1031)
|
||||||
- Style: Various small changes to the classic style (most noticeably, buttons are now using blue shades). (#707)
|
- Style: Various small changes to the classic style (most noticeably, buttons are now using blue shades). (#707)
|
||||||
- Style: Renamed ImGuiCol_ChildWindowBg to ImGuiCol_ChildBg.
|
- Style: Renamed ImGuiCol_ChildWindowBg to ImGuiCol_ChildBg.
|
||||||
- Style: Renamed style.ChildWindowRounding to style.ChildRounding, ImGuiStyleVar_ChildWindowRounding to ImGuiStyleVar_ChildRounding.
|
- Style: Renamed style.ChildWindowRounding to style.ChildRounding, ImGuiStyleVar_ChildWindowRounding to ImGuiStyleVar_ChildRounding.
|
||||||
- Style: Removed ImGuiCol_ComboBg in favor of combo boxes using ImGuiCol_PopupBg for consistency. (#707)
|
- Style: Removed ImGuiCol_ComboBg in favor of combo boxes using ImGuiCol_PopupBg for consistency. (#707)
|
||||||
- Style: Made the ScaleAllSizes() helper rounds down every values so they are aligned on integers.
|
- Style: Made the ScaleAllSizes() helper rounds down every values so they are aligned on integers.
|
||||||
@ -293,8 +502,8 @@ Other Changes:
|
|||||||
- Combo: Pop-up grows horizontally to accommodate for contents that is larger then the parent combo button.
|
- Combo: Pop-up grows horizontally to accommodate for contents that is larger then the parent combo button.
|
||||||
- Combo: Added BeginCombo()/EndCombo() API which allows use to submit content of any form and manage your selection state without relying on indices.
|
- Combo: Added BeginCombo()/EndCombo() API which allows use to submit content of any form and manage your selection state without relying on indices.
|
||||||
- Combo: Added ImGuiComboFlags_PopupAlignLeft flag to BeginCombo() to prioritize keeping the pop-up on the left side (for small-button-looking combos).
|
- Combo: Added ImGuiComboFlags_PopupAlignLeft flag to BeginCombo() to prioritize keeping the pop-up on the left side (for small-button-looking combos).
|
||||||
- Combo: Added ImGuiComboFlags_HeightSmall, ImGuiComboFlags_HeightLarge, ImGuiComboFlags_HeightLargest to easily provide desired pop-up height.
|
- Combo: Added ImGuiComboFlags_HeightSmall, ImGuiComboFlags_HeightLarge, ImGuiComboFlags_HeightLargest to easily provide desired pop-up height.
|
||||||
- Combo: You can use SetNextWindowSizeConstraints() before BeginCombo() to specify specific pop-up width/height constraints.
|
- Combo: You can use SetNextWindowSizeConstraints() before BeginCombo() to specify specific pop-up width/height constraints.
|
||||||
- Combo: Offset popup position by border size so that a double border isn't so visible. (#707)
|
- Combo: Offset popup position by border size so that a double border isn't so visible. (#707)
|
||||||
- Combo: Recycling windows by using a stack number instead of a unique id, wasting less memory (like menus do).
|
- Combo: Recycling windows by using a stack number instead of a unique id, wasting less memory (like menus do).
|
||||||
- InputText: Added ImGuiInputTextFlags_NoUndoRedo flag. (#1506, #1508) [@ibachar]
|
- InputText: Added ImGuiInputTextFlags_NoUndoRedo flag. (#1506, #1508) [@ibachar]
|
||||||
@ -308,19 +517,19 @@ Other Changes:
|
|||||||
- Window: Sizing fixes when using SetNextWindowSize() on individual axises.
|
- Window: Sizing fixes when using SetNextWindowSize() on individual axises.
|
||||||
- Window: Hide new window for one frame until they calculate their size. Also fixes SetNextWindowPos() given a non-zero pivot. (#1694)
|
- Window: Hide new window for one frame until they calculate their size. Also fixes SetNextWindowPos() given a non-zero pivot. (#1694)
|
||||||
- Window: Made mouse wheel scrolling accommodate better to windows that are smaller than the scroll step.
|
- Window: Made mouse wheel scrolling accommodate better to windows that are smaller than the scroll step.
|
||||||
- Window: SetNextWindowContentSize() adjust for the size of decorations (title bar/menu bar), but _not_ for borders are we consistently make borders not affect layout.
|
- Window: SetNextWindowContentSize() adjust for the size of decorations (title bar/menu bar), but _not_ for borders are we consistently make borders not affect layout.
|
||||||
If you need a non-child window of an exact size with border enabled but zero window padding, you'll need to accommodate for the border size yourself.
|
If you need a non-child window of an exact size with border enabled but zero window padding, you'll need to accommodate for the border size yourself.
|
||||||
- Window: Using the ImGuiWindowFlags_NoScrollWithMouse flag on a child window forwards the mouse wheel event to the parent window, unless either ImGuiWindowFlags_NoInputs or ImGuiWindowFlags_NoScrollbar are also set. (#1380, #1502)
|
- Window: Using the ImGuiWindowFlags_NoScrollWithMouse flag on a child window forwards the mouse wheel event to the parent window, unless either ImGuiWindowFlags_NoInputs or ImGuiWindowFlags_NoScrollbar are also set. (#1380, #1502)
|
||||||
- Window: Active Modal window always set the WantCaptureKeyboard flag. (#744)
|
- Window: Active Modal window always set the WantCaptureKeyboard flag. (#744)
|
||||||
- Window: Moving window doesn't use accumulating MouseDelta so straying out of imgui boundaries keeps moved imgui window at the same cursor-relative position.
|
- Window: Moving window doesn't use accumulating MouseDelta so straying out of imgui boundaries keeps moved imgui window at the same cursor-relative position.
|
||||||
- Window: BeginChild() which an explicit name doesn't include the hash within the internal window name. (#1698)
|
- Window: BeginChild() which an explicit name doesn't include the hash within the internal window name. (#1698)
|
||||||
- IsWindowFocused(): Added ImGuiFocusedFlags_ChildWindows flag to include child windows in the focused test. (#1382).
|
- IsWindowFocused(): Added ImGuiFocusedFlags_ChildWindows flag to include child windows in the focused test. (#1382).
|
||||||
- IsWindowFocused(): Added ImGuiFocusedFlags_RootWindow flag to start focused test from the root (top-most) window. Obsolete IsRootWindowFocused(). (#1382)
|
- IsWindowFocused(): Added ImGuiFocusedFlags_RootWindow flag to start focused test from the root (top-most) window. Obsolete IsRootWindowFocused(). (#1382)
|
||||||
- IsWindowHovered(): Added ImGuiHoveredFlags_ChildWindows flag to include child windows in the hovered test. (#1382).
|
- IsWindowHovered(): Added ImGuiHoveredFlags_ChildWindows flag to include child windows in the hovered test. (#1382).
|
||||||
- IsWindowHovered(): Added ImGuiHoveredFlags_RootWindow flag to start hovered test from the root (top-most) window. The combination of both flags obsoletes IsRootWindowOrAnyChildHovered(). (#1382)
|
- IsWindowHovered(): Added ImGuiHoveredFlags_RootWindow flag to start hovered test from the root (top-most) window. The combination of both flags obsoletes IsRootWindowOrAnyChildHovered(). (#1382)
|
||||||
- IsWindowHovered(): Fixed return value when an item is active to use the same logic as IsItemHovered(). (#1382, #1404)
|
- IsWindowHovered(): Fixed return value when an item is active to use the same logic as IsItemHovered(). (#1382, #1404)
|
||||||
- IsWindowHovered(): Always return true when current window is being moved. (#1382)
|
- IsWindowHovered(): Always return true when current window is being moved. (#1382)
|
||||||
- Scrollbar: Fixed issues with vertical scrollbar flickering/appearing, typically when manually resizing and using a pattern of filling available height (e.g. full sized BeginChild).
|
- Scrollbar: Fixed issues with vertical scrollbar flickering/appearing, typically when manually resizing and using a pattern of filling available height (e.g. full sized BeginChild).
|
||||||
- Scrollbar: Minor graphical fix for when scrollbar don't have enough visible space to display the full grab.
|
- Scrollbar: Minor graphical fix for when scrollbar don't have enough visible space to display the full grab.
|
||||||
- Scrolling: Fixed padding and scrolling asymmetry where lower/right sides of a window wouldn't use WindowPadding properly + causing minor scrolling glitches.
|
- Scrolling: Fixed padding and scrolling asymmetry where lower/right sides of a window wouldn't use WindowPadding properly + causing minor scrolling glitches.
|
||||||
- Tree: TreePush with zero arguments was ambiguous. Resolved by making it call TreePush(const void*). [@JasonWilkins]
|
- Tree: TreePush with zero arguments was ambiguous. Resolved by making it call TreePush(const void*). [@JasonWilkins]
|
||||||
@ -330,9 +539,9 @@ Other Changes:
|
|||||||
- BeginMenu(): Tweaked the Arrow/Triangle displayed on child menu items.
|
- BeginMenu(): Tweaked the Arrow/Triangle displayed on child menu items.
|
||||||
- Columns: Clipping columns borders on Y axis on CPU because some Linux GPU drivers appears to be unhappy with triangle spanning large regions. (#125)
|
- Columns: Clipping columns borders on Y axis on CPU because some Linux GPU drivers appears to be unhappy with triangle spanning large regions. (#125)
|
||||||
- Columns: Added ImGuiColumnsFlags_GrowParentContentsSize to internal API to restore old content sizes behavior (may be obsolete). (#1444, #125)
|
- Columns: Added ImGuiColumnsFlags_GrowParentContentsSize to internal API to restore old content sizes behavior (may be obsolete). (#1444, #125)
|
||||||
- Columns: Columns width is no longer lost when dragging a column to the right side of the window, until releasing the mouse button you have a chance to save them. (#1499, #125). [@ggtucker]
|
- Columns: Columns width is no longer lost when dragging a column to the right side of the window, until releasing the mouse button you have a chance to save them. (#1499, #125). [@ggtucker]
|
||||||
- Columns: Fixed dragging when using a same of columns multiple times in the frame. (#125)
|
- Columns: Fixed dragging when using a same of columns multiple times in the frame. (#125)
|
||||||
- Indent(), Unindent(): Allow passing negative values.
|
- Indent(), Unindent(): Allow passing negative values.
|
||||||
- ColorEdit4(): Made IsItemActive() return true when picker pop-up is active. (#1489)
|
- ColorEdit4(): Made IsItemActive() return true when picker pop-up is active. (#1489)
|
||||||
- ColorEdit4(): Tweaked tooltip so that the color button aligns more correctly with text.
|
- ColorEdit4(): Tweaked tooltip so that the color button aligns more correctly with text.
|
||||||
- ColorEdit4(): Support drag and drop. Color buttons can be used as drag sources, and ColorEdit widgets as drag targets. (#143)
|
- ColorEdit4(): Support drag and drop. Color buttons can be used as drag sources, and ColorEdit widgets as drag targets. (#143)
|
||||||
@ -343,7 +552,7 @@ Other Changes:
|
|||||||
- ImFont: Added GetDebugName() helper.
|
- ImFont: Added GetDebugName() helper.
|
||||||
- ImFontAtlas: Added missing Thai punctuation in the GetGlyphRangesThai() ranges. (#1396) [@nProtect]
|
- ImFontAtlas: Added missing Thai punctuation in the GetGlyphRangesThai() ranges. (#1396) [@nProtect]
|
||||||
- ImDrawList: Removed 'bool anti_aliased = true' final parameter of ImDrawList::AddPolyline() and ImDrawList::AddConvexPolyFilled(). Anti-aliasing is controlled via the regular style.AntiAliased flags.
|
- ImDrawList: Removed 'bool anti_aliased = true' final parameter of ImDrawList::AddPolyline() and ImDrawList::AddConvexPolyFilled(). Anti-aliasing is controlled via the regular style.AntiAliased flags.
|
||||||
- ImDrawList: Added ImDrawList::AddImageRounded() helper. (#845) [@thedmd]
|
- ImDrawList: Added ImDrawList::AddImageRounded() helper. (#845) [@thedmd]
|
||||||
- ImDrawList: Refactored to make ImDrawList independent of ImGui. Removed static variable in PathArcToFast() which caused linking issues to some.
|
- ImDrawList: Refactored to make ImDrawList independent of ImGui. Removed static variable in PathArcToFast() which caused linking issues to some.
|
||||||
- ImDrawList: Exposed ImDrawCornerFlags, replaced occurrences of ~0 with an explicit ImDrawCornerFlags_All. NB: Inversed BotLeft (prev 1<<3, now 1<<2) and BotRight (prev 1<<2, now 1<<3).
|
- ImDrawList: Exposed ImDrawCornerFlags, replaced occurrences of ~0 with an explicit ImDrawCornerFlags_All. NB: Inversed BotLeft (prev 1<<3, now 1<<2) and BotRight (prev 1<<2, now 1<<3).
|
||||||
- ImVector: Added ImVector::push_front() helper.
|
- ImVector: Added ImVector::push_front() helper.
|
||||||
@ -353,32 +562,34 @@ Other Changes:
|
|||||||
- Internals: ButtonBehavior: Fixed ImGuiButtonFlags_NoHoldingActiveID flag from incorrectly setting the ActiveIdClickOffset field.
|
- Internals: ButtonBehavior: Fixed ImGuiButtonFlags_NoHoldingActiveID flag from incorrectly setting the ActiveIdClickOffset field.
|
||||||
This had no known effect within imgui code but could have affected custom drag and drop patterns. And it is more correct this way! (#1418)
|
This had no known effect within imgui code but could have affected custom drag and drop patterns. And it is more correct this way! (#1418)
|
||||||
- Internals: ButtonBehavior: Fixed ImGuiButtonFlags_AllowOverlapMode to avoid temporarily activating widgets on click before they have been correctly double-hovered. (#319, #600)
|
- Internals: ButtonBehavior: Fixed ImGuiButtonFlags_AllowOverlapMode to avoid temporarily activating widgets on click before they have been correctly double-hovered. (#319, #600)
|
||||||
- Internals: Added SplitterBehavior() helper. (#319)
|
- Internals: Added SplitterBehavior() helper. (#319)
|
||||||
- Internals: Added IM_NEW(), IM_DELETE() helpers. (#484, #504, #1517)
|
- Internals: Added IM_NEW(), IM_DELETE() helpers. (#484, #504, #1517)
|
||||||
- Internals: Basic refactor of the settings API which now allows external elements to be loaded/saved.
|
- Internals: Basic refactor of the settings API which now allows external elements to be loaded/saved.
|
||||||
- Demo: Added ShowFontSelector() showing loaded fonts.
|
- Demo: Added ShowFontSelector() showing loaded fonts.
|
||||||
- Demo: Added ShowStyleSelector() to select among default styles. (#707)
|
- Demo: Added ShowStyleSelector() to select among default styles. (#707)
|
||||||
- Demo: Renamed the emblematic ShowTestWindow() function to ShowDemoWindow().
|
- Demo: Renamed the emblematic ShowTestWindow() function to ShowDemoWindow().
|
||||||
- Demo: Style Editor: Added a "Simplified settings" sections with check-boxes for border size and frame rounding. (#707, #1019)
|
- Demo: Style Editor: Added a "Simplified settings" sections with check-boxes for border size and frame rounding. (#707, #1019)
|
||||||
- Demo: Style Editor: Added combo box to select stock styles and select current font when multiple are loaded. (#707)
|
- Demo: Style Editor: Added combo box to select stock styles and select current font when multiple are loaded. (#707)
|
||||||
- Demo: Style Editor: Using local storage so Save/Revert button makes more sense without code passing its storage. Added horizontal scroll bar. Fixed Save/Revert button to be always accessible. (#1211)
|
- Demo: Style Editor: Using local storage so Save/Revert button makes more sense without code passing its storage. Added horizontal scroll bar. Fixed Save/Revert button to be always accessible. (#1211)
|
||||||
- Demo: Console: Fixed context menu issue. (#1404)
|
- Demo: Console: Fixed context menu issue. (#1404)
|
||||||
- Demo: Console: Fixed incorrect positioning which was hidden by a minor scroll issue (this would affect people who copied the Console code as is).
|
- Demo: Console: Fixed incorrect positioning which was hidden by a minor scroll issue (this would affect people who copied the Console code as is).
|
||||||
- Demo: Constrained Resize: Added more test cases. (#1417)
|
- Demo: Constrained Resize: Added more test cases. (#1417)
|
||||||
- Demo: Custom Rendering: Fixed clipping rectangle extruding out of parent window.
|
- Demo: Custom Rendering: Fixed clipping rectangle extruding out of parent window.
|
||||||
- Demo: Layout: Removed unnecessary and misleading BeginChild/EndChild calls.
|
- Demo: Layout: Removed unnecessary and misleading BeginChild/EndChild calls.
|
||||||
- Demo: The "Color Picker with Palette" demo supports drag and drop. (#143)
|
- Demo: The "Color Picker with Palette" demo supports drag and drop. (#143)
|
||||||
- Demo: Display better mouse cursor info for debugging backends.
|
- Demo: Display better mouse cursor info for debugging backends.
|
||||||
- Demo: Stopped using rand() function in demo code.
|
- Demo: Stopped using rand() function in demo code.
|
||||||
- Examples: Added a handful of extra comments (about fonts, third-party libraries used in the examples, etc.).
|
- Examples: Added a handful of extra comments (about fonts, third-party libraries used in the examples, etc.).
|
||||||
- Examples: DirectX9: Handle loss of D3D9 device (D3DERR_DEVICELOST). (#1464)
|
- Examples: DirectX9: Handle loss of D3D9 device (D3DERR_DEVICELOST). (#1464)
|
||||||
- Examples: Added null_example/ which is helpful for quick testing on multiple compilers/settings without relying on graphics library.
|
- Examples: Added null_example/ which is helpful for quick testing on multiple compilers/settings without relying on graphics library.
|
||||||
- Fix for using alloca() in "Clang with Microsoft Codechain" mode.
|
- Fix for using alloca() in "Clang with Microsoft Codechain" mode.
|
||||||
- Various fixes, optimizations, comments.
|
- Various fixes, optimizations, comments.
|
||||||
|
|
||||||
|
|
||||||
|
-----------------------------------------------------------------------
|
||||||
|
VERSION 1.52 (2017-10-27)
|
||||||
-----------------------------------------------------------------------
|
-----------------------------------------------------------------------
|
||||||
|
|
||||||
VERSION 1.52 (2017-10-27)
|
|
||||||
Decorated log: https://github.com/ocornut/imgui/releases/tag/v1.52
|
Decorated log: https://github.com/ocornut/imgui/releases/tag/v1.52
|
||||||
|
|
||||||
Breaking Changes:
|
Breaking Changes:
|
||||||
@ -387,13 +598,14 @@ Breaking Changes:
|
|||||||
- Renamed `AlignFirstTextHeightToWidgets()` to `AlignTextToFramePadding()`. Kept inline redirection function (will obsolete).
|
- Renamed `AlignFirstTextHeightToWidgets()` to `AlignTextToFramePadding()`. Kept inline redirection function (will obsolete).
|
||||||
- Obsoleted the legacy 5 parameters version of Begin(). Please avoid using it. If you need a transparent window background, uses `PushStyleColor()`. The old size parameter there was also misleading and equivalent to calling `SetNextWindowSize(size, ImGuiCond_FirstTimeEver)`. Kept inline redirection function (will obsolete).
|
- Obsoleted the legacy 5 parameters version of Begin(). Please avoid using it. If you need a transparent window background, uses `PushStyleColor()`. The old size parameter there was also misleading and equivalent to calling `SetNextWindowSize(size, ImGuiCond_FirstTimeEver)`. Kept inline redirection function (will obsolete).
|
||||||
- Obsoleted `IsItemHoveredRect()`, `IsMouseHoveringWindow()` in favor of using the newly introduced flags of `IsItemHovered()` and `IsWindowHovered()`. Kept inline redirection function (will obsolete). (#1382)
|
- Obsoleted `IsItemHoveredRect()`, `IsMouseHoveringWindow()` in favor of using the newly introduced flags of `IsItemHovered()` and `IsWindowHovered()`. Kept inline redirection function (will obsolete). (#1382)
|
||||||
|
- Obsoleted 'SetNextWindowPosCenter()' in favor of using 1SetNextWindowPos()` with a pivot value which allows to do the same and more. Keep inline redirection function.
|
||||||
- Removed `IsItemRectHovered()`, `IsWindowRectHovered()` recently introduced in 1.51 which were merely the more consistent/correct names for the above functions which are now obsolete anyway. (#1382)
|
- Removed `IsItemRectHovered()`, `IsWindowRectHovered()` recently introduced in 1.51 which were merely the more consistent/correct names for the above functions which are now obsolete anyway. (#1382)
|
||||||
- Changed `IsWindowHovered()` default parameters behavior to return false if an item is active in another window (e.g. click-dragging item from another window to this window). You can use the newly introduced IsWindowHovered() flags to requests this specific behavior if you need it. (#1382)
|
- Changed `IsWindowHovered()` default parameters behavior to return false if an item is active in another window (e.g. click-dragging item from another window to this window). You can use the newly introduced IsWindowHovered() flags to requests this specific behavior if you need it. (#1382)
|
||||||
- Renamed imconfig.h's `IMGUI_DISABLE_WIN32_DEFAULT_CLIPBOARD_FUNCS`/`IMGUI_DISABLE_WIN32_DEFAULT_IME_FUNCS` to `IMGUI_DISABLE_WIN32_DEFAULT_CLIPBOARD_FUNCTIONS`/`IMGUI_DISABLE_WIN32_DEFAULT_IME_FUNCTIONS` for consistency.
|
- Renamed imconfig.h's `IMGUI_DISABLE_WIN32_DEFAULT_CLIPBOARD_FUNCS`/`IMGUI_DISABLE_WIN32_DEFAULT_IME_FUNCS` to `IMGUI_DISABLE_WIN32_DEFAULT_CLIPBOARD_FUNCTIONS`/`IMGUI_DISABLE_WIN32_DEFAULT_IME_FUNCTIONS` for consistency.
|
||||||
|
|
||||||
Other Changes:
|
Other Changes:
|
||||||
|
|
||||||
- ProgressBar: fixed rendering when straddling rounded area. (#1296)
|
- ProgressBar: fixed rendering when straddling rounded area. (#1296)
|
||||||
- SliderFloat, DragFloat: Using scientific notation e.g. "%.1e" in the displayed format string doesn't mistakenly trigger rounding of the value. [@MomentsInGraphics]
|
- SliderFloat, DragFloat: Using scientific notation e.g. "%.1e" in the displayed format string doesn't mistakenly trigger rounding of the value. [@MomentsInGraphics]
|
||||||
- Combo, InputFloat, InputInt: Made the small button on the right side align properly with the equivalent colored button of ColorEdit4().
|
- Combo, InputFloat, InputInt: Made the small button on the right side align properly with the equivalent colored button of ColorEdit4().
|
||||||
- IO: Tweaked logic for `io.WantCaptureMouse` so it now outputs false when e.g. hovering over void while an InputText() is active. (#621) [@pdoane]
|
- IO: Tweaked logic for `io.WantCaptureMouse` so it now outputs false when e.g. hovering over void while an InputText() is active. (#621) [@pdoane]
|
||||||
@ -403,25 +615,26 @@ Other Changes:
|
|||||||
- `ImGuiHoveredFlags_AllowWhenBlockedByActiveItem`
|
- `ImGuiHoveredFlags_AllowWhenBlockedByActiveItem`
|
||||||
- `ImGuiHoveredFlags_AllowWhenOverlapped`
|
- `ImGuiHoveredFlags_AllowWhenOverlapped`
|
||||||
- `ImGuiHoveredFlags_RectOnly`
|
- `ImGuiHoveredFlags_RectOnly`
|
||||||
- Input: Added `IsMousePosValid()` helper.
|
- Input: Added `IsMousePosValid()` helper.
|
||||||
- Input: Added `GetKeyPressedAmount()` to easily measure press count when the repeat rate is faster than the frame rate.
|
- Input: Added `GetKeyPressedAmount()` to easily measure press count when the repeat rate is faster than the frame rate.
|
||||||
- Input/Focus: Disabled TAB and Shift+TAB when CTRL key is held.
|
- Input/Focus: Disabled TAB and Shift+TAB when CTRL key is held.
|
||||||
- CheckBox: Now rendering a tick mark instead of a full square.
|
- CheckBox: Now rendering a tick mark instead of a full square.
|
||||||
- ColorEdit4: Added "Copy as..." option in context menu. (#346)
|
- ColorEdit4: Added "Copy as..." option in context menu. (#346)
|
||||||
- ColorPicker: Improved ColorPicker hue wheel color interpolation. (#1313) [@thevaber]
|
- ColorPicker: Improved ColorPicker hue wheel color interpolation. (#1313) [@thevaber]
|
||||||
- ColorButton: Reduced bordering artifact that would be particularly visible with an opaque Col_FrameBg and FrameRounding enabled.
|
- ColorButton: Reduced bordering artifact that would be particularly visible with an opaque Col_FrameBg and FrameRounding enabled.
|
||||||
- ColorButton: Fixed rendering color button with a checkerboard if the transparency comes from the global style.Alpha and not from the actual source color.
|
- ColorButton: Fixed rendering color button with a checkerboard if the transparency comes from the global style.Alpha and not from the actual source color.
|
||||||
- TreeNode: Added `ImGuiTreeNodeFlags_FramePadding` flag to conveniently create a tree node with full padding at the beginning of a line, without having to call `AlignTextToFramePadding()`.
|
- TreeNode: Added `ImGuiTreeNodeFlags_FramePadding` flag to conveniently create a tree node with full padding at the beginning of a line, without having to call `AlignTextToFramePadding()`.
|
||||||
- Trees: Fixed calling `SetNextTreeNodeOpen()` on a collapsed window leaking to the first tree node item of the next frame.
|
- Trees: Fixed calling `SetNextTreeNodeOpen()` on a collapsed window leaking to the first tree node item of the next frame.
|
||||||
- Layout: Horizontal layout is automatically enforced in a menu bar, so you can use non-MenuItem elements without calling SameLine().
|
- Layout: Horizontal layout is automatically enforced in a menu bar, so you can use non-MenuItem elements without calling SameLine().
|
||||||
- Separator: Output a vertical separator when used inside a menu bar (or in general when horizontal layout is active, but that isn't exposed yet!).
|
- Separator: Output a vertical separator when used inside a menu bar (or in general when horizontal layout is active, but that isn't exposed yet!).
|
||||||
- Windows: Added `IsWindowAppearing()` helper (helpful e.g. as a condition before initializing some of your own things.).
|
- Window: Added `IsWindowAppearing()` helper (helpful e.g. as a condition before initializing some of your own things.).
|
||||||
- Windows: Fixed title bar color of top-most window under a modal window.
|
- Window: Added pivot parameter to `SetNextWindowPos()`, making it possible to center or right align a window. Obsoleted `SetNextWindowPosCenter()`.
|
||||||
- Windows: Fixed not being able to move a window by clicking on one of its child window. (#1337, #635)
|
- Window: Fixed title bar color of top-most window under a modal window.
|
||||||
- Windows: Fixed `Begin()` auto-fit calculation code that predict the presence of a scrollbar so it works better when window size constraints are used.
|
- Window: Fixed not being able to move a window by clicking on one of its child window. (#1337, #635)
|
||||||
- Windows: Fixed calling `Begin()` more than once per frame setting `window_just_activated_by_user` which in turn would set enable the Appearing condition for that frame.
|
- Window: Fixed `Begin()` auto-fit calculation code that predict the presence of a scrollbar so it works better when window size constraints are used.
|
||||||
- Windows: The implicit "Debug" window now uses a "Debug##Default" identifier instead of "Debug" to allow user creating a window called "Debug" without losing their custom flags.
|
- Window: Fixed calling `Begin()` more than once per frame setting `window_just_activated_by_user` which in turn would set enable the Appearing condition for that frame.
|
||||||
- Windows: Made the `ImGuiWindowFlags_NoMove` flag properly inherited from parent to child. In a setup with ParentWindow (no flag) -> Child (NoMove) -> SubChild (no flag), the user won't be able to move the parent window by clicking on SubChild. (#1381)
|
- Window: The implicit "Debug" window now uses a "Debug##Default" identifier instead of "Debug" to allow user creating a window called "Debug" without losing their custom flags.
|
||||||
|
- Window: Made the `ImGuiWindowFlags_NoMove` flag properly inherited from parent to child. In a setup with ParentWindow (no flag) -> Child (NoMove) -> SubChild (no flag), the user won't be able to move the parent window by clicking on SubChild. (#1381)
|
||||||
- Popups: Pop-ups can be closed with a right-click anywhere, without altering focus under the pop-up. (~#439)
|
- Popups: Pop-ups can be closed with a right-click anywhere, without altering focus under the pop-up. (~#439)
|
||||||
- Popups: `BeginPopupContextItem()`, `BeginPopupContextWindow()` are now setup to allow reopening a context menu by right-clicking again. (~#439)
|
- Popups: `BeginPopupContextItem()`, `BeginPopupContextWindow()` are now setup to allow reopening a context menu by right-clicking again. (~#439)
|
||||||
- Popups: `BeginPopupContextItem()` now supports a NULL string identifier and uses the last item ID if available.
|
- Popups: `BeginPopupContextItem()` now supports a NULL string identifier and uses the last item ID if available.
|
||||||
@ -432,21 +645,21 @@ Other Changes:
|
|||||||
- ImDrawList: Fixed a rare draw call merging bug which could lead to undisplayed triangles. (#1172, #1368)
|
- ImDrawList: Fixed a rare draw call merging bug which could lead to undisplayed triangles. (#1172, #1368)
|
||||||
- ImDrawList: Fixed a rare bug in `ChannelsMerge()` when all contents has been clipped, leading to an extraneous draw call being created. (#1172, #1368)
|
- ImDrawList: Fixed a rare bug in `ChannelsMerge()` when all contents has been clipped, leading to an extraneous draw call being created. (#1172, #1368)
|
||||||
- ImFont: Added `AddGlyph()` building helper for use by custom atlas builders.
|
- ImFont: Added `AddGlyph()` building helper for use by custom atlas builders.
|
||||||
- ImFontAtlas: Added support for CustomRect API to submit custom rectangles to be packed into the atlas. You can map them as font glyphs, or use them for custom purposes.
|
- ImFontAtlas: Added support for CustomRect API to submit custom rectangles to be packed into the atlas. You can map them as font glyphs, or use them for custom purposes.
|
||||||
After the atlas is built you can query the position of your rectangles in the texture and then copy your data there. You can use this features to create e.g. full color font-mapped icons.
|
After the atlas is built you can query the position of your rectangles in the texture and then copy your data there. You can use this features to create e.g. full color font-mapped icons.
|
||||||
- ImFontAtlas: Fixed fall-back handling when merging fonts, if a glyph was missing from the second font input it could have used a glyph from the first one. (#1349) [@inolen]
|
- ImFontAtlas: Fixed fall-back handling when merging fonts, if a glyph was missing from the second font input it could have used a glyph from the first one. (#1349) [@inolen]
|
||||||
- ImFontAtlas: Fixed memory leak on build failure case when stbtt_InitFont failed (generally due to incorrect or supported font type). (#1391) (@Moka42)
|
- ImFontAtlas: Fixed memory leak on build failure case when stbtt_InitFont failed (generally due to incorrect or supported font type). (#1391) (@Moka42)
|
||||||
- ImFontConfig: Added `RasterizerMultiply` option to alter the brightness of individual fonts at rasterization time, which may help increasing readability for some.
|
- ImFontConfig: Added `RasterizerMultiply` option to alter the brightness of individual fonts at rasterization time, which may help increasing readability for some.
|
||||||
- ImFontConfig: Added `RasterizerFlags` to pass options to custom rasterizer (e.g. the [imgui_freetype](https://github.com/ocornut/imgui_club/tree/master/imgui_freetype) rasterizer in imgui_club has such options).
|
- ImFontConfig: Added `RasterizerFlags` to pass options to custom rasterizer (e.g. the [imgui_freetype](https://github.com/ocornut/imgui_club/tree/master/imgui_freetype) rasterizer in imgui_club has such options).
|
||||||
- ImVector: added resize() variant with initialization value.
|
- ImVector: added resize() variant with initialization value.
|
||||||
- Misc: Changed the internal name formatting of child windows identifier to use slashes (instead of dots) as separator, more readable.
|
- Misc: Changed the internal name formatting of child windows identifier to use slashes (instead of dots) as separator, more readable.
|
||||||
- Misc: Fixed compilation with `IMGUI_DISABLE_OBSOLETE_FUNCTIONS` defined.
|
- Misc: Fixed compilation with `IMGUI_DISABLE_OBSOLETE_FUNCTIONS` defined.
|
||||||
- Misc: Marked all format+va_list functions with format attribute so GCC/Clang can warn about misuses.
|
- Misc: Marked all format+va_list functions with format attribute so GCC/Clang can warn about misuses.
|
||||||
- Misc: Fixed compilation on NetBSD due to missing alloca.h (#1319) [@RyuKojiro]
|
- Misc: Fixed compilation on NetBSD due to missing alloca.h (#1319) [@RyuKojiro]
|
||||||
- Misc: Improved warnings compilation for newer versions of Clang. (#1324) (@waywardmonkeys)
|
- Misc: Improved warnings compilation for newer versions of Clang. (#1324) (@waywardmonkeys)
|
||||||
- Misc: Added `io.WantMoveMouse flags` (from Nav branch) and honored in Examples applications. Currently unused but trying to spread Examples applications code that supports it.
|
- Misc: Added `io.WantMoveMouse flags` (from Nav branch) and honored in Examples applications. Currently unused but trying to spread Examples applications code that supports it.
|
||||||
- Misc: Added `IMGUI_DISABLE_FORMAT_STRING_FUNCTIONS` support in imconfig.h to allow user reimplementing the `ImFormatString()` functions e.g. to use stb_printf(). (#1038)
|
- Misc: Added `IMGUI_DISABLE_FORMAT_STRING_FUNCTIONS` support in imconfig.h to allow user reimplementing the `ImFormatString()` functions e.g. to use stb_printf(). (#1038)
|
||||||
- Misc: [Windows] Fixed default Win32 `SetClipboardText()` handler leaving the Win32 clipboard handler unclosed on failure. [@pdoane]
|
- Misc: [Windows] Fixed default Win32 `SetClipboardText()` handler leaving the Win32 clipboard handler unclosed on failure. [@pdoane]
|
||||||
- Style: Added `ImGuiStyle::ScaleAllSizes(float)` helper to make it easier to have application transition e.g. from low to high DPI with a matching style.
|
- Style: Added `ImGuiStyle::ScaleAllSizes(float)` helper to make it easier to have application transition e.g. from low to high DPI with a matching style.
|
||||||
- Metrics: Draw window bounding boxes when hovering Pos/Size; List all draw layers; Trimming empty commands like Render() does.
|
- Metrics: Draw window bounding boxes when hovering Pos/Size; List all draw layers; Trimming empty commands like Render() does.
|
||||||
- Examples: OpenGL3: Save and restore sampler state. (#1145) [@nlguillemot]
|
- Examples: OpenGL3: Save and restore sampler state. (#1145) [@nlguillemot]
|
||||||
@ -456,7 +669,7 @@ Other Changes:
|
|||||||
- Tools: Fixed binary_to_compressed_c tool to return 0 when successful. (#1350) [@benvanik]
|
- Tools: Fixed binary_to_compressed_c tool to return 0 when successful. (#1350) [@benvanik]
|
||||||
- Internals: Exposed more helpers and unfinished features in imgui_internal.h. (use at your own risk!).
|
- Internals: Exposed more helpers and unfinished features in imgui_internal.h. (use at your own risk!).
|
||||||
- Internals: A bunch of internal refactoring, hopefully haven't broken anything! Merged a bunch of internal changes from the upcoming Navigation branch.
|
- Internals: A bunch of internal refactoring, hopefully haven't broken anything! Merged a bunch of internal changes from the upcoming Navigation branch.
|
||||||
- Various tweaks, fixes and documentation changes.
|
- Various tweaks, fixes and documentation changes.
|
||||||
|
|
||||||
Beta Navigation Branch:
|
Beta Navigation Branch:
|
||||||
(Lots of work has been done toward merging the Beta Gamepad/Keyboard Navigation branch (#787) in master.)
|
(Lots of work has been done toward merging the Beta Gamepad/Keyboard Navigation branch (#787) in master.)
|
||||||
@ -477,9 +690,11 @@ Beta Navigation Branch:
|
|||||||
- Nav: More consistently drawing a (thin) navigation rectangle hover filled frames such as tree nodes, collapsing header, menus. (#787)
|
- Nav: More consistently drawing a (thin) navigation rectangle hover filled frames such as tree nodes, collapsing header, menus. (#787)
|
||||||
- Nav: Various internal refactoring.
|
- Nav: Various internal refactoring.
|
||||||
|
|
||||||
|
|
||||||
|
-----------------------------------------------------------------------
|
||||||
|
VERSION 1.51 (2017-08-24)
|
||||||
-----------------------------------------------------------------------
|
-----------------------------------------------------------------------
|
||||||
|
|
||||||
VERSION 1.51 (2017-08-24)
|
|
||||||
Decorated log: https://github.com/ocornut/imgui/releases/tag/v1.51
|
Decorated log: https://github.com/ocornut/imgui/releases/tag/v1.51
|
||||||
|
|
||||||
Breaking Changes:
|
Breaking Changes:
|
||||||
@ -491,10 +706,10 @@ Work on dear imgui has been gradually resuming. It means that fixes and new feat
|
|||||||
- Renamed `IsMouseHoveringAnyWindow()` to `IsAnyWindowHovered()` for consistency. Kept inline redirection function (will obsolete).
|
- Renamed `IsMouseHoveringAnyWindow()` to `IsAnyWindowHovered()` for consistency. Kept inline redirection function (will obsolete).
|
||||||
- Renamed `ImGuiCol_Columns***` enums to `ImGuiCol_Separator***`. Kept redirection enums (will obsolete).
|
- Renamed `ImGuiCol_Columns***` enums to `ImGuiCol_Separator***`. Kept redirection enums (will obsolete).
|
||||||
- Renamed `ImGuiSetCond***` types and enums to `ImGuiCond***`. Kept redirection enums (will obsolete).
|
- Renamed `ImGuiSetCond***` types and enums to `ImGuiCond***`. Kept redirection enums (will obsolete).
|
||||||
- Renamed `GetStyleColName()` to `GetStyleColorName()` for consistency. Unlikely to be used by end-user!
|
- Renamed `GetStyleColName()` to `GetStyleColorName()` for consistency. Unlikely to be used by end-user!
|
||||||
- Added `PushStyleColor(ImGuiCol idx, ImU32 col)` overload, which _might_ cause an "ambiguous call" compilation error if you are using ImColor() with implicit cast. Cast to ImU32 or ImVec4 explicitly to fix.
|
- Added `PushStyleColor(ImGuiCol idx, ImU32 col)` overload, which _might_ cause an "ambiguous call" compilation error if you are using ImColor() with implicit cast. Cast to ImU32 or ImVec4 explicitly to fix.
|
||||||
- Marked the weird `IMGUI_ONCE_UPON_A_FRAME` helper macro as obsolete. Prefer using the more explicit `ImGuiOnceUponAFrame`.
|
- Marked the weird `IMGUI_ONCE_UPON_A_FRAME` helper macro as obsolete. Prefer using the more explicit `ImGuiOnceUponAFrame`.
|
||||||
- Changed `ColorEdit4(const char* label, float col[4], bool show_alpha = true)` signature to `ColorEdit4(const char* label, float col[4], ImGuiColorEditFlags flags = 0)`, where flags 0x01 is a safe no-op (hello dodgy backward compatibility!). The new `ColorEdit4`/`ColorPicker4` functions have lots of available flags! Check and run the demo window, under "Color/Picker Widgets", to understand the various new options.
|
- Changed `ColorEdit4(const char* label, float col[4], bool show_alpha = true)` signature to `ColorEdit4(const char* label, float col[4], ImGuiColorEditFlags flags = 0)`, where flags 0x01 is a safe no-op (hello dodgy backward compatibility!). The new `ColorEdit4`/`ColorPicker4` functions have lots of available flags! Check and run the demo window, under "Color/Picker Widgets", to understand the various new options.
|
||||||
- Changed signature of `ColorButton(ImVec4 col, bool small_height = false, bool outline_border = true)` to `ColorButton(const char* desc_id, ImVec4 col, ImGuiColorEditFlags flags = 0, ImVec2 size = ImVec2(0,0))`. This function was rarely used and was very dodgy (no explicit ID!).
|
- Changed signature of `ColorButton(ImVec4 col, bool small_height = false, bool outline_border = true)` to `ColorButton(const char* desc_id, ImVec4 col, ImGuiColorEditFlags flags = 0, ImVec2 size = ImVec2(0,0))`. This function was rarely used and was very dodgy (no explicit ID!).
|
||||||
- Changed `BeginPopupContextWindow(bool also_over_items=true, const char* str_id=NULL, int mouse_button=1)` signature to `(const char* str_id=NULL, int mouse_button=1, bool also_over_items=true)`. This is perhaps the most aggressive change in this update, but note that the majority of users relied on default parameters completely, so this will affect only a fraction of users of this already rarely used function.
|
- Changed `BeginPopupContextWindow(bool also_over_items=true, const char* str_id=NULL, int mouse_button=1)` signature to `(const char* str_id=NULL, int mouse_button=1, bool also_over_items=true)`. This is perhaps the most aggressive change in this update, but note that the majority of users relied on default parameters completely, so this will affect only a fraction of users of this already rarely used function.
|
||||||
- Removed `IsPosHoveringAnyWindow()`, which was partly broken and misleading. In the vast majority of cases, people using that function wanted to use `io.WantCaptureMouse` flag. Replaced with IM_ASSERT + comment redirecting user to `io.WantCaptureMouse`. (#1237)
|
- Removed `IsPosHoveringAnyWindow()`, which was partly broken and misleading. In the vast majority of cases, people using that function wanted to use `io.WantCaptureMouse` flag. Replaced with IM_ASSERT + comment redirecting user to `io.WantCaptureMouse`. (#1237)
|
||||||
@ -519,7 +734,7 @@ Other Changes:
|
|||||||
- Fixed `PushID()`/`PopID()` from marking parent window as Accessed (which needlessly woke up the root "Debug" window when used outside of a regular window). (#747)
|
- Fixed `PushID()`/`PopID()` from marking parent window as Accessed (which needlessly woke up the root "Debug" window when used outside of a regular window). (#747)
|
||||||
- Fixed an assert when calling `CloseCurrentPopup()` twice in a row. [@nem0]
|
- Fixed an assert when calling `CloseCurrentPopup()` twice in a row. [@nem0]
|
||||||
- Window size can be loaded from .ini data even if ImGuiWindowFlags_NoResize flag is set. (#1048, #1056)
|
- Window size can be loaded from .ini data even if ImGuiWindowFlags_NoResize flag is set. (#1048, #1056)
|
||||||
- Columns: Added `SetColumnWidth()`. (#913) [@ggtucker]
|
- Columns: Added `SetColumnWidth()`. (#913) [@ggtucker]
|
||||||
- Columns: Dragging a column preserve its width by default. (#913) [@ggtucker]
|
- Columns: Dragging a column preserve its width by default. (#913) [@ggtucker]
|
||||||
- Columns: Fixed first column appearing wider than others. (#1266)
|
- Columns: Fixed first column appearing wider than others. (#1266)
|
||||||
- Columns: Fixed allocating space on the right-most side with the assumption of a vertical scrollbar. The space is only allocated when needed. (#125, #913, #893, #1138)
|
- Columns: Fixed allocating space on the right-most side with the assumption of a vertical scrollbar. The space is only allocated when needed. (#125, #913, #893, #1138)
|
||||||
@ -533,25 +748,27 @@ Other Changes:
|
|||||||
- Scrolling: `SetScrollHere()`, `SetScrollFromPosY()`: Fixed Y scroll aiming when Horizontal Scrollbar is enabled. (#665).
|
- Scrolling: `SetScrollHere()`, `SetScrollFromPosY()`: Fixed Y scroll aiming when Horizontal Scrollbar is enabled. (#665).
|
||||||
- [Windows] Clipboard: Fixed not closing Win32 clipboard on early open failure path. (#1264)
|
- [Windows] Clipboard: Fixed not closing Win32 clipboard on early open failure path. (#1264)
|
||||||
- Removed an unnecessary dependency on int64_t which failed on some older compilers.
|
- Removed an unnecessary dependency on int64_t which failed on some older compilers.
|
||||||
- Demo: Rearranged everything under Widgets in a more consistent way.
|
- Demo: Rearranged everything under Widgets in a more consistent way.
|
||||||
- Demo: Columns: Added Horizontal Scrolling demo. Tweaked another Columns demo. (#519, #125, #913)
|
- Demo: Columns: Added Horizontal Scrolling demo. Tweaked another Columns demo. (#519, #125, #913)
|
||||||
- Examples: OpenGL: Various makefiles for MINGW, Linux. (#1209, #1229, #1209) [@fr500, @acda]
|
- Examples: OpenGL: Various makefiles for MINGW, Linux. (#1209, #1229, #1209) [@fr500, @acda]
|
||||||
- Examples: Enabled vsync by default in example applications, so it doesn't confuse people that the sample run at 2000+ fps and waste an entire CPU. (#1213, #1151).
|
- Examples: Enabled vsync by default in example applications, so it doesn't confuse people that the sample run at 2000+ fps and waste an entire CPU. (#1213, #1151).
|
||||||
- Various other small fixes, tweaks, comments, optimizations.
|
- Various other small fixes, tweaks, comments, optimizations.
|
||||||
|
|
||||||
|
|
||||||
|
-----------------------------------------------------------------------
|
||||||
|
VERSION 1.50 (2017-06-02)
|
||||||
-----------------------------------------------------------------------
|
-----------------------------------------------------------------------
|
||||||
|
|
||||||
VERSION 1.50 (2017-06-02)
|
|
||||||
Decorated log: https://github.com/ocornut/imgui/releases/tag/v1.50
|
Decorated log: https://github.com/ocornut/imgui/releases/tag/v1.50
|
||||||
|
|
||||||
Breaking Changes:
|
Breaking Changes:
|
||||||
|
|
||||||
- Added a void* user_data parameter to Clipboard function handlers. (#875)
|
- Added a void* user_data parameter to Clipboard function handlers. (#875)
|
||||||
- SameLine(x) with x>0.0f is now relative to left of column/group if any, and not always to left of window. This was sort of always the intent and hopefully breakage should be minimal.
|
- SameLine(x) with x>0.0f is now relative to left of column/group if any, and not always to left of window. This was sort of always the intent and hopefully breakage should be minimal.
|
||||||
- Renamed ImDrawList::PathFill() - rarely used directly - to ImDrawList::PathFillConvex() for clarity and consistency.
|
- Renamed ImDrawList::PathFill() - rarely used directly - to ImDrawList::PathFillConvex() for clarity and consistency.
|
||||||
- Removed ImFontConfig::MergeGlyphCenterV in favor of a more multipurpose ImFontConfig::GlyphOffset.
|
- Removed ImFontConfig::MergeGlyphCenterV in favor of a more multipurpose ImFontConfig::GlyphOffset.
|
||||||
- Style: style.WindowTitleAlign is now a ImVec2 (ImGuiAlign enum was removed). set to (0.5f,0.5f) for horizontal+vertical centering, (0.0f,0.0f) for upper-left, etc.
|
- Style: style.WindowTitleAlign is now a ImVec2 (ImGuiAlign enum was removed). set to (0.5f,0.5f) for horizontal+vertical centering, (0.0f,0.0f) for upper-left, etc.
|
||||||
- BeginChild(const char*) now applies the stack id to the provided label, consistently with other functions as it should always have been. It shouldn't affect you unless (extremely unlikely) you were appending multiple times to a same child from different locations of the stack id. If that's the case, generate an id with GetId() and use it instead of passing string to BeginChild().
|
- BeginChild(const char*) now applies the stack id to the provided label, consistently with other functions as it should always have been. It shouldn't affect you unless (extremely unlikely) you were appending multiple times to a same child from different locations of the stack id. If that's the case, generate an id with GetId() and use it instead of passing string to BeginChild().
|
||||||
|
|
||||||
Other Changes:
|
Other Changes:
|
||||||
|
|
||||||
@ -610,9 +827,9 @@ Other Changes:
|
|||||||
- Clipboard: Added a void* user_data parameter to Clipboard function handlers. (#875) (BREAKING API)
|
- Clipboard: Added a void* user_data parameter to Clipboard function handlers. (#875) (BREAKING API)
|
||||||
- Internals: Refactor internal text alignment options to use ImVec2, removed ImGuiAlign. (#842, #222)
|
- Internals: Refactor internal text alignment options to use ImVec2, removed ImGuiAlign. (#842, #222)
|
||||||
- Internals: Renamed ImLoadFileToMemory to ImFileLoadToMemory to be consistent with ImFileOpen + fix mismatching .h name. (#917)
|
- Internals: Renamed ImLoadFileToMemory to ImFileLoadToMemory to be consistent with ImFileOpen + fix mismatching .h name. (#917)
|
||||||
- Windows: Fixed Windows default clipboard handler leaving its buffer unfreed on application's exit. (#714)
|
- OS/Windows: Fixed Windows default clipboard handler leaving its buffer unfreed on application's exit. (#714)
|
||||||
- Windows: No default IME handler when compiling for Windows using GCC. (#738)
|
- OS/Windows: No default IME handler when compiling for Windows using GCC. (#738)
|
||||||
- Windows: Now using _wfopen() instead of fopen() to allow passing in paths/filenames with UTF-8 characters. (#917)
|
- OS/Windows: Now using _wfopen() instead of fopen() to allow passing in paths/filenames with UTF-8 characters. (#917)
|
||||||
- Tools: binary_to_compressed_c: Avoid ?? trigraphs sequences in string outputs which break some older compilers. (#839)
|
- Tools: binary_to_compressed_c: Avoid ?? trigraphs sequences in string outputs which break some older compilers. (#839)
|
||||||
- Demo: Added an extra 3-way columns demo.
|
- Demo: Added an extra 3-way columns demo.
|
||||||
- Demo: ShowStyleEditor: show font character map / grid in more details.
|
- Demo: ShowStyleEditor: show font character map / grid in more details.
|
||||||
@ -621,7 +838,7 @@ Other Changes:
|
|||||||
- Examples: Accessing ImVector fields directly, feel less stl-ey. (#810)
|
- Examples: Accessing ImVector fields directly, feel less stl-ey. (#810)
|
||||||
- Examples: OpenGL*: Saving/restoring existing scissor rectangle for completeness. (#807)
|
- Examples: OpenGL*: Saving/restoring existing scissor rectangle for completeness. (#807)
|
||||||
- Examples: OpenGL*: Saving/restoring active texture number (the value modified by glActiveTexture). (#1087, #1088, #1116)
|
- Examples: OpenGL*: Saving/restoring active texture number (the value modified by glActiveTexture). (#1087, #1088, #1116)
|
||||||
- Examples: OpenGL*: Saving/restoring separate color/alpha blend functions correctly. (#1120) [@greggman]
|
- Examples: OpenGL*: Saving/restoring separate color/alpha blend functions correctly. (#1120) [@greggman]
|
||||||
- Examples: OpenGL2: Uploading font texture as RGBA32 to increase compatibility with users shaders for beginners. (#824)
|
- Examples: OpenGL2: Uploading font texture as RGBA32 to increase compatibility with users shaders for beginners. (#824)
|
||||||
- Examples: Vulkan: Countless fixes and improvements. (#785, #804, #910, #1017, #1039, #1041, #1042, #1043, #1080) [@martty, @Loftilus, @ParticlePeter, @SaschaWillems]
|
- Examples: Vulkan: Countless fixes and improvements. (#785, #804, #910, #1017, #1039, #1041, #1042, #1043, #1080) [@martty, @Loftilus, @ParticlePeter, @SaschaWillems]
|
||||||
- Examples: DirectX9/10/10: Only call SetCursor(NULL) is io.MouseDrawCursor is set. (#585, #909)
|
- Examples: DirectX9/10/10: Only call SetCursor(NULL) is io.MouseDrawCursor is set. (#585, #909)
|
||||||
@ -633,9 +850,11 @@ Other Changes:
|
|||||||
- Added various links to language/engine bindings.
|
- Added various links to language/engine bindings.
|
||||||
- Various other minor fixes, tweaks, comments, optimizations.
|
- Various other minor fixes, tweaks, comments, optimizations.
|
||||||
|
|
||||||
|
|
||||||
|
-----------------------------------------------------------------------
|
||||||
|
VERSION 1.49 (2016-05-09)
|
||||||
-----------------------------------------------------------------------
|
-----------------------------------------------------------------------
|
||||||
|
|
||||||
VERSION 1.49 (2016-05-09)
|
|
||||||
Decorated log: https://github.com/ocornut/imgui/releases/tag/v1.49
|
Decorated log: https://github.com/ocornut/imgui/releases/tag/v1.49
|
||||||
|
|
||||||
Breaking Changes:
|
Breaking Changes:
|
||||||
@ -683,7 +902,7 @@ Other changes:
|
|||||||
- Relative rendering of order of Child windows creation is preserved, to allow more control with overlapping children. (#595)
|
- Relative rendering of order of Child windows creation is preserved, to allow more control with overlapping children. (#595)
|
||||||
- Fixed GetWindowContentRegionMax() being off by ScrollbarSize amount when explicit SizeContents is set.
|
- Fixed GetWindowContentRegionMax() being off by ScrollbarSize amount when explicit SizeContents is set.
|
||||||
- Indent(), Unindent(): optional non-default indenting width. (#324, #581)
|
- Indent(), Unindent(): optional non-default indenting width. (#324, #581)
|
||||||
- Bullet(), BulletText(): Slightly bigger. Less polygons.
|
- Bullet(), BulletText(): Slightly bigger. Less polygons.
|
||||||
- ButtonBehavior(): fixed subtle old bug when a repeating button would also return true on mouse release (barely noticeable unless RepeatRate is set to be very slow). (#656)
|
- ButtonBehavior(): fixed subtle old bug when a repeating button would also return true on mouse release (barely noticeable unless RepeatRate is set to be very slow). (#656)
|
||||||
- BeginMenu(): a menu that becomes disabled while open gets closed down, facilitate user's code. (#126)
|
- BeginMenu(): a menu that becomes disabled while open gets closed down, facilitate user's code. (#126)
|
||||||
- BeginGroup(): fixed using within Columns set. (#630)
|
- BeginGroup(): fixed using within Columns set. (#630)
|
||||||
@ -709,9 +928,11 @@ Other changes:
|
|||||||
- Examples: SDL: Initialize video+timer subsystem only.
|
- Examples: SDL: Initialize video+timer subsystem only.
|
||||||
- Examples: Apple/iOS: lowered XCode project deployment target from 10.7 to 10.11. (#598, #575)
|
- Examples: Apple/iOS: lowered XCode project deployment target from 10.7 to 10.11. (#598, #575)
|
||||||
|
|
||||||
|
|
||||||
|
-----------------------------------------------------------------------
|
||||||
|
VERSION 1.48 (2016-04-09)
|
||||||
-----------------------------------------------------------------------
|
-----------------------------------------------------------------------
|
||||||
|
|
||||||
VERSION 1.48 (2016-04-09)
|
|
||||||
Decorated log: https://github.com/ocornut/imgui/releases/tag/v1.48
|
Decorated log: https://github.com/ocornut/imgui/releases/tag/v1.48
|
||||||
|
|
||||||
Breaking Changes:
|
Breaking Changes:
|
||||||
@ -730,7 +951,7 @@ Other Changes:
|
|||||||
- Added ImGuiWindowFlags_ForceVerticalScrollbar, ImGuiWindowFlags_ForceHorizontalScrollbar flags. (#476)
|
- Added ImGuiWindowFlags_ForceVerticalScrollbar, ImGuiWindowFlags_ForceHorizontalScrollbar flags. (#476)
|
||||||
- Added IM_COL32 macros to generate a U32 packed color, convenient for direct use of ImDrawList api. (#346)
|
- Added IM_COL32 macros to generate a U32 packed color, convenient for direct use of ImDrawList api. (#346)
|
||||||
- Added GetFontTexUvWhitePixel() helper, convenient for direct use of ImDrawList api.
|
- Added GetFontTexUvWhitePixel() helper, convenient for direct use of ImDrawList api.
|
||||||
- Selectable(): Added ImGuiSelectableFlags_AllowDoubleClick flag to allow user reacting on double-click. (@zapolnov) (#516)
|
- Selectable(): Added ImGuiSelectableFlags_AllowDoubleClick flag to allow user reacting on double-click. (@zapolnov) (#516)
|
||||||
- Begin(): made the close button explicitly set the boolean to false instead of toggling it. (#499)
|
- Begin(): made the close button explicitly set the boolean to false instead of toggling it. (#499)
|
||||||
- BeginChild()/EndChild(): fixed incorrect layout to allow widgets submitted after an auto-fitted child window. (#540)
|
- BeginChild()/EndChild(): fixed incorrect layout to allow widgets submitted after an auto-fitted child window. (#540)
|
||||||
- BeginChild(): Added ImGuiWindowFlags_AlwaysUseWindowPadding flag to ensure non-bordered child window uses window padding. (#462)
|
- BeginChild(): Added ImGuiWindowFlags_AlwaysUseWindowPadding flag to ensure non-bordered child window uses window padding. (#462)
|
||||||
@ -750,7 +971,7 @@ Other Changes:
|
|||||||
- BeginPopupContextItem(), BeginPopupContextWindow(): added early out optimization.
|
- BeginPopupContextItem(), BeginPopupContextWindow(): added early out optimization.
|
||||||
- CaptureKeyboardFromApp() / CaptureMouseFromApp(): added argument to allow clearing the capture flag. (#533)
|
- CaptureKeyboardFromApp() / CaptureMouseFromApp(): added argument to allow clearing the capture flag. (#533)
|
||||||
- ImDrawList: Fixed index-overflow check broken by AddText() casting current index back to ImDrawIdx. (#514)
|
- ImDrawList: Fixed index-overflow check broken by AddText() casting current index back to ImDrawIdx. (#514)
|
||||||
- ImDrawList: Fixed incorrect removal of trailing draw command if it is a callback command.
|
- ImDrawList: Fixed incorrect removal of trailing draw command if it is a callback command.
|
||||||
- ImDrawList: Allow windows with only a callback only to be functional. (#524)
|
- ImDrawList: Allow windows with only a callback only to be functional. (#524)
|
||||||
- ImDrawList: Fixed ImDrawList::AddRect() which used to render a rectangle 1 px too large on each axis. (#457)
|
- ImDrawList: Fixed ImDrawList::AddRect() which used to render a rectangle 1 px too large on each axis. (#457)
|
||||||
- ImDrawList: Fixed ImDrawList::AddCircle() to fit precisely within bounding box like AddCircleFilled() and AddRectFilled(). (#457)
|
- ImDrawList: Fixed ImDrawList::AddCircle() to fit precisely within bounding box like AddCircleFilled() and AddRectFilled(). (#457)
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
// You can use ImGui::SetAllocatorFunctions() before calling ImGui::CreateContext() to rewire memory allocation functions.
|
// You can use ImGui::SetAllocatorFunctions() before calling ImGui::CreateContext() to rewire memory allocation functions.
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
// A) You may edit imconfig.h (and not overwrite it when updating imgui, or maintain a patch/branch with your modifications to imconfig.h)
|
// A) You may edit imconfig.h (and not overwrite it when updating imgui, or maintain a patch/branch with your modifications to imconfig.h)
|
||||||
// B) or add configuration directives in your own file and compile with #define IMGUI_USER_CONFIG "myfilename.h"
|
// B) or add configuration directives in your own file and compile with #define IMGUI_USER_CONFIG "myfilename.h"
|
||||||
// If you do so you need to make sure that configuration settings are defined consistently _everywhere_ dear imgui is used, which include
|
// If you do so you need to make sure that configuration settings are defined consistently _everywhere_ dear imgui is used, which include
|
||||||
// the imgui*.cpp files but also _any_ of your code that uses imgui. This is because some compile-time options have an affect on data structures.
|
// the imgui*.cpp files but also _any_ of your code that uses imgui. This is because some compile-time options have an affect on data structures.
|
||||||
// Defining those options in imconfig.h will ensure every compilation unit gets to see the same data structure layouts.
|
// Defining those options in imconfig.h will ensure every compilation unit gets to see the same data structure layouts.
|
||||||
@ -15,29 +15,30 @@
|
|||||||
|
|
||||||
//---- Define assertion handler. Defaults to calling assert().
|
//---- Define assertion handler. Defaults to calling assert().
|
||||||
//#define IM_ASSERT(_EXPR) MyAssert(_EXPR)
|
//#define IM_ASSERT(_EXPR) MyAssert(_EXPR)
|
||||||
|
//#define IM_ASSERT(_EXPR) ((void)(_EXPR)) // Disable asserts
|
||||||
|
|
||||||
//---- Define attributes of all API symbols declarations, e.g. for DLL under Windows.
|
//---- Define attributes of all API symbols declarations, e.g. for DLL under Windows.
|
||||||
//#define IMGUI_API __declspec( dllexport )
|
//#define IMGUI_API __declspec( dllexport )
|
||||||
//#define IMGUI_API __declspec( dllimport )
|
//#define IMGUI_API __declspec( dllimport )
|
||||||
|
|
||||||
//---- Don't define obsolete functions/enums names. Consider enabling from time to time after updating to avoid using soon-to-be obsolete function/names
|
//---- Don't define obsolete functions/enums names. Consider enabling from time to time after updating to avoid using soon-to-be obsolete function/names.
|
||||||
//#define IMGUI_DISABLE_OBSOLETE_FUNCTIONS
|
//#define IMGUI_DISABLE_OBSOLETE_FUNCTIONS
|
||||||
|
|
||||||
//---- Don't implement default handlers for Windows (so as not to link with certain functions)
|
|
||||||
//#define IMGUI_DISABLE_WIN32_DEFAULT_CLIPBOARD_FUNCTIONS // Don't use and link with OpenClipboard/GetClipboardData/CloseClipboard etc.
|
|
||||||
//#define IMGUI_DISABLE_WIN32_DEFAULT_IME_FUNCTIONS // Don't use and link with ImmGetContext/ImmSetCompositionWindow.
|
|
||||||
|
|
||||||
//---- Don't implement demo windows functionality (ShowDemoWindow()/ShowStyleEditor()/ShowUserGuide() methods will be empty)
|
//---- Don't implement demo windows functionality (ShowDemoWindow()/ShowStyleEditor()/ShowUserGuide() methods will be empty)
|
||||||
//---- It is very strongly recommended to NOT disable the demo windows during development. Please read the comments in imgui_demo.cpp.
|
//---- It is very strongly recommended to NOT disable the demo windows during development. Please read the comments in imgui_demo.cpp.
|
||||||
//#define IMGUI_DISABLE_DEMO_WINDOWS
|
//#define IMGUI_DISABLE_DEMO_WINDOWS
|
||||||
|
|
||||||
//---- Don't implement ImFormatString(), ImFormatStringV() so you can reimplement them yourself.
|
//---- Don't implement some functions to reduce linkage requirements.
|
||||||
//#define IMGUI_DISABLE_FORMAT_STRING_FUNCTIONS
|
//#define IMGUI_DISABLE_WIN32_DEFAULT_CLIPBOARD_FUNCTIONS // [Win32] Don't implement default clipboard handler. Won't use and link with OpenClipboard/GetClipboardData/CloseClipboard etc.
|
||||||
|
//#define IMGUI_DISABLE_WIN32_DEFAULT_IME_FUNCTIONS // [Win32] Don't implement default IME handler. Won't use and link with ImmGetContext/ImmSetCompositionWindow.
|
||||||
|
//#define IMGUI_DISABLE_FORMAT_STRING_FUNCTIONS // Don't implement ImFormatString/ImFormatStringV so you can implement them yourself if you don't want to link with vsnprintf.
|
||||||
|
//#define IMGUI_DISABLE_MATH_FUNCTIONS // Don't implement ImFabs/ImSqrt/ImPow/ImFmod/ImCos/ImSin/ImAcos/ImAtan2 wrapper so you can implement them yourself. Declare your prototypes in imconfig.h.
|
||||||
|
//#define IMGUI_DISABLE_DEFAULT_ALLOCATORS // Don't implement default allocators calling malloc()/free() to avoid linking with them. You will need to call ImGui::SetAllocatorFunctions().
|
||||||
|
|
||||||
//---- Include imgui_user.h at the end of imgui.h as a convenience
|
//---- Include imgui_user.h at the end of imgui.h as a convenience
|
||||||
//#define IMGUI_INCLUDE_IMGUI_USER_H
|
//#define IMGUI_INCLUDE_IMGUI_USER_H
|
||||||
|
|
||||||
//---- Pack colors to BGRA8 instead of RGBA8 (if you needed to convert from one to another anyway)
|
//---- Pack colors to BGRA8 instead of RGBA8 (to avoid converting from one to another)
|
||||||
//#define IMGUI_USE_BGRA_PACKED_COLOR
|
//#define IMGUI_USE_BGRA_PACKED_COLOR
|
||||||
|
|
||||||
//---- Avoid multiple STB libraries implementations, or redefine path/filenames to prioritize another version
|
//---- Avoid multiple STB libraries implementations, or redefine path/filenames to prioritize another version
|
||||||
@ -47,7 +48,7 @@
|
|||||||
//#define IMGUI_DISABLE_STB_TRUETYPE_IMPLEMENTATION
|
//#define IMGUI_DISABLE_STB_TRUETYPE_IMPLEMENTATION
|
||||||
//#define IMGUI_DISABLE_STB_RECT_PACK_IMPLEMENTATION
|
//#define IMGUI_DISABLE_STB_RECT_PACK_IMPLEMENTATION
|
||||||
|
|
||||||
//---- Define constructor and implicit cast operators to convert back<>forth from your math types and ImVec2/ImVec4.
|
//---- Define constructor and implicit cast operators to convert back<>forth between your math types and ImVec2/ImVec4.
|
||||||
// This will be inlined as part of ImVec2 and ImVec4 class declarations.
|
// This will be inlined as part of ImVec2 and ImVec4 class declarations.
|
||||||
/*
|
/*
|
||||||
#define IM_VEC2_CLASS_EXTRA \
|
#define IM_VEC2_CLASS_EXTRA \
|
||||||
|
594
Source/ThirdParty/ImGuiLibrary/Include/imgui.h
vendored
594
Source/ThirdParty/ImGuiLibrary/Include/imgui.h
vendored
File diff suppressed because it is too large
Load Diff
22
Source/ThirdParty/ImGuiLibrary/Include/misc/stl/imgui_stl.h
vendored
Normal file
22
Source/ThirdParty/ImGuiLibrary/Include/misc/stl/imgui_stl.h
vendored
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
// imgui_stl.h
|
||||||
|
// Wrappers for C++ standard library (STL) types (std::string, etc.)
|
||||||
|
// This is also an example of how you may wrap your own similar types.
|
||||||
|
|
||||||
|
// Compatibility:
|
||||||
|
// - std::string support is only guaranteed to work from C++11.
|
||||||
|
// If you try to use it pre-C++11, please share your findings (w/ info about compiler/architecture)
|
||||||
|
|
||||||
|
// Changelog:
|
||||||
|
// - v0.10: Initial version. Added InputText() / InputTextMultiline() calls with std::string
|
||||||
|
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include <string>
|
||||||
|
|
||||||
|
namespace ImGui
|
||||||
|
{
|
||||||
|
// ImGui::InputText() with std::string
|
||||||
|
// Because text input needs dynamic resizing, we need to setup a callback to grow the capacity
|
||||||
|
IMGUI_API bool InputText(const char* label, std::string* str, ImGuiInputTextFlags flags = 0, ImGuiInputTextCallback callback = NULL, void* user_data = NULL);
|
||||||
|
IMGUI_API bool InputTextMultiline(const char* label, std::string* str, const ImVec2& size = ImVec2(0, 0), ImGuiInputTextFlags flags = 0, ImGuiInputTextCallback callback = NULL, void* user_data = NULL);
|
||||||
|
}
|
12943
Source/ThirdParty/ImGuiLibrary/Private/imgui.cpp
vendored
12943
Source/ThirdParty/ImGuiLibrary/Private/imgui.cpp
vendored
File diff suppressed because it is too large
Load Diff
1215
Source/ThirdParty/ImGuiLibrary/Private/imgui_demo.cpp
vendored
1215
Source/ThirdParty/ImGuiLibrary/Private/imgui_demo.cpp
vendored
File diff suppressed because it is too large
Load Diff
@ -1,41 +1,56 @@
|
|||||||
// dear imgui, v1.61 WIP
|
// dear imgui, v1.65
|
||||||
// (drawing and font code)
|
// (drawing and font code)
|
||||||
|
|
||||||
// Contains implementation for
|
/*
|
||||||
// - Default styles
|
|
||||||
// - ImDrawList
|
Index of this file:
|
||||||
// - ImDrawData
|
|
||||||
// - ImFontAtlas
|
// [SECTION] STB libraries implementation
|
||||||
// - ImFont
|
// [SECTION] Style functions
|
||||||
// - Default font data
|
// [SECTION] ImDrawList
|
||||||
|
// [SECTION] ImDrawData
|
||||||
|
// [SECTION] Helpers ShadeVertsXXX functions
|
||||||
|
// [SECTION] ImFontConfig
|
||||||
|
// [SECTION] ImFontAtlas
|
||||||
|
// [SECTION] ImFontAtlas glyph ranges helpers + GlyphRangesBuilder
|
||||||
|
// [SECTION] ImFont
|
||||||
|
// [SECTION] Internal Render Helpers
|
||||||
|
// [SECTION] Decompression code
|
||||||
|
// [SECTION] Default font data (ProggyClean.ttf)
|
||||||
|
|
||||||
|
*/
|
||||||
|
|
||||||
#if defined(_MSC_VER) && !defined(_CRT_SECURE_NO_WARNINGS)
|
#if defined(_MSC_VER) && !defined(_CRT_SECURE_NO_WARNINGS)
|
||||||
#define _CRT_SECURE_NO_WARNINGS
|
#define _CRT_SECURE_NO_WARNINGS
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "imgui.h"
|
#include "imgui.h"
|
||||||
|
#ifndef IMGUI_DEFINE_MATH_OPERATORS
|
||||||
#define IMGUI_DEFINE_MATH_OPERATORS
|
#define IMGUI_DEFINE_MATH_OPERATORS
|
||||||
|
#endif
|
||||||
#include "imgui_internal.h"
|
#include "imgui_internal.h"
|
||||||
|
|
||||||
#include <stdio.h> // vsnprintf, sscanf, printf
|
#include <stdio.h> // vsnprintf, sscanf, printf
|
||||||
#if !defined(alloca)
|
#if !defined(alloca)
|
||||||
#ifdef _WIN32
|
#if defined(__GLIBC__) || defined(__sun) || defined(__CYGWIN__)
|
||||||
|
#include <alloca.h> // alloca (glibc uses <alloca.h>. Note that Cygwin may have _WIN32 defined, so the order matters here)
|
||||||
|
#elif defined(_WIN32)
|
||||||
#include <malloc.h> // alloca
|
#include <malloc.h> // alloca
|
||||||
#if !defined(alloca)
|
#if !defined(alloca)
|
||||||
#define alloca _alloca // for clang with MS Codegen
|
#define alloca _alloca // for clang with MS Codegen
|
||||||
#endif
|
#endif
|
||||||
#elif defined(__GLIBC__) || defined(__sun)
|
|
||||||
#include <alloca.h> // alloca
|
|
||||||
#else
|
#else
|
||||||
#include <stdlib.h> // alloca
|
#include <stdlib.h> // alloca
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
// Visual Studio warnings
|
||||||
#ifdef _MSC_VER
|
#ifdef _MSC_VER
|
||||||
#pragma warning (disable: 4505) // unreferenced local function has been removed (stb stuff)
|
#pragma warning (disable: 4505) // unreferenced local function has been removed (stb stuff)
|
||||||
#pragma warning (disable: 4996) // 'This function or variable may be unsafe': strcpy, strdup, sprintf, vsnprintf, sscanf, fopen
|
#pragma warning (disable: 4996) // 'This function or variable may be unsafe': strcpy, strdup, sprintf, vsnprintf, sscanf, fopen
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
// Clang/GCC warnings with -Weverything
|
||||||
#ifdef __clang__
|
#ifdef __clang__
|
||||||
#pragma clang diagnostic ignored "-Wold-style-cast" // warning : use of old-style cast // yes, they are more terse.
|
#pragma clang diagnostic ignored "-Wold-style-cast" // warning : use of old-style cast // yes, they are more terse.
|
||||||
#pragma clang diagnostic ignored "-Wfloat-equal" // warning : comparing floating point with == or != is unsafe // storing and comparing against same constants ok.
|
#pragma clang diagnostic ignored "-Wfloat-equal" // warning : comparing floating point with == or != is unsafe // storing and comparing against same constants ok.
|
||||||
@ -54,10 +69,13 @@
|
|||||||
#pragma GCC diagnostic ignored "-Wunused-function" // warning: 'xxxx' defined but not used
|
#pragma GCC diagnostic ignored "-Wunused-function" // warning: 'xxxx' defined but not used
|
||||||
#pragma GCC diagnostic ignored "-Wdouble-promotion" // warning: implicit conversion from 'float' to 'double' when passing argument to function
|
#pragma GCC diagnostic ignored "-Wdouble-promotion" // warning: implicit conversion from 'float' to 'double' when passing argument to function
|
||||||
#pragma GCC diagnostic ignored "-Wconversion" // warning: conversion to 'xxxx' from 'xxxx' may alter its value
|
#pragma GCC diagnostic ignored "-Wconversion" // warning: conversion to 'xxxx' from 'xxxx' may alter its value
|
||||||
|
#if __GNUC__ >= 8
|
||||||
|
#pragma GCC diagnostic ignored "-Wclass-memaccess" // warning: 'memset/memcpy' clearing/writing an object of type 'xxxx' with no trivial copy-assignment; use assignment or value-initialization instead
|
||||||
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
//-------------------------------------------------------------------------
|
//-------------------------------------------------------------------------
|
||||||
// STB libraries implementation
|
// [SECTION] STB libraries implementation
|
||||||
//-------------------------------------------------------------------------
|
//-------------------------------------------------------------------------
|
||||||
|
|
||||||
// Compile time options:
|
// Compile time options:
|
||||||
@ -94,21 +112,28 @@ namespace IMGUI_STB_NAMESPACE
|
|||||||
#ifndef STB_RECT_PACK_IMPLEMENTATION // in case the user already have an implementation in the _same_ compilation unit (e.g. unity builds)
|
#ifndef STB_RECT_PACK_IMPLEMENTATION // in case the user already have an implementation in the _same_ compilation unit (e.g. unity builds)
|
||||||
#ifndef IMGUI_DISABLE_STB_RECT_PACK_IMPLEMENTATION
|
#ifndef IMGUI_DISABLE_STB_RECT_PACK_IMPLEMENTATION
|
||||||
#define STBRP_STATIC
|
#define STBRP_STATIC
|
||||||
#define STBRP_ASSERT(x) IM_ASSERT(x)
|
#define STBRP_ASSERT(x) IM_ASSERT(x)
|
||||||
|
#define STBRP_SORT ImQsort
|
||||||
#define STB_RECT_PACK_IMPLEMENTATION
|
#define STB_RECT_PACK_IMPLEMENTATION
|
||||||
#endif
|
#endif
|
||||||
#ifdef IMGUI_STB_RECT_PACK_FILENAME
|
#ifdef IMGUI_STB_RECT_PACK_FILENAME
|
||||||
#include IMGUI_STB_RECT_PACK_FILENAME
|
#include IMGUI_STB_RECT_PACK_FILENAME
|
||||||
#else
|
#else
|
||||||
#include "stb_rect_pack.h"
|
#include "imstb_rectpack.h"
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef STB_TRUETYPE_IMPLEMENTATION // in case the user already have an implementation in the _same_ compilation unit (e.g. unity builds)
|
#ifndef STB_TRUETYPE_IMPLEMENTATION // in case the user already have an implementation in the _same_ compilation unit (e.g. unity builds)
|
||||||
#ifndef IMGUI_DISABLE_STB_TRUETYPE_IMPLEMENTATION
|
#ifndef IMGUI_DISABLE_STB_TRUETYPE_IMPLEMENTATION
|
||||||
#define STBTT_malloc(x,u) ((void)(u), ImGui::MemAlloc(x))
|
#define STBTT_malloc(x,u) ((void)(u), ImGui::MemAlloc(x))
|
||||||
#define STBTT_free(x,u) ((void)(u), ImGui::MemFree(x))
|
#define STBTT_free(x,u) ((void)(u), ImGui::MemFree(x))
|
||||||
#define STBTT_assert(x) IM_ASSERT(x)
|
#define STBTT_assert(x) IM_ASSERT(x)
|
||||||
|
#define STBTT_fmod(x,y) ImFmod(x,y)
|
||||||
|
#define STBTT_sqrt(x) ImSqrt(x)
|
||||||
|
#define STBTT_pow(x,y) ImPow(x,y)
|
||||||
|
#define STBTT_fabs(x) ImFabs(x)
|
||||||
|
#define STBTT_ifloor(x) ((int)ImFloorStd(x))
|
||||||
|
#define STBTT_iceil(x) ((int)ImCeil(x))
|
||||||
#define STBTT_STATIC
|
#define STBTT_STATIC
|
||||||
#define STB_TRUETYPE_IMPLEMENTATION
|
#define STB_TRUETYPE_IMPLEMENTATION
|
||||||
#else
|
#else
|
||||||
@ -117,7 +142,7 @@ namespace IMGUI_STB_NAMESPACE
|
|||||||
#ifdef IMGUI_STB_TRUETYPE_FILENAME
|
#ifdef IMGUI_STB_TRUETYPE_FILENAME
|
||||||
#include IMGUI_STB_TRUETYPE_FILENAME
|
#include IMGUI_STB_TRUETYPE_FILENAME
|
||||||
#else
|
#else
|
||||||
#include "stb_truetype.h"
|
#include "imstb_truetype.h"
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -139,7 +164,7 @@ using namespace IMGUI_STB_NAMESPACE;
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
// Style functions
|
// [SECTION] Style functions
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
|
|
||||||
void ImGui::StyleColorsDark(ImGuiStyle* dst)
|
void ImGui::StyleColorsDark(ImGuiStyle* dst)
|
||||||
@ -185,10 +210,11 @@ void ImGui::StyleColorsDark(ImGuiStyle* dst)
|
|||||||
colors[ImGuiCol_PlotHistogram] = ImVec4(0.90f, 0.70f, 0.00f, 1.00f);
|
colors[ImGuiCol_PlotHistogram] = ImVec4(0.90f, 0.70f, 0.00f, 1.00f);
|
||||||
colors[ImGuiCol_PlotHistogramHovered] = ImVec4(1.00f, 0.60f, 0.00f, 1.00f);
|
colors[ImGuiCol_PlotHistogramHovered] = ImVec4(1.00f, 0.60f, 0.00f, 1.00f);
|
||||||
colors[ImGuiCol_TextSelectedBg] = ImVec4(0.26f, 0.59f, 0.98f, 0.35f);
|
colors[ImGuiCol_TextSelectedBg] = ImVec4(0.26f, 0.59f, 0.98f, 0.35f);
|
||||||
colors[ImGuiCol_ModalWindowDarkening] = ImVec4(0.80f, 0.80f, 0.80f, 0.35f);
|
|
||||||
colors[ImGuiCol_DragDropTarget] = ImVec4(1.00f, 1.00f, 0.00f, 0.90f);
|
colors[ImGuiCol_DragDropTarget] = ImVec4(1.00f, 1.00f, 0.00f, 0.90f);
|
||||||
colors[ImGuiCol_NavHighlight] = ImVec4(0.26f, 0.59f, 0.98f, 1.00f);
|
colors[ImGuiCol_NavHighlight] = ImVec4(0.26f, 0.59f, 0.98f, 1.00f);
|
||||||
colors[ImGuiCol_NavWindowingHighlight] = ImVec4(1.00f, 1.00f, 1.00f, 0.70f);
|
colors[ImGuiCol_NavWindowingHighlight] = ImVec4(1.00f, 1.00f, 1.00f, 0.70f);
|
||||||
|
colors[ImGuiCol_NavWindowingDimBg] = ImVec4(0.80f, 0.80f, 0.80f, 0.20f);
|
||||||
|
colors[ImGuiCol_ModalWindowDimBg] = ImVec4(0.80f, 0.80f, 0.80f, 0.35f);
|
||||||
}
|
}
|
||||||
|
|
||||||
void ImGui::StyleColorsClassic(ImGuiStyle* dst)
|
void ImGui::StyleColorsClassic(ImGuiStyle* dst)
|
||||||
@ -234,10 +260,11 @@ void ImGui::StyleColorsClassic(ImGuiStyle* dst)
|
|||||||
colors[ImGuiCol_PlotHistogram] = ImVec4(0.90f, 0.70f, 0.00f, 1.00f);
|
colors[ImGuiCol_PlotHistogram] = ImVec4(0.90f, 0.70f, 0.00f, 1.00f);
|
||||||
colors[ImGuiCol_PlotHistogramHovered] = ImVec4(1.00f, 0.60f, 0.00f, 1.00f);
|
colors[ImGuiCol_PlotHistogramHovered] = ImVec4(1.00f, 0.60f, 0.00f, 1.00f);
|
||||||
colors[ImGuiCol_TextSelectedBg] = ImVec4(0.00f, 0.00f, 1.00f, 0.35f);
|
colors[ImGuiCol_TextSelectedBg] = ImVec4(0.00f, 0.00f, 1.00f, 0.35f);
|
||||||
colors[ImGuiCol_ModalWindowDarkening] = ImVec4(0.20f, 0.20f, 0.20f, 0.35f);
|
|
||||||
colors[ImGuiCol_DragDropTarget] = ImVec4(1.00f, 1.00f, 0.00f, 0.90f);
|
colors[ImGuiCol_DragDropTarget] = ImVec4(1.00f, 1.00f, 0.00f, 0.90f);
|
||||||
colors[ImGuiCol_NavHighlight] = colors[ImGuiCol_HeaderHovered];
|
colors[ImGuiCol_NavHighlight] = colors[ImGuiCol_HeaderHovered];
|
||||||
colors[ImGuiCol_NavWindowingHighlight] = ImVec4(1.00f, 1.00f, 1.00f, 0.70f);
|
colors[ImGuiCol_NavWindowingHighlight] = ImVec4(1.00f, 1.00f, 1.00f, 0.70f);
|
||||||
|
colors[ImGuiCol_NavWindowingDimBg] = ImVec4(0.80f, 0.80f, 0.80f, 0.20f);
|
||||||
|
colors[ImGuiCol_ModalWindowDimBg] = ImVec4(0.20f, 0.20f, 0.20f, 0.35f);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Those light colors are better suited with a thicker font than the default one + FrameBorder
|
// Those light colors are better suited with a thicker font than the default one + FrameBorder
|
||||||
@ -284,14 +311,15 @@ void ImGui::StyleColorsLight(ImGuiStyle* dst)
|
|||||||
colors[ImGuiCol_PlotHistogram] = ImVec4(0.90f, 0.70f, 0.00f, 1.00f);
|
colors[ImGuiCol_PlotHistogram] = ImVec4(0.90f, 0.70f, 0.00f, 1.00f);
|
||||||
colors[ImGuiCol_PlotHistogramHovered] = ImVec4(1.00f, 0.45f, 0.00f, 1.00f);
|
colors[ImGuiCol_PlotHistogramHovered] = ImVec4(1.00f, 0.45f, 0.00f, 1.00f);
|
||||||
colors[ImGuiCol_TextSelectedBg] = ImVec4(0.26f, 0.59f, 0.98f, 0.35f);
|
colors[ImGuiCol_TextSelectedBg] = ImVec4(0.26f, 0.59f, 0.98f, 0.35f);
|
||||||
colors[ImGuiCol_ModalWindowDarkening] = ImVec4(0.20f, 0.20f, 0.20f, 0.35f);
|
|
||||||
colors[ImGuiCol_DragDropTarget] = ImVec4(0.26f, 0.59f, 0.98f, 0.95f);
|
colors[ImGuiCol_DragDropTarget] = ImVec4(0.26f, 0.59f, 0.98f, 0.95f);
|
||||||
colors[ImGuiCol_NavHighlight] = colors[ImGuiCol_HeaderHovered];
|
colors[ImGuiCol_NavHighlight] = colors[ImGuiCol_HeaderHovered];
|
||||||
colors[ImGuiCol_NavWindowingHighlight] = ImVec4(0.70f, 0.70f, 0.70f, 0.70f);
|
colors[ImGuiCol_NavWindowingHighlight] = ImVec4(0.70f, 0.70f, 0.70f, 0.70f);
|
||||||
|
colors[ImGuiCol_NavWindowingDimBg] = ImVec4(0.20f, 0.20f, 0.20f, 0.20f);
|
||||||
|
colors[ImGuiCol_ModalWindowDimBg] = ImVec4(0.20f, 0.20f, 0.20f, 0.35f);
|
||||||
}
|
}
|
||||||
|
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
// ImDrawListData
|
// ImDrawList
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
|
|
||||||
ImDrawListSharedData::ImDrawListSharedData()
|
ImDrawListSharedData::ImDrawListSharedData()
|
||||||
@ -300,19 +328,15 @@ ImDrawListSharedData::ImDrawListSharedData()
|
|||||||
FontSize = 0.0f;
|
FontSize = 0.0f;
|
||||||
CurveTessellationTol = 0.0f;
|
CurveTessellationTol = 0.0f;
|
||||||
ClipRectFullscreen = ImVec4(-8192.0f, -8192.0f, +8192.0f, +8192.0f);
|
ClipRectFullscreen = ImVec4(-8192.0f, -8192.0f, +8192.0f, +8192.0f);
|
||||||
|
|
||||||
// Const data
|
// Const data
|
||||||
for (int i = 0; i < IM_ARRAYSIZE(CircleVtx12); i++)
|
for (int i = 0; i < IM_ARRAYSIZE(CircleVtx12); i++)
|
||||||
{
|
{
|
||||||
const float a = ((float)i * 2 * IM_PI) / (float)IM_ARRAYSIZE(CircleVtx12);
|
const float a = ((float)i * 2 * IM_PI) / (float)IM_ARRAYSIZE(CircleVtx12);
|
||||||
CircleVtx12[i] = ImVec2(cosf(a), sinf(a));
|
CircleVtx12[i] = ImVec2(ImCos(a), ImSin(a));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//-----------------------------------------------------------------------------
|
|
||||||
// ImDrawList
|
|
||||||
//-----------------------------------------------------------------------------
|
|
||||||
|
|
||||||
void ImDrawList::Clear()
|
void ImDrawList::Clear()
|
||||||
{
|
{
|
||||||
CmdBuffer.resize(0);
|
CmdBuffer.resize(0);
|
||||||
@ -903,7 +927,7 @@ void ImDrawList::PathArcTo(const ImVec2& centre, float radius, float a_min, floa
|
|||||||
for (int i = 0; i <= num_segments; i++)
|
for (int i = 0; i <= num_segments; i++)
|
||||||
{
|
{
|
||||||
const float a = a_min + ((float)i / (float)num_segments) * (a_max - a_min);
|
const float a = a_min + ((float)i / (float)num_segments) * (a_max - a_min);
|
||||||
_Path.push_back(ImVec2(centre.x + cosf(a) * radius, centre.y + sinf(a) * radius));
|
_Path.push_back(ImVec2(centre.x + ImCos(a) * radius, centre.y + ImSin(a) * radius));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -959,8 +983,8 @@ void ImDrawList::PathBezierCurveTo(const ImVec2& p2, const ImVec2& p3, const ImV
|
|||||||
|
|
||||||
void ImDrawList::PathRect(const ImVec2& a, const ImVec2& b, float rounding, int rounding_corners)
|
void ImDrawList::PathRect(const ImVec2& a, const ImVec2& b, float rounding, int rounding_corners)
|
||||||
{
|
{
|
||||||
rounding = ImMin(rounding, fabsf(b.x - a.x) * ( ((rounding_corners & ImDrawCornerFlags_Top) == ImDrawCornerFlags_Top) || ((rounding_corners & ImDrawCornerFlags_Bot) == ImDrawCornerFlags_Bot) ? 0.5f : 1.0f ) - 1.0f);
|
rounding = ImMin(rounding, ImFabs(b.x - a.x) * ( ((rounding_corners & ImDrawCornerFlags_Top) == ImDrawCornerFlags_Top) || ((rounding_corners & ImDrawCornerFlags_Bot) == ImDrawCornerFlags_Bot) ? 0.5f : 1.0f ) - 1.0f);
|
||||||
rounding = ImMin(rounding, fabsf(b.y - a.y) * ( ((rounding_corners & ImDrawCornerFlags_Left) == ImDrawCornerFlags_Left) || ((rounding_corners & ImDrawCornerFlags_Right) == ImDrawCornerFlags_Right) ? 0.5f : 1.0f ) - 1.0f);
|
rounding = ImMin(rounding, ImFabs(b.y - a.y) * ( ((rounding_corners & ImDrawCornerFlags_Left) == ImDrawCornerFlags_Left) || ((rounding_corners & ImDrawCornerFlags_Right) == ImDrawCornerFlags_Right) ? 0.5f : 1.0f ) - 1.0f);
|
||||||
|
|
||||||
if (rounding <= 0.0f || rounding_corners == 0)
|
if (rounding <= 0.0f || rounding_corners == 0)
|
||||||
{
|
{
|
||||||
@ -1195,14 +1219,14 @@ void ImDrawList::AddImageRounded(ImTextureID user_texture_id, const ImVec2& a, c
|
|||||||
PathRect(a, b, rounding, rounding_corners);
|
PathRect(a, b, rounding, rounding_corners);
|
||||||
PathFillConvex(col);
|
PathFillConvex(col);
|
||||||
int vert_end_idx = VtxBuffer.Size;
|
int vert_end_idx = VtxBuffer.Size;
|
||||||
ImGui::ShadeVertsLinearUV(VtxBuffer.Data + vert_start_idx, VtxBuffer.Data + vert_end_idx, a, b, uv_a, uv_b, true);
|
ImGui::ShadeVertsLinearUV(this, vert_start_idx, vert_end_idx, a, b, uv_a, uv_b, true);
|
||||||
|
|
||||||
if (push_texture_id)
|
if (push_texture_id)
|
||||||
PopTextureID();
|
PopTextureID();
|
||||||
}
|
}
|
||||||
|
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
// ImDrawData
|
// [SECTION] ImDrawData
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
|
|
||||||
// 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!
|
// 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!
|
||||||
@ -1239,14 +1263,16 @@ void ImDrawData::ScaleClipRects(const ImVec2& scale)
|
|||||||
}
|
}
|
||||||
|
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
// Shade functions
|
// [SECTION] Helpers ShadeVertsXXX functions
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
|
|
||||||
// Generic linear color gradient, write to RGB fields, leave A untouched.
|
// Generic linear color gradient, write to RGB fields, leave A untouched.
|
||||||
void ImGui::ShadeVertsLinearColorGradientKeepAlpha(ImDrawVert* vert_start, ImDrawVert* vert_end, ImVec2 gradient_p0, ImVec2 gradient_p1, ImU32 col0, ImU32 col1)
|
void ImGui::ShadeVertsLinearColorGradientKeepAlpha(ImDrawList* draw_list, int vert_start_idx, int vert_end_idx, ImVec2 gradient_p0, ImVec2 gradient_p1, ImU32 col0, ImU32 col1)
|
||||||
{
|
{
|
||||||
ImVec2 gradient_extent = gradient_p1 - gradient_p0;
|
ImVec2 gradient_extent = gradient_p1 - gradient_p0;
|
||||||
float gradient_inv_length2 = 1.0f / ImLengthSqr(gradient_extent);
|
float gradient_inv_length2 = 1.0f / ImLengthSqr(gradient_extent);
|
||||||
|
ImDrawVert* vert_start = draw_list->VtxBuffer.Data + vert_start_idx;
|
||||||
|
ImDrawVert* vert_end = draw_list->VtxBuffer.Data + vert_end_idx;
|
||||||
for (ImDrawVert* vert = vert_start; vert < vert_end; vert++)
|
for (ImDrawVert* vert = vert_start; vert < vert_end; vert++)
|
||||||
{
|
{
|
||||||
float d = ImDot(vert->pos - gradient_p0, gradient_extent);
|
float d = ImDot(vert->pos - gradient_p0, gradient_extent);
|
||||||
@ -1258,25 +1284,8 @@ void ImGui::ShadeVertsLinearColorGradientKeepAlpha(ImDrawVert* vert_start, ImDra
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Scan and shade backward from the end of given vertices. Assume vertices are text only (= vert_start..vert_end going left to right) so we can break as soon as we are out the gradient bounds.
|
|
||||||
void ImGui::ShadeVertsLinearAlphaGradientForLeftToRightText(ImDrawVert* vert_start, ImDrawVert* vert_end, float gradient_p0_x, float gradient_p1_x)
|
|
||||||
{
|
|
||||||
float gradient_extent_x = gradient_p1_x - gradient_p0_x;
|
|
||||||
float gradient_inv_length2 = 1.0f / (gradient_extent_x * gradient_extent_x);
|
|
||||||
int full_alpha_count = 0;
|
|
||||||
for (ImDrawVert* vert = vert_end - 1; vert >= vert_start; vert--)
|
|
||||||
{
|
|
||||||
float d = (vert->pos.x - gradient_p0_x) * (gradient_extent_x);
|
|
||||||
float alpha_mul = 1.0f - ImClamp(d * gradient_inv_length2, 0.0f, 1.0f);
|
|
||||||
if (alpha_mul >= 1.0f && ++full_alpha_count > 2)
|
|
||||||
return; // Early out
|
|
||||||
int a = (int)(((vert->col >> IM_COL32_A_SHIFT) & 0xFF) * alpha_mul);
|
|
||||||
vert->col = (vert->col & ~IM_COL32_A_MASK) | (a << IM_COL32_A_SHIFT);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Distribute UV over (a, b) rectangle
|
// Distribute UV over (a, b) rectangle
|
||||||
void ImGui::ShadeVertsLinearUV(ImDrawVert* vert_start, ImDrawVert* vert_end, const ImVec2& a, const ImVec2& b, const ImVec2& uv_a, const ImVec2& uv_b, bool clamp)
|
void ImGui::ShadeVertsLinearUV(ImDrawList* draw_list, int vert_start_idx, int vert_end_idx, const ImVec2& a, const ImVec2& b, const ImVec2& uv_a, const ImVec2& uv_b, bool clamp)
|
||||||
{
|
{
|
||||||
const ImVec2 size = b - a;
|
const ImVec2 size = b - a;
|
||||||
const ImVec2 uv_size = uv_b - uv_a;
|
const ImVec2 uv_size = uv_b - uv_a;
|
||||||
@ -1284,11 +1293,12 @@ void ImGui::ShadeVertsLinearUV(ImDrawVert* vert_start, ImDrawVert* vert_end, con
|
|||||||
size.x != 0.0f ? (uv_size.x / size.x) : 0.0f,
|
size.x != 0.0f ? (uv_size.x / size.x) : 0.0f,
|
||||||
size.y != 0.0f ? (uv_size.y / size.y) : 0.0f);
|
size.y != 0.0f ? (uv_size.y / size.y) : 0.0f);
|
||||||
|
|
||||||
|
ImDrawVert* vert_start = draw_list->VtxBuffer.Data + vert_start_idx;
|
||||||
|
ImDrawVert* vert_end = draw_list->VtxBuffer.Data + vert_end_idx;
|
||||||
if (clamp)
|
if (clamp)
|
||||||
{
|
{
|
||||||
const ImVec2 min = ImMin(uv_a, uv_b);
|
const ImVec2 min = ImMin(uv_a, uv_b);
|
||||||
const ImVec2 max = ImMax(uv_a, uv_b);
|
const ImVec2 max = ImMax(uv_a, uv_b);
|
||||||
|
|
||||||
for (ImDrawVert* vertex = vert_start; vertex < vert_end; ++vertex)
|
for (ImDrawVert* vertex = vert_start; vertex < vert_end; ++vertex)
|
||||||
vertex->uv = ImClamp(uv_a + ImMul(ImVec2(vertex->pos.x, vertex->pos.y) - a, scale), min, max);
|
vertex->uv = ImClamp(uv_a + ImMul(ImVec2(vertex->pos.x, vertex->pos.y) - a, scale), min, max);
|
||||||
}
|
}
|
||||||
@ -1300,7 +1310,7 @@ void ImGui::ShadeVertsLinearUV(ImDrawVert* vert_start, ImDrawVert* vert_end, con
|
|||||||
}
|
}
|
||||||
|
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
// ImFontConfig
|
// [SECTION] ImFontConfig
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
|
|
||||||
ImFontConfig::ImFontConfig()
|
ImFontConfig::ImFontConfig()
|
||||||
@ -1316,6 +1326,8 @@ ImFontConfig::ImFontConfig()
|
|||||||
GlyphExtraSpacing = ImVec2(0.0f, 0.0f);
|
GlyphExtraSpacing = ImVec2(0.0f, 0.0f);
|
||||||
GlyphOffset = ImVec2(0.0f, 0.0f);
|
GlyphOffset = ImVec2(0.0f, 0.0f);
|
||||||
GlyphRanges = NULL;
|
GlyphRanges = NULL;
|
||||||
|
GlyphMinAdvanceX = 0.0f;
|
||||||
|
GlyphMaxAdvanceX = FLT_MAX;
|
||||||
MergeMode = false;
|
MergeMode = false;
|
||||||
RasterizerFlags = 0x00;
|
RasterizerFlags = 0x00;
|
||||||
RasterizerMultiply = 1.0f;
|
RasterizerMultiply = 1.0f;
|
||||||
@ -1324,60 +1336,62 @@ ImFontConfig::ImFontConfig()
|
|||||||
}
|
}
|
||||||
|
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
// ImFontAtlas
|
// [SECTION] ImFontAtlas
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
|
|
||||||
// A work of art lies ahead! (. = white layer, X = black layer, others are blank)
|
// A work of art lies ahead! (. = white layer, X = black layer, others are blank)
|
||||||
// The white texels on the top left are the ones we'll use everywhere in ImGui to render filled shapes.
|
// The white texels on the top left are the ones we'll use everywhere in ImGui to render filled shapes.
|
||||||
const int FONT_ATLAS_DEFAULT_TEX_DATA_W_HALF = 90;
|
const int FONT_ATLAS_DEFAULT_TEX_DATA_W_HALF = 108;
|
||||||
const int FONT_ATLAS_DEFAULT_TEX_DATA_H = 27;
|
const int FONT_ATLAS_DEFAULT_TEX_DATA_H = 27;
|
||||||
const unsigned int FONT_ATLAS_DEFAULT_TEX_DATA_ID = 0x80000000;
|
const unsigned int FONT_ATLAS_DEFAULT_TEX_DATA_ID = 0x80000000;
|
||||||
static const char FONT_ATLAS_DEFAULT_TEX_DATA_PIXELS[FONT_ATLAS_DEFAULT_TEX_DATA_W_HALF * FONT_ATLAS_DEFAULT_TEX_DATA_H + 1] =
|
static const char FONT_ATLAS_DEFAULT_TEX_DATA_PIXELS[FONT_ATLAS_DEFAULT_TEX_DATA_W_HALF * FONT_ATLAS_DEFAULT_TEX_DATA_H + 1] =
|
||||||
{
|
{
|
||||||
"..- -XXXXXXX- X - X -XXXXXXX - XXXXXXX"
|
"..- -XXXXXXX- X - X -XXXXXXX - XXXXXXX- XX "
|
||||||
"..- -X.....X- X.X - X.X -X.....X - X.....X"
|
"..- -X.....X- X.X - X.X -X.....X - X.....X- X..X "
|
||||||
"--- -XXX.XXX- X...X - X...X -X....X - X....X"
|
"--- -XXX.XXX- X...X - X...X -X....X - X....X- X..X "
|
||||||
"X - X.X - X.....X - X.....X -X...X - X...X"
|
"X - X.X - X.....X - X.....X -X...X - X...X- X..X "
|
||||||
"XX - X.X -X.......X- X.......X -X..X.X - X.X..X"
|
"XX - X.X -X.......X- X.......X -X..X.X - X.X..X- X..X "
|
||||||
"X.X - X.X -XXXX.XXXX- XXXX.XXXX -X.X X.X - X.X X.X"
|
"X.X - X.X -XXXX.XXXX- XXXX.XXXX -X.X X.X - X.X X.X- X..XXX "
|
||||||
"X..X - X.X - X.X - X.X -XX X.X - X.X XX"
|
"X..X - X.X - X.X - X.X -XX X.X - X.X XX- X..X..XXX "
|
||||||
"X...X - X.X - X.X - XX X.X XX - X.X - X.X "
|
"X...X - X.X - X.X - XX X.X XX - X.X - X.X - X..X..X..XX "
|
||||||
"X....X - X.X - X.X - X.X X.X X.X - X.X - X.X "
|
"X....X - X.X - X.X - X.X X.X X.X - X.X - X.X - X..X..X..X.X "
|
||||||
"X.....X - X.X - X.X - X..X X.X X..X - X.X - X.X "
|
"X.....X - X.X - X.X - X..X X.X X..X - X.X - X.X -XXX X..X..X..X..X"
|
||||||
"X......X - X.X - X.X - X...XXXXXX.XXXXXX...X - X.X XX-XX X.X "
|
"X......X - X.X - X.X - X...XXXXXX.XXXXXX...X - X.X XX-XX X.X -X..XX........X..X"
|
||||||
"X.......X - X.X - X.X -X.....................X- X.X X.X-X.X X.X "
|
"X.......X - X.X - X.X -X.....................X- X.X X.X-X.X X.X -X...X...........X"
|
||||||
"X........X - X.X - X.X - X...XXXXXX.XXXXXX...X - X.X..X-X..X.X "
|
"X........X - X.X - X.X - X...XXXXXX.XXXXXX...X - X.X..X-X..X.X - X..............X"
|
||||||
"X.........X -XXX.XXX- X.X - X..X X.X X..X - X...X-X...X "
|
"X.........X -XXX.XXX- X.X - X..X X.X X..X - X...X-X...X - X.............X"
|
||||||
"X..........X-X.....X- X.X - X.X X.X X.X - X....X-X....X "
|
"X..........X-X.....X- X.X - X.X X.X X.X - X....X-X....X - X.............X"
|
||||||
"X......XXXXX-XXXXXXX- X.X - XX X.X XX - X.....X-X.....X "
|
"X......XXXXX-XXXXXXX- X.X - XX X.X XX - X.....X-X.....X - X............X"
|
||||||
"X...X..X --------- X.X - X.X - XXXXXXX-XXXXXXX "
|
"X...X..X --------- X.X - X.X - XXXXXXX-XXXXXXX - X...........X "
|
||||||
"X..X X..X - -XXXX.XXXX- XXXX.XXXX ------------------------------------"
|
"X..X X..X - -XXXX.XXXX- XXXX.XXXX ------------------------------------- X..........X "
|
||||||
"X.X X..X - -X.......X- X.......X - XX XX - "
|
"X.X X..X - -X.......X- X.......X - XX XX - - X..........X "
|
||||||
"XX X..X - - X.....X - X.....X - X.X X.X - "
|
"XX X..X - - X.....X - X.....X - X.X X.X - - X........X "
|
||||||
" X..X - X...X - X...X - X..X X..X - "
|
" X..X - X...X - X...X - X..X X..X - - X........X "
|
||||||
" XX - X.X - X.X - X...XXXXXXXXXXXXX...X - "
|
" XX - X.X - X.X - X...XXXXXXXXXXXXX...X - - XXXXXXXXXX "
|
||||||
"------------ - X - X -X.....................X- "
|
"------------ - X - X -X.....................X- ------------------"
|
||||||
" ----------------------------------- X...XXXXXXXXXXXXX...X - "
|
" ----------------------------------- X...XXXXXXXXXXXXX...X - "
|
||||||
" - X..X X..X - "
|
" - X..X X..X - "
|
||||||
" - X.X X.X - "
|
" - X.X X.X - "
|
||||||
" - XX XX - "
|
" - XX XX - "
|
||||||
};
|
};
|
||||||
|
|
||||||
static const ImVec2 FONT_ATLAS_DEFAULT_TEX_CURSOR_DATA[ImGuiMouseCursor_COUNT][3] =
|
static const ImVec2 FONT_ATLAS_DEFAULT_TEX_CURSOR_DATA[ImGuiMouseCursor_COUNT][3] =
|
||||||
{
|
{
|
||||||
// Pos ........ Size ......... Offset ......
|
// Pos ........ Size ......... Offset ......
|
||||||
{ ImVec2(0,3), ImVec2(12,19), ImVec2( 0, 0) }, // ImGuiMouseCursor_Arrow
|
{ ImVec2( 0,3), ImVec2(12,19), ImVec2( 0, 0) }, // ImGuiMouseCursor_Arrow
|
||||||
{ ImVec2(13,0), ImVec2(7,16), ImVec2( 4, 8) }, // ImGuiMouseCursor_TextInput
|
{ ImVec2(13,0), ImVec2( 7,16), ImVec2( 1, 8) }, // ImGuiMouseCursor_TextInput
|
||||||
{ ImVec2(31,0), ImVec2(23,23), ImVec2(11,11) }, // ImGuiMouseCursor_ResizeAll
|
{ ImVec2(31,0), ImVec2(23,23), ImVec2(11,11) }, // ImGuiMouseCursor_ResizeAll
|
||||||
{ ImVec2(21,0), ImVec2( 9,23), ImVec2( 5,11) }, // ImGuiMouseCursor_ResizeNS
|
{ ImVec2(21,0), ImVec2( 9,23), ImVec2( 4,11) }, // ImGuiMouseCursor_ResizeNS
|
||||||
{ ImVec2(55,18),ImVec2(23, 9), ImVec2(11, 5) }, // ImGuiMouseCursor_ResizeEW
|
{ ImVec2(55,18),ImVec2(23, 9), ImVec2(11, 4) }, // ImGuiMouseCursor_ResizeEW
|
||||||
{ ImVec2(73,0), ImVec2(17,17), ImVec2( 9, 9) }, // ImGuiMouseCursor_ResizeNESW
|
{ ImVec2(73,0), ImVec2(17,17), ImVec2( 8, 8) }, // ImGuiMouseCursor_ResizeNESW
|
||||||
{ ImVec2(55,0), ImVec2(17,17), ImVec2( 9, 9) }, // ImGuiMouseCursor_ResizeNWSE
|
{ ImVec2(55,0), ImVec2(17,17), ImVec2( 8, 8) }, // ImGuiMouseCursor_ResizeNWSE
|
||||||
|
{ ImVec2(91,0), ImVec2(17,22), ImVec2( 5, 0) }, // ImGuiMouseCursor_Hand
|
||||||
};
|
};
|
||||||
|
|
||||||
ImFontAtlas::ImFontAtlas()
|
ImFontAtlas::ImFontAtlas()
|
||||||
{
|
{
|
||||||
Flags = 0x00;
|
Locked = false;
|
||||||
|
Flags = ImFontAtlasFlags_None;
|
||||||
TexID = NULL;
|
TexID = NULL;
|
||||||
TexDesiredWidth = 0;
|
TexDesiredWidth = 0;
|
||||||
TexGlyphPadding = 1;
|
TexGlyphPadding = 1;
|
||||||
@ -1393,11 +1407,13 @@ ImFontAtlas::ImFontAtlas()
|
|||||||
|
|
||||||
ImFontAtlas::~ImFontAtlas()
|
ImFontAtlas::~ImFontAtlas()
|
||||||
{
|
{
|
||||||
|
IM_ASSERT(!Locked && "Cannot modify a locked ImFontAtlas between NewFrame() and EndFrame/Render()!");
|
||||||
Clear();
|
Clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
void ImFontAtlas::ClearInputData()
|
void ImFontAtlas::ClearInputData()
|
||||||
{
|
{
|
||||||
|
IM_ASSERT(!Locked && "Cannot modify a locked ImFontAtlas between NewFrame() and EndFrame/Render()!");
|
||||||
for (int i = 0; i < ConfigData.Size; i++)
|
for (int i = 0; i < ConfigData.Size; i++)
|
||||||
if (ConfigData[i].FontData && ConfigData[i].FontDataOwnedByAtlas)
|
if (ConfigData[i].FontData && ConfigData[i].FontDataOwnedByAtlas)
|
||||||
{
|
{
|
||||||
@ -1420,6 +1436,7 @@ void ImFontAtlas::ClearInputData()
|
|||||||
|
|
||||||
void ImFontAtlas::ClearTexData()
|
void ImFontAtlas::ClearTexData()
|
||||||
{
|
{
|
||||||
|
IM_ASSERT(!Locked && "Cannot modify a locked ImFontAtlas between NewFrame() and EndFrame/Render()!");
|
||||||
if (TexPixelsAlpha8)
|
if (TexPixelsAlpha8)
|
||||||
ImGui::MemFree(TexPixelsAlpha8);
|
ImGui::MemFree(TexPixelsAlpha8);
|
||||||
if (TexPixelsRGBA32)
|
if (TexPixelsRGBA32)
|
||||||
@ -1430,6 +1447,7 @@ void ImFontAtlas::ClearTexData()
|
|||||||
|
|
||||||
void ImFontAtlas::ClearFonts()
|
void ImFontAtlas::ClearFonts()
|
||||||
{
|
{
|
||||||
|
IM_ASSERT(!Locked && "Cannot modify a locked ImFontAtlas between NewFrame() and EndFrame/Render()!");
|
||||||
for (int i = 0; i < Fonts.Size; i++)
|
for (int i = 0; i < Fonts.Size; i++)
|
||||||
IM_DELETE(Fonts[i]);
|
IM_DELETE(Fonts[i]);
|
||||||
Fonts.clear();
|
Fonts.clear();
|
||||||
@ -1484,6 +1502,7 @@ void ImFontAtlas::GetTexDataAsRGBA32(unsigned char** out_pixels, int* out_wid
|
|||||||
|
|
||||||
ImFont* ImFontAtlas::AddFont(const ImFontConfig* font_cfg)
|
ImFont* ImFontAtlas::AddFont(const ImFontConfig* font_cfg)
|
||||||
{
|
{
|
||||||
|
IM_ASSERT(!Locked && "Cannot modify a locked ImFontAtlas between NewFrame() and EndFrame/Render()!");
|
||||||
IM_ASSERT(font_cfg->FontData != NULL && font_cfg->FontDataSize > 0);
|
IM_ASSERT(font_cfg->FontData != NULL && font_cfg->FontDataSize > 0);
|
||||||
IM_ASSERT(font_cfg->SizePixels > 0.0f);
|
IM_ASSERT(font_cfg->SizePixels > 0.0f);
|
||||||
|
|
||||||
@ -1538,13 +1557,15 @@ ImFont* ImFontAtlas::AddFontDefault(const ImFontConfig* font_cfg_template)
|
|||||||
if (font_cfg.SizePixels <= 0.0f) font_cfg.SizePixels = 13.0f;
|
if (font_cfg.SizePixels <= 0.0f) font_cfg.SizePixels = 13.0f;
|
||||||
|
|
||||||
const char* ttf_compressed_base85 = GetDefaultCompressedFontDataTTFBase85();
|
const char* ttf_compressed_base85 = GetDefaultCompressedFontDataTTFBase85();
|
||||||
ImFont* font = AddFontFromMemoryCompressedBase85TTF(ttf_compressed_base85, font_cfg.SizePixels, &font_cfg, GetGlyphRangesDefault());
|
const ImWchar* glyph_ranges = font_cfg.GlyphRanges != NULL ? font_cfg.GlyphRanges : GetGlyphRangesDefault();
|
||||||
|
ImFont* font = AddFontFromMemoryCompressedBase85TTF(ttf_compressed_base85, font_cfg.SizePixels, &font_cfg, glyph_ranges);
|
||||||
font->DisplayOffset.y = 1.0f;
|
font->DisplayOffset.y = 1.0f;
|
||||||
return font;
|
return font;
|
||||||
}
|
}
|
||||||
|
|
||||||
ImFont* ImFontAtlas::AddFontFromFileTTF(const char* filename, float size_pixels, const ImFontConfig* font_cfg_template, const ImWchar* glyph_ranges)
|
ImFont* ImFontAtlas::AddFontFromFileTTF(const char* filename, float size_pixels, const ImFontConfig* font_cfg_template, const ImWchar* glyph_ranges)
|
||||||
{
|
{
|
||||||
|
IM_ASSERT(!Locked && "Cannot modify a locked ImFontAtlas between NewFrame() and EndFrame/Render()!");
|
||||||
size_t data_size = 0;
|
size_t data_size = 0;
|
||||||
void* data = ImFileLoadToMemory(filename, "rb", &data_size, 0);
|
void* data = ImFileLoadToMemory(filename, "rb", &data_size, 0);
|
||||||
if (!data)
|
if (!data)
|
||||||
@ -1566,6 +1587,7 @@ ImFont* ImFontAtlas::AddFontFromFileTTF(const char* filename, float size_pixels,
|
|||||||
// NB: Transfer ownership of 'ttf_data' to ImFontAtlas, unless font_cfg_template->FontDataOwnedByAtlas == false. Owned TTF buffer will be deleted after Build().
|
// NB: Transfer ownership of 'ttf_data' to ImFontAtlas, unless font_cfg_template->FontDataOwnedByAtlas == false. Owned TTF buffer will be deleted after Build().
|
||||||
ImFont* ImFontAtlas::AddFontFromMemoryTTF(void* ttf_data, int ttf_size, float size_pixels, const ImFontConfig* font_cfg_template, const ImWchar* glyph_ranges)
|
ImFont* ImFontAtlas::AddFontFromMemoryTTF(void* ttf_data, int ttf_size, float size_pixels, const ImFontConfig* font_cfg_template, const ImWchar* glyph_ranges)
|
||||||
{
|
{
|
||||||
|
IM_ASSERT(!Locked && "Cannot modify a locked ImFontAtlas between NewFrame() and EndFrame/Render()!");
|
||||||
ImFontConfig font_cfg = font_cfg_template ? *font_cfg_template : ImFontConfig();
|
ImFontConfig font_cfg = font_cfg_template ? *font_cfg_template : ImFontConfig();
|
||||||
IM_ASSERT(font_cfg.FontData == NULL);
|
IM_ASSERT(font_cfg.FontData == NULL);
|
||||||
font_cfg.FontData = ttf_data;
|
font_cfg.FontData = ttf_data;
|
||||||
@ -1659,6 +1681,7 @@ bool ImFontAtlas::GetMouseCursorTexData(ImGuiMouseCursor cursor_type, ImVec2* ou
|
|||||||
|
|
||||||
bool ImFontAtlas::Build()
|
bool ImFontAtlas::Build()
|
||||||
{
|
{
|
||||||
|
IM_ASSERT(!Locked && "Cannot modify a locked ImFontAtlas between NewFrame() and EndFrame/Render()!");
|
||||||
return ImFontAtlasBuildWithStbTruetype(this);
|
return ImFontAtlasBuildWithStbTruetype(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1858,8 +1881,8 @@ bool ImFontAtlasBuildWithStbTruetype(ImFontAtlas* atlas)
|
|||||||
const float ascent = ImFloor(unscaled_ascent * font_scale + ((unscaled_ascent > 0.0f) ? +1 : -1));
|
const float ascent = ImFloor(unscaled_ascent * font_scale + ((unscaled_ascent > 0.0f) ? +1 : -1));
|
||||||
const float descent = ImFloor(unscaled_descent * font_scale + ((unscaled_descent > 0.0f) ? +1 : -1));
|
const float descent = ImFloor(unscaled_descent * font_scale + ((unscaled_descent > 0.0f) ? +1 : -1));
|
||||||
ImFontAtlasBuildSetupFont(atlas, dst_font, &cfg, ascent, descent);
|
ImFontAtlasBuildSetupFont(atlas, dst_font, &cfg, ascent, descent);
|
||||||
const float off_x = cfg.GlyphOffset.x;
|
const float font_off_x = cfg.GlyphOffset.x;
|
||||||
const float off_y = cfg.GlyphOffset.y + (float)(int)(dst_font->Ascent + 0.5f);
|
const float font_off_y = cfg.GlyphOffset.y + (float)(int)(dst_font->Ascent + 0.5f);
|
||||||
|
|
||||||
for (int i = 0; i < tmp.RangesCount; i++)
|
for (int i = 0; i < tmp.RangesCount; i++)
|
||||||
{
|
{
|
||||||
@ -1874,10 +1897,16 @@ bool ImFontAtlasBuildWithStbTruetype(ImFontAtlas* atlas)
|
|||||||
if (cfg.MergeMode && dst_font->FindGlyphNoFallback((unsigned short)codepoint))
|
if (cfg.MergeMode && dst_font->FindGlyphNoFallback((unsigned short)codepoint))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
|
float char_advance_x_org = pc.xadvance;
|
||||||
|
float char_advance_x_mod = ImClamp(char_advance_x_org, cfg.GlyphMinAdvanceX, cfg.GlyphMaxAdvanceX);
|
||||||
|
float char_off_x = font_off_x;
|
||||||
|
if (char_advance_x_org != char_advance_x_mod)
|
||||||
|
char_off_x += cfg.PixelSnapH ? (float)(int)((char_advance_x_mod - char_advance_x_org) * 0.5f) : (char_advance_x_mod - char_advance_x_org) * 0.5f;
|
||||||
|
|
||||||
stbtt_aligned_quad q;
|
stbtt_aligned_quad q;
|
||||||
float dummy_x = 0.0f, dummy_y = 0.0f;
|
float dummy_x = 0.0f, dummy_y = 0.0f;
|
||||||
stbtt_GetPackedQuad(range.chardata_for_range, atlas->TexWidth, atlas->TexHeight, char_idx, &dummy_x, &dummy_y, &q, 0);
|
stbtt_GetPackedQuad(range.chardata_for_range, atlas->TexWidth, atlas->TexHeight, char_idx, &dummy_x, &dummy_y, &q, 0);
|
||||||
dst_font->AddGlyph((ImWchar)codepoint, q.x0 + off_x, q.y0 + off_y, q.x1 + off_x, q.y1 + off_y, q.s0, q.t0, q.s1, q.t1, pc.xadvance);
|
dst_font->AddGlyph((ImWchar)codepoint, q.x0 + char_off_x, q.y0 + font_off_y, q.x1 + char_off_x, q.y1 + font_off_y, q.s0, q.t0, q.s1, q.t1, char_advance_x_mod);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -2020,7 +2049,7 @@ const ImWchar* ImFontAtlas::GetGlyphRangesKorean()
|
|||||||
return &ranges[0];
|
return &ranges[0];
|
||||||
}
|
}
|
||||||
|
|
||||||
const ImWchar* ImFontAtlas::GetGlyphRangesChinese()
|
const ImWchar* ImFontAtlas::GetGlyphRangesChineseFull()
|
||||||
{
|
{
|
||||||
static const ImWchar ranges[] =
|
static const ImWchar ranges[] =
|
||||||
{
|
{
|
||||||
@ -2034,67 +2063,140 @@ const ImWchar* ImFontAtlas::GetGlyphRangesChinese()
|
|||||||
return &ranges[0];
|
return &ranges[0];
|
||||||
}
|
}
|
||||||
|
|
||||||
const ImWchar* ImFontAtlas::GetGlyphRangesJapanese()
|
static void UnpackAccumulativeOffsetsIntoRanges(int base_codepoint, const short* accumulative_offsets, int accumulative_offsets_count, ImWchar* out_ranges)
|
||||||
{
|
{
|
||||||
// Store the 1946 ideograms code points as successive offsets from the initial unicode codepoint 0x4E00. Each offset has an implicit +1.
|
for (int n = 0; n < accumulative_offsets_count; n++, out_ranges += 2)
|
||||||
// This encoding is designed to helps us reduce the source code size.
|
|
||||||
// FIXME: Source a list of the revised 2136 joyo kanji list from 2010 and rebuild this.
|
|
||||||
// The current list was sourced from http://theinstructionlimit.com/author/renaudbedardrenaudbedard/page/3
|
|
||||||
// Note that you may use ImFontAtlas::GlyphRangesBuilder to create your own ranges, by merging existing ranges or adding new characters.
|
|
||||||
static const short offsets_from_0x4E00[] =
|
|
||||||
{
|
{
|
||||||
-1,0,1,3,0,0,0,0,1,0,5,1,1,0,7,4,6,10,0,1,9,9,7,1,3,19,1,10,7,1,0,1,0,5,1,0,6,4,2,6,0,0,12,6,8,0,3,5,0,1,0,9,0,0,8,1,1,3,4,5,13,0,0,8,2,17,
|
out_ranges[0] = out_ranges[1] = (ImWchar)(base_codepoint + accumulative_offsets[n]);
|
||||||
4,3,1,1,9,6,0,0,0,2,1,3,2,22,1,9,11,1,13,1,3,12,0,5,9,2,0,6,12,5,3,12,4,1,2,16,1,1,4,6,5,3,0,6,13,15,5,12,8,14,0,0,6,15,3,6,0,18,8,1,6,14,1,
|
base_codepoint += accumulative_offsets[n];
|
||||||
5,4,12,24,3,13,12,10,24,0,0,0,1,0,1,1,2,9,10,2,2,0,0,3,3,1,0,3,8,0,3,2,4,4,1,6,11,10,14,6,15,3,4,15,1,0,0,5,2,2,0,0,1,6,5,5,6,0,3,6,5,0,0,1,0,
|
}
|
||||||
11,2,2,8,4,7,0,10,0,1,2,17,19,3,0,2,5,0,6,2,4,4,6,1,1,11,2,0,3,1,2,1,2,10,7,6,3,16,0,8,24,0,0,3,1,1,3,0,1,6,0,0,0,2,0,1,5,15,0,1,0,0,2,11,19,
|
out_ranges[0] = 0;
|
||||||
1,4,19,7,6,5,1,0,0,0,0,5,1,0,1,9,0,0,5,0,2,0,1,0,3,0,11,3,0,2,0,0,0,0,0,9,3,6,4,12,0,14,0,0,29,10,8,0,14,37,13,0,31,16,19,0,8,30,1,20,8,3,48,
|
}
|
||||||
21,1,0,12,0,10,44,34,42,54,11,18,82,0,2,1,2,12,1,0,6,2,17,2,12,7,0,7,17,4,2,6,24,23,8,23,39,2,16,23,1,0,5,1,2,15,14,5,6,2,11,0,8,6,2,2,2,14,
|
|
||||||
20,4,15,3,4,11,10,10,2,5,2,1,30,2,1,0,0,22,5,5,0,3,1,5,4,1,0,0,2,2,21,1,5,1,2,16,2,1,3,4,0,8,4,0,0,5,14,11,2,16,1,13,1,7,0,22,15,3,1,22,7,14,
|
//-------------------------------------------------------------------------
|
||||||
22,19,11,24,18,46,10,20,64,45,3,2,0,4,5,0,1,4,25,1,0,0,2,10,0,0,0,1,0,1,2,0,0,9,1,2,0,0,0,2,5,2,1,1,5,5,8,1,1,1,5,1,4,9,1,3,0,1,0,1,1,2,0,0,
|
// [SECTION] ImFontAtlas glyph ranges helpers + GlyphRangesBuilder
|
||||||
2,0,1,8,22,8,1,0,0,0,0,4,2,1,0,9,8,5,0,9,1,30,24,2,6,4,39,0,14,5,16,6,26,179,0,2,1,1,0,0,0,5,2,9,6,0,2,5,16,7,5,1,1,0,2,4,4,7,15,13,14,0,0,
|
//-------------------------------------------------------------------------
|
||||||
3,0,1,0,0,0,2,1,6,4,5,1,4,9,0,3,1,8,0,0,10,5,0,43,0,2,6,8,4,0,2,0,0,9,6,0,9,3,1,6,20,14,6,1,4,0,7,2,3,0,2,0,5,0,3,1,0,3,9,7,0,3,4,0,4,9,1,6,0,
|
|
||||||
9,0,0,2,3,10,9,28,3,6,2,4,1,2,32,4,1,18,2,0,3,1,5,30,10,0,2,2,2,0,7,9,8,11,10,11,7,2,13,7,5,10,0,3,40,2,0,1,6,12,0,4,5,1,5,11,11,21,4,8,3,7,
|
const ImWchar* ImFontAtlas::GetGlyphRangesChineseSimplifiedCommon()
|
||||||
8,8,33,5,23,0,0,19,8,8,2,3,0,6,1,1,1,5,1,27,4,2,5,0,3,5,6,3,1,0,3,1,12,5,3,3,2,0,7,7,2,1,0,4,0,1,1,2,0,10,10,6,2,5,9,7,5,15,15,21,6,11,5,20,
|
{
|
||||||
4,3,5,5,2,5,0,2,1,0,1,7,28,0,9,0,5,12,5,5,18,30,0,12,3,3,21,16,25,32,9,3,14,11,24,5,66,9,1,2,0,5,9,1,5,1,8,0,8,3,3,0,1,15,1,4,8,1,2,7,0,7,2,
|
// Store 2500 regularly used characters for Simplified Chinese.
|
||||||
8,3,7,5,3,7,10,2,1,0,0,2,25,0,6,4,0,10,0,4,2,4,1,12,5,38,4,0,4,1,10,5,9,4,0,14,4,2,5,18,20,21,1,3,0,5,0,7,0,3,7,1,3,1,1,8,1,0,0,0,3,2,5,2,11,
|
// Sourced from https://zh.wiktionary.org/wiki/%E9%99%84%E5%BD%95:%E7%8E%B0%E4%BB%A3%E6%B1%89%E8%AF%AD%E5%B8%B8%E7%94%A8%E5%AD%97%E8%A1%A8
|
||||||
6,0,13,1,3,9,1,12,0,16,6,2,1,0,2,1,12,6,13,11,2,0,28,1,7,8,14,13,8,13,0,2,0,5,4,8,10,2,37,42,19,6,6,7,4,14,11,18,14,80,7,6,0,4,72,12,36,27,
|
// This table covers 97.97% of all characters used during the month in July, 1987.
|
||||||
7,7,0,14,17,19,164,27,0,5,10,7,3,13,6,14,0,2,2,5,3,0,6,13,0,0,10,29,0,4,0,3,13,0,3,1,6,51,1,5,28,2,0,8,0,20,2,4,0,25,2,10,13,10,0,16,4,0,1,0,
|
// You can use ImFontAtlas::GlyphRangesBuilder to create your own ranges derived from this, by merging existing ranges or adding new characters.
|
||||||
2,1,7,0,1,8,11,0,0,1,2,7,2,23,11,6,6,4,16,2,2,2,0,22,9,3,3,5,2,0,15,16,21,2,9,20,15,15,5,3,9,1,0,0,1,7,7,5,4,2,2,2,38,24,14,0,0,15,5,6,24,14,
|
// (Stored as accumulative offsets from the initial unicode codepoint 0x4E00. This encoding is designed to helps us compact the source code size.)
|
||||||
5,5,11,0,21,12,0,3,8,4,11,1,8,0,11,27,7,2,4,9,21,59,0,1,39,3,60,62,3,0,12,11,0,3,30,11,0,13,88,4,15,5,28,13,1,4,48,17,17,4,28,32,46,0,16,0,
|
static const short accumulative_offsets_from_0x4E00[] =
|
||||||
18,11,1,8,6,38,11,2,6,11,38,2,0,45,3,11,2,7,8,4,30,14,17,2,1,1,65,18,12,16,4,2,45,123,12,56,33,1,4,3,4,7,0,0,0,3,2,0,16,4,2,4,2,0,7,4,5,2,26,
|
{
|
||||||
2,25,6,11,6,1,16,2,6,17,77,15,3,35,0,1,0,5,1,0,38,16,6,3,12,3,3,3,0,9,3,1,3,5,2,9,0,18,0,25,1,3,32,1,72,46,6,2,7,1,3,14,17,0,28,1,40,13,0,20,
|
0,1,2,4,1,1,1,1,2,1,3,2,1,2,2,1,1,1,1,1,5,2,1,2,3,3,3,2,2,4,1,1,1,2,1,5,2,3,1,2,1,2,1,1,2,1,1,2,2,1,4,1,1,1,1,5,10,1,2,19,2,1,2,1,2,1,2,1,2,
|
||||||
15,40,6,38,24,12,43,1,1,9,0,12,6,0,6,2,4,19,3,7,1,48,0,9,5,0,5,6,9,6,10,15,2,11,19,3,9,2,0,1,10,1,27,8,1,3,6,1,14,0,26,0,27,16,3,4,9,6,2,23,
|
1,5,1,6,3,2,1,2,2,1,1,1,4,8,5,1,1,4,1,1,3,1,2,1,5,1,2,1,1,1,10,1,1,5,2,4,6,1,4,2,2,2,12,2,1,1,6,1,1,1,4,1,1,4,6,5,1,4,2,2,4,10,7,1,1,4,2,4,
|
||||||
9,10,5,25,2,1,6,1,1,48,15,9,15,14,3,4,26,60,29,13,37,21,1,6,4,0,2,11,22,23,16,16,2,2,1,3,0,5,1,6,4,0,0,4,0,0,8,3,0,2,5,0,7,1,7,3,13,2,4,10,
|
2,1,4,3,6,10,12,5,7,2,14,2,9,1,1,6,7,10,4,7,13,1,5,4,8,4,1,1,2,28,5,6,1,1,5,2,5,20,2,2,9,8,11,2,9,17,1,8,6,8,27,4,6,9,20,11,27,6,68,2,2,1,1,
|
||||||
3,0,2,31,0,18,3,0,12,10,4,1,0,7,5,7,0,5,4,12,2,22,10,4,2,15,2,8,9,0,23,2,197,51,3,1,1,4,13,4,3,21,4,19,3,10,5,40,0,4,1,1,10,4,1,27,34,7,21,
|
1,2,1,2,2,7,6,11,3,3,1,1,3,1,2,1,1,1,1,1,3,1,1,8,3,4,1,5,7,2,1,4,4,8,4,2,1,2,1,1,4,5,6,3,6,2,12,3,1,3,9,2,4,3,4,1,5,3,3,1,3,7,1,5,1,1,1,1,2,
|
||||||
2,17,2,9,6,4,2,3,0,4,2,7,8,2,5,1,15,21,3,4,4,2,2,17,22,1,5,22,4,26,7,0,32,1,11,42,15,4,1,2,5,0,19,3,1,8,6,0,10,1,9,2,13,30,8,2,24,17,19,1,4,
|
3,4,5,2,3,2,6,1,1,2,1,7,1,7,3,4,5,15,2,2,1,5,3,22,19,2,1,1,1,1,2,5,1,1,1,6,1,1,12,8,2,9,18,22,4,1,1,5,1,16,1,2,7,10,15,1,1,6,2,4,1,2,4,1,6,
|
||||||
4,25,13,0,10,16,11,39,18,8,5,30,82,1,6,8,18,77,11,13,20,75,11,112,78,33,3,0,0,60,17,84,9,1,1,12,30,10,49,5,32,158,178,5,5,6,3,3,1,3,1,4,7,6,
|
1,1,3,2,4,1,6,4,5,1,2,1,1,2,1,10,3,1,3,2,1,9,3,2,5,7,2,19,4,3,6,1,1,1,1,1,4,3,2,1,1,1,2,5,3,1,1,1,2,2,1,1,2,1,1,2,1,3,1,1,1,3,7,1,4,1,1,2,1,
|
||||||
19,31,21,0,2,9,5,6,27,4,9,8,1,76,18,12,1,4,0,3,3,6,3,12,2,8,30,16,2,25,1,5,5,4,3,0,6,10,2,3,1,0,5,1,19,3,0,8,1,5,2,6,0,0,0,19,1,2,0,5,1,2,5,
|
1,2,1,2,4,4,3,8,1,1,1,2,1,3,5,1,3,1,3,4,6,2,2,14,4,6,6,11,9,1,15,3,1,28,5,2,5,5,3,1,3,4,5,4,6,14,3,2,3,5,21,2,7,20,10,1,2,19,2,4,28,28,2,3,
|
||||||
1,3,7,0,4,12,7,3,10,22,0,9,5,1,0,2,20,1,1,3,23,30,3,9,9,1,4,191,14,3,15,6,8,50,0,1,0,0,4,0,0,1,0,2,4,2,0,2,3,0,2,0,2,2,8,7,0,1,1,1,3,3,17,11,
|
2,1,14,4,1,26,28,42,12,40,3,52,79,5,14,17,3,2,2,11,3,4,6,3,1,8,2,23,4,5,8,10,4,2,7,3,5,1,1,6,3,1,2,2,2,5,28,1,1,7,7,20,5,3,29,3,17,26,1,8,4,
|
||||||
91,1,9,3,2,13,4,24,15,41,3,13,3,1,20,4,125,29,30,1,0,4,12,2,21,4,5,5,19,11,0,13,11,86,2,18,0,7,1,8,8,2,2,22,1,2,6,5,2,0,1,2,8,0,2,0,5,2,1,0,
|
27,3,6,11,23,5,3,4,6,13,24,16,6,5,10,25,35,7,3,2,3,3,14,3,6,2,6,1,4,2,3,8,2,1,1,3,3,3,4,1,1,13,2,2,4,5,2,1,14,14,1,2,2,1,4,5,2,3,1,14,3,12,
|
||||||
2,10,2,0,5,9,2,1,2,0,1,0,4,0,0,10,2,5,3,0,6,1,0,1,4,4,33,3,13,17,3,18,6,4,7,1,5,78,0,4,1,13,7,1,8,1,0,35,27,15,3,0,0,0,1,11,5,41,38,15,22,6,
|
3,17,2,16,5,1,2,1,8,9,3,19,4,2,2,4,17,25,21,20,28,75,1,10,29,103,4,1,2,1,1,4,2,4,1,2,3,24,2,2,2,1,1,2,1,3,8,1,1,1,2,1,1,3,1,1,1,6,1,5,3,1,1,
|
||||||
14,14,2,1,11,6,20,63,5,8,27,7,11,2,2,40,58,23,50,54,56,293,8,8,1,5,1,14,0,1,12,37,89,8,8,8,2,10,6,0,0,0,4,5,2,1,0,1,1,2,7,0,3,3,0,4,6,0,3,2,
|
1,3,4,1,1,5,2,1,5,6,13,9,16,1,1,1,1,3,2,3,2,4,5,2,5,2,2,3,7,13,7,2,2,1,1,1,1,2,3,3,2,1,6,4,9,2,1,14,2,14,2,1,18,3,4,14,4,11,41,15,23,15,23,
|
||||||
19,3,8,0,0,0,4,4,16,0,4,1,5,1,3,0,3,4,6,2,17,10,10,31,6,4,3,6,10,126,7,3,2,2,0,9,0,0,5,20,13,0,15,0,6,0,2,5,8,64,50,3,2,12,2,9,0,0,11,8,20,
|
176,1,3,4,1,1,1,1,5,3,1,2,3,7,3,1,1,2,1,2,4,4,6,2,4,1,9,7,1,10,5,8,16,29,1,1,2,2,3,1,3,5,2,4,5,4,1,1,2,2,3,3,7,1,6,10,1,17,1,44,4,6,2,1,1,6,
|
||||||
109,2,18,23,0,0,9,61,3,0,28,41,77,27,19,17,81,5,2,14,5,83,57,252,14,154,263,14,20,8,13,6,57,39,38,
|
5,4,2,10,1,6,9,2,8,1,24,1,2,13,7,8,8,2,1,4,1,3,1,3,3,5,2,5,10,9,4,9,12,2,1,6,1,10,1,1,7,7,4,10,8,3,1,13,4,3,1,6,1,3,5,2,1,2,17,16,5,2,16,6,
|
||||||
|
1,4,2,1,3,3,6,8,5,11,11,1,3,3,2,4,6,10,9,5,7,4,7,4,7,1,1,4,2,1,3,6,8,7,1,6,11,5,5,3,24,9,4,2,7,13,5,1,8,82,16,61,1,1,1,4,2,2,16,10,3,8,1,1,
|
||||||
|
6,4,2,1,3,1,1,1,4,3,8,4,2,2,1,1,1,1,1,6,3,5,1,1,4,6,9,2,1,1,1,2,1,7,2,1,6,1,5,4,4,3,1,8,1,3,3,1,3,2,2,2,2,3,1,6,1,2,1,2,1,3,7,1,8,2,1,2,1,5,
|
||||||
|
2,5,3,5,10,1,2,1,1,3,2,5,11,3,9,3,5,1,1,5,9,1,2,1,5,7,9,9,8,1,3,3,3,6,8,2,3,2,1,1,32,6,1,2,15,9,3,7,13,1,3,10,13,2,14,1,13,10,2,1,3,10,4,15,
|
||||||
|
2,15,15,10,1,3,9,6,9,32,25,26,47,7,3,2,3,1,6,3,4,3,2,8,5,4,1,9,4,2,2,19,10,6,2,3,8,1,2,2,4,2,1,9,4,4,4,6,4,8,9,2,3,1,1,1,1,3,5,5,1,3,8,4,6,
|
||||||
|
2,1,4,12,1,5,3,7,13,2,5,8,1,6,1,2,5,14,6,1,5,2,4,8,15,5,1,23,6,62,2,10,1,1,8,1,2,2,10,4,2,2,9,2,1,1,3,2,3,1,5,3,3,2,1,3,8,1,1,1,11,3,1,1,4,
|
||||||
|
3,7,1,14,1,2,3,12,5,2,5,1,6,7,5,7,14,11,1,3,1,8,9,12,2,1,11,8,4,4,2,6,10,9,13,1,1,3,1,5,1,3,2,4,4,1,18,2,3,14,11,4,29,4,2,7,1,3,13,9,2,2,5,
|
||||||
|
3,5,20,7,16,8,5,72,34,6,4,22,12,12,28,45,36,9,7,39,9,191,1,1,1,4,11,8,4,9,2,3,22,1,1,1,1,4,17,1,7,7,1,11,31,10,2,4,8,2,3,2,1,4,2,16,4,32,2,
|
||||||
|
3,19,13,4,9,1,5,2,14,8,1,1,3,6,19,6,5,1,16,6,2,10,8,5,1,2,3,1,5,5,1,11,6,6,1,3,3,2,6,3,8,1,1,4,10,7,5,7,7,5,8,9,2,1,3,4,1,1,3,1,3,3,2,6,16,
|
||||||
|
1,4,6,3,1,10,6,1,3,15,2,9,2,10,25,13,9,16,6,2,2,10,11,4,3,9,1,2,6,6,5,4,30,40,1,10,7,12,14,33,6,3,6,7,3,1,3,1,11,14,4,9,5,12,11,49,18,51,31,
|
||||||
|
140,31,2,2,1,5,1,8,1,10,1,4,4,3,24,1,10,1,3,6,6,16,3,4,5,2,1,4,2,57,10,6,22,2,22,3,7,22,6,10,11,36,18,16,33,36,2,5,5,1,1,1,4,10,1,4,13,2,7,
|
||||||
|
5,2,9,3,4,1,7,43,3,7,3,9,14,7,9,1,11,1,1,3,7,4,18,13,1,14,1,3,6,10,73,2,2,30,6,1,11,18,19,13,22,3,46,42,37,89,7,3,16,34,2,2,3,9,1,7,1,1,1,2,
|
||||||
|
2,4,10,7,3,10,3,9,5,28,9,2,6,13,7,3,1,3,10,2,7,2,11,3,6,21,54,85,2,1,4,2,2,1,39,3,21,2,2,5,1,1,1,4,1,1,3,4,15,1,3,2,4,4,2,3,8,2,20,1,8,7,13,
|
||||||
|
4,1,26,6,2,9,34,4,21,52,10,4,4,1,5,12,2,11,1,7,2,30,12,44,2,30,1,1,3,6,16,9,17,39,82,2,2,24,7,1,7,3,16,9,14,44,2,1,2,1,2,3,5,2,4,1,6,7,5,3,
|
||||||
|
2,6,1,11,5,11,2,1,18,19,8,1,3,24,29,2,1,3,5,2,2,1,13,6,5,1,46,11,3,5,1,1,5,8,2,10,6,12,6,3,7,11,2,4,16,13,2,5,1,1,2,2,5,2,28,5,2,23,10,8,4,
|
||||||
|
4,22,39,95,38,8,14,9,5,1,13,5,4,3,13,12,11,1,9,1,27,37,2,5,4,4,63,211,95,2,2,2,1,3,5,2,1,1,2,2,1,1,1,3,2,4,1,2,1,1,5,2,2,1,1,2,3,1,3,1,1,1,
|
||||||
|
3,1,4,2,1,3,6,1,1,3,7,15,5,3,2,5,3,9,11,4,2,22,1,6,3,8,7,1,4,28,4,16,3,3,25,4,4,27,27,1,4,1,2,2,7,1,3,5,2,28,8,2,14,1,8,6,16,25,3,3,3,14,3,
|
||||||
|
3,1,1,2,1,4,6,3,8,4,1,1,1,2,3,6,10,6,2,3,18,3,2,5,5,4,3,1,5,2,5,4,23,7,6,12,6,4,17,11,9,5,1,1,10,5,12,1,1,11,26,33,7,3,6,1,17,7,1,5,12,1,11,
|
||||||
|
2,4,1,8,14,17,23,1,2,1,7,8,16,11,9,6,5,2,6,4,16,2,8,14,1,11,8,9,1,1,1,9,25,4,11,19,7,2,15,2,12,8,52,7,5,19,2,16,4,36,8,1,16,8,24,26,4,6,2,9,
|
||||||
|
5,4,36,3,28,12,25,15,37,27,17,12,59,38,5,32,127,1,2,9,17,14,4,1,2,1,1,8,11,50,4,14,2,19,16,4,17,5,4,5,26,12,45,2,23,45,104,30,12,8,3,10,2,2,
|
||||||
|
3,3,1,4,20,7,2,9,6,15,2,20,1,3,16,4,11,15,6,134,2,5,59,1,2,2,2,1,9,17,3,26,137,10,211,59,1,2,4,1,4,1,1,1,2,6,2,3,1,1,2,3,2,3,1,3,4,4,2,3,3,
|
||||||
|
1,4,3,1,7,2,2,3,1,2,1,3,3,3,2,2,3,2,1,3,14,6,1,3,2,9,6,15,27,9,34,145,1,1,2,1,1,1,1,2,1,1,1,1,2,2,2,3,1,2,1,1,1,2,3,5,8,3,5,2,4,1,3,2,2,2,12,
|
||||||
|
4,1,1,1,10,4,5,1,20,4,16,1,15,9,5,12,2,9,2,5,4,2,26,19,7,1,26,4,30,12,15,42,1,6,8,172,1,1,4,2,1,1,11,2,2,4,2,1,2,1,10,8,1,2,1,4,5,1,2,5,1,8,
|
||||||
|
4,1,3,4,2,1,6,2,1,3,4,1,2,1,1,1,1,12,5,7,2,4,3,1,1,1,3,3,6,1,2,2,3,3,3,2,1,2,12,14,11,6,6,4,12,2,8,1,7,10,1,35,7,4,13,15,4,3,23,21,28,52,5,
|
||||||
|
26,5,6,1,7,10,2,7,53,3,2,1,1,1,2,163,532,1,10,11,1,3,3,4,8,2,8,6,2,2,23,22,4,2,2,4,2,1,3,1,3,3,5,9,8,2,1,2,8,1,10,2,12,21,20,15,105,2,3,1,1,
|
||||||
|
3,2,3,1,1,2,5,1,4,15,11,19,1,1,1,1,5,4,5,1,1,2,5,3,5,12,1,2,5,1,11,1,1,15,9,1,4,5,3,26,8,2,1,3,1,1,15,19,2,12,1,2,5,2,7,2,19,2,20,6,26,7,5,
|
||||||
|
2,2,7,34,21,13,70,2,128,1,1,2,1,1,2,1,1,3,2,2,2,15,1,4,1,3,4,42,10,6,1,49,85,8,1,2,1,1,4,4,2,3,6,1,5,7,4,3,211,4,1,2,1,2,5,1,2,4,2,2,6,5,6,
|
||||||
|
10,3,4,48,100,6,2,16,296,5,27,387,2,2,3,7,16,8,5,38,15,39,21,9,10,3,7,59,13,27,21,47,5,21,6
|
||||||
};
|
};
|
||||||
static ImWchar base_ranges[] =
|
static ImWchar base_ranges[] = // not zero-terminated
|
||||||
{
|
{
|
||||||
0x0020, 0x00FF, // Basic Latin + Latin Supplement
|
0x0020, 0x00FF, // Basic Latin + Latin Supplement
|
||||||
0x3000, 0x30FF, // Punctuations, Hiragana, Katakana
|
0x3000, 0x30FF, // Punctuations, Hiragana, Katakana
|
||||||
0x31F0, 0x31FF, // Katakana Phonetic Extensions
|
0x31F0, 0x31FF, // Katakana Phonetic Extensions
|
||||||
0xFF00, 0xFFEF, // Half-width characters
|
0xFF00, 0xFFEF, // Half-width characters
|
||||||
};
|
};
|
||||||
static bool full_ranges_unpacked = false;
|
static ImWchar full_ranges[IM_ARRAYSIZE(base_ranges) + IM_ARRAYSIZE(accumulative_offsets_from_0x4E00) * 2 + 1] = { 0 };
|
||||||
static ImWchar full_ranges[IM_ARRAYSIZE(base_ranges) + IM_ARRAYSIZE(offsets_from_0x4E00)*2 + 1];
|
if (!full_ranges[0])
|
||||||
if (!full_ranges_unpacked)
|
|
||||||
{
|
{
|
||||||
// Unpack
|
|
||||||
int codepoint = 0x4e00;
|
|
||||||
memcpy(full_ranges, base_ranges, sizeof(base_ranges));
|
memcpy(full_ranges, base_ranges, sizeof(base_ranges));
|
||||||
ImWchar* dst = full_ranges + IM_ARRAYSIZE(base_ranges);
|
UnpackAccumulativeOffsetsIntoRanges(0x4E00, accumulative_offsets_from_0x4E00, IM_ARRAYSIZE(accumulative_offsets_from_0x4E00), full_ranges + IM_ARRAYSIZE(base_ranges));
|
||||||
for (int n = 0; n < IM_ARRAYSIZE(offsets_from_0x4E00); n++, dst += 2)
|
}
|
||||||
dst[0] = dst[1] = (ImWchar)(codepoint += (offsets_from_0x4E00[n] + 1));
|
return &full_ranges[0];
|
||||||
dst[0] = 0;
|
}
|
||||||
full_ranges_unpacked = true;
|
|
||||||
|
const ImWchar* ImFontAtlas::GetGlyphRangesJapanese()
|
||||||
|
{
|
||||||
|
// 1946 common ideograms code points for Japanese
|
||||||
|
// Sourced from http://theinstructionlimit.com/common-kanji-character-ranges-for-xna-spritefont-rendering
|
||||||
|
// FIXME: Source a list of the revised 2136 Joyo Kanji list from 2010 and rebuild this.
|
||||||
|
// You can use ImFontAtlas::GlyphRangesBuilder to create your own ranges derived from this, by merging existing ranges or adding new characters.
|
||||||
|
// (Stored as accumulative offsets from the initial unicode codepoint 0x4E00. This encoding is designed to helps us compact the source code size.)
|
||||||
|
static const short accumulative_offsets_from_0x4E00[] =
|
||||||
|
{
|
||||||
|
0,1,2,4,1,1,1,1,2,1,6,2,2,1,8,5,7,11,1,2,10,10,8,2,4,20,2,11,8,2,1,2,1,6,2,1,7,5,3,7,1,1,13,7,9,1,4,6,1,2,1,10,1,1,9,2,2,4,5,6,14,1,1,9,3,18,
|
||||||
|
5,4,2,2,10,7,1,1,1,3,2,4,3,23,2,10,12,2,14,2,4,13,1,6,10,3,1,7,13,6,4,13,5,2,3,17,2,2,5,7,6,4,1,7,14,16,6,13,9,15,1,1,7,16,4,7,1,19,9,2,7,15,
|
||||||
|
2,6,5,13,25,4,14,13,11,25,1,1,1,2,1,2,2,3,10,11,3,3,1,1,4,4,2,1,4,9,1,4,3,5,5,2,7,12,11,15,7,16,4,5,16,2,1,1,6,3,3,1,1,2,7,6,6,7,1,4,7,6,1,1,
|
||||||
|
2,1,12,3,3,9,5,8,1,11,1,2,3,18,20,4,1,3,6,1,7,3,5,5,7,2,2,12,3,1,4,2,3,2,3,11,8,7,4,17,1,9,25,1,1,4,2,2,4,1,2,7,1,1,1,3,1,2,6,16,1,2,1,1,3,12,
|
||||||
|
20,2,5,20,8,7,6,2,1,1,1,1,6,2,1,2,10,1,1,6,1,3,1,2,1,4,1,12,4,1,3,1,1,1,1,1,10,4,7,5,13,1,15,1,1,30,11,9,1,15,38,14,1,32,17,20,1,9,31,2,21,9,
|
||||||
|
4,49,22,2,1,13,1,11,45,35,43,55,12,19,83,1,3,2,3,13,2,1,7,3,18,3,13,8,1,8,18,5,3,7,25,24,9,24,40,3,17,24,2,1,6,2,3,16,15,6,7,3,12,1,9,7,3,3,
|
||||||
|
3,15,21,5,16,4,5,12,11,11,3,6,3,2,31,3,2,1,1,23,6,6,1,4,2,6,5,2,1,1,3,3,22,2,6,2,3,17,3,2,4,5,1,9,5,1,1,6,15,12,3,17,2,14,2,8,1,23,16,4,2,23,
|
||||||
|
8,15,23,20,12,25,19,47,11,21,65,46,4,3,1,5,6,1,2,5,26,2,1,1,3,11,1,1,1,2,1,2,3,1,1,10,2,3,1,1,1,3,6,3,2,2,6,6,9,2,2,2,6,2,5,10,2,4,1,2,1,2,2,
|
||||||
|
3,1,1,3,1,2,9,23,9,2,1,1,1,1,5,3,2,1,10,9,6,1,10,2,31,25,3,7,5,40,1,15,6,17,7,27,180,1,3,2,2,1,1,1,6,3,10,7,1,3,6,17,8,6,2,2,1,3,5,5,8,16,14,
|
||||||
|
15,1,1,4,1,2,1,1,1,3,2,7,5,6,2,5,10,1,4,2,9,1,1,11,6,1,44,1,3,7,9,5,1,3,1,1,10,7,1,10,4,2,7,21,15,7,2,5,1,8,3,4,1,3,1,6,1,4,2,1,4,10,8,1,4,5,
|
||||||
|
1,5,10,2,7,1,10,1,1,3,4,11,10,29,4,7,3,5,2,3,33,5,2,19,3,1,4,2,6,31,11,1,3,3,3,1,8,10,9,12,11,12,8,3,14,8,6,11,1,4,41,3,1,2,7,13,1,5,6,2,6,12,
|
||||||
|
12,22,5,9,4,8,9,9,34,6,24,1,1,20,9,9,3,4,1,7,2,2,2,6,2,28,5,3,6,1,4,6,7,4,2,1,4,2,13,6,4,4,3,1,8,8,3,2,1,5,1,2,2,3,1,11,11,7,3,6,10,8,6,16,16,
|
||||||
|
22,7,12,6,21,5,4,6,6,3,6,1,3,2,1,2,8,29,1,10,1,6,13,6,6,19,31,1,13,4,4,22,17,26,33,10,4,15,12,25,6,67,10,2,3,1,6,10,2,6,2,9,1,9,4,4,1,2,16,2,
|
||||||
|
5,9,2,3,8,1,8,3,9,4,8,6,4,8,11,3,2,1,1,3,26,1,7,5,1,11,1,5,3,5,2,13,6,39,5,1,5,2,11,6,10,5,1,15,5,3,6,19,21,22,2,4,1,6,1,8,1,4,8,2,4,2,2,9,2,
|
||||||
|
1,1,1,4,3,6,3,12,7,1,14,2,4,10,2,13,1,17,7,3,2,1,3,2,13,7,14,12,3,1,29,2,8,9,15,14,9,14,1,3,1,6,5,9,11,3,38,43,20,7,7,8,5,15,12,19,15,81,8,7,
|
||||||
|
1,5,73,13,37,28,8,8,1,15,18,20,165,28,1,6,11,8,4,14,7,15,1,3,3,6,4,1,7,14,1,1,11,30,1,5,1,4,14,1,4,2,7,52,2,6,29,3,1,9,1,21,3,5,1,26,3,11,14,
|
||||||
|
11,1,17,5,1,2,1,3,2,8,1,2,9,12,1,1,2,3,8,3,24,12,7,7,5,17,3,3,3,1,23,10,4,4,6,3,1,16,17,22,3,10,21,16,16,6,4,10,2,1,1,2,8,8,6,5,3,3,3,39,25,
|
||||||
|
15,1,1,16,6,7,25,15,6,6,12,1,22,13,1,4,9,5,12,2,9,1,12,28,8,3,5,10,22,60,1,2,40,4,61,63,4,1,13,12,1,4,31,12,1,14,89,5,16,6,29,14,2,5,49,18,18,
|
||||||
|
5,29,33,47,1,17,1,19,12,2,9,7,39,12,3,7,12,39,3,1,46,4,12,3,8,9,5,31,15,18,3,2,2,66,19,13,17,5,3,46,124,13,57,34,2,5,4,5,8,1,1,1,4,3,1,17,5,
|
||||||
|
3,5,3,1,8,5,6,3,27,3,26,7,12,7,2,17,3,7,18,78,16,4,36,1,2,1,6,2,1,39,17,7,4,13,4,4,4,1,10,4,2,4,6,3,10,1,19,1,26,2,4,33,2,73,47,7,3,8,2,4,15,
|
||||||
|
18,1,29,2,41,14,1,21,16,41,7,39,25,13,44,2,2,10,1,13,7,1,7,3,5,20,4,8,2,49,1,10,6,1,6,7,10,7,11,16,3,12,20,4,10,3,1,2,11,2,28,9,2,4,7,2,15,1,
|
||||||
|
27,1,28,17,4,5,10,7,3,24,10,11,6,26,3,2,7,2,2,49,16,10,16,15,4,5,27,61,30,14,38,22,2,7,5,1,3,12,23,24,17,17,3,3,2,4,1,6,2,7,5,1,1,5,1,1,9,4,
|
||||||
|
1,3,6,1,8,2,8,4,14,3,5,11,4,1,3,32,1,19,4,1,13,11,5,2,1,8,6,8,1,6,5,13,3,23,11,5,3,16,3,9,10,1,24,3,198,52,4,2,2,5,14,5,4,22,5,20,4,11,6,41,
|
||||||
|
1,5,2,2,11,5,2,28,35,8,22,3,18,3,10,7,5,3,4,1,5,3,8,9,3,6,2,16,22,4,5,5,3,3,18,23,2,6,23,5,27,8,1,33,2,12,43,16,5,2,3,6,1,20,4,2,9,7,1,11,2,
|
||||||
|
10,3,14,31,9,3,25,18,20,2,5,5,26,14,1,11,17,12,40,19,9,6,31,83,2,7,9,19,78,12,14,21,76,12,113,79,34,4,1,1,61,18,85,10,2,2,13,31,11,50,6,33,159,
|
||||||
|
179,6,6,7,4,4,2,4,2,5,8,7,20,32,22,1,3,10,6,7,28,5,10,9,2,77,19,13,2,5,1,4,4,7,4,13,3,9,31,17,3,26,2,6,6,5,4,1,7,11,3,4,2,1,6,2,20,4,1,9,2,6,
|
||||||
|
3,7,1,1,1,20,2,3,1,6,2,3,6,2,4,8,1,5,13,8,4,11,23,1,10,6,2,1,3,21,2,2,4,24,31,4,10,10,2,5,192,15,4,16,7,9,51,1,2,1,1,5,1,1,2,1,3,5,3,1,3,4,1,
|
||||||
|
3,1,3,3,9,8,1,2,2,2,4,4,18,12,92,2,10,4,3,14,5,25,16,42,4,14,4,2,21,5,126,30,31,2,1,5,13,3,22,5,6,6,20,12,1,14,12,87,3,19,1,8,2,9,9,3,3,23,2,
|
||||||
|
3,7,6,3,1,2,3,9,1,3,1,6,3,2,1,3,11,3,1,6,10,3,2,3,1,2,1,5,1,1,11,3,6,4,1,7,2,1,2,5,5,34,4,14,18,4,19,7,5,8,2,6,79,1,5,2,14,8,2,9,2,1,36,28,16,
|
||||||
|
4,1,1,1,2,12,6,42,39,16,23,7,15,15,3,2,12,7,21,64,6,9,28,8,12,3,3,41,59,24,51,55,57,294,9,9,2,6,2,15,1,2,13,38,90,9,9,9,3,11,7,1,1,1,5,6,3,2,
|
||||||
|
1,2,2,3,8,1,4,4,1,5,7,1,4,3,20,4,9,1,1,1,5,5,17,1,5,2,6,2,4,1,4,5,7,3,18,11,11,32,7,5,4,7,11,127,8,4,3,3,1,10,1,1,6,21,14,1,16,1,7,1,3,6,9,65,
|
||||||
|
51,4,3,13,3,10,1,1,12,9,21,110,3,19,24,1,1,10,62,4,1,29,42,78,28,20,18,82,6,3,15,6,84,58,253,15,155,264,15,21,9,14,7,58,40,39,
|
||||||
|
};
|
||||||
|
static ImWchar base_ranges[] = // not zero-terminated
|
||||||
|
{
|
||||||
|
0x0020, 0x00FF, // Basic Latin + Latin Supplement
|
||||||
|
0x3000, 0x30FF, // Punctuations, Hiragana, Katakana
|
||||||
|
0x31F0, 0x31FF, // Katakana Phonetic Extensions
|
||||||
|
0xFF00, 0xFFEF, // Half-width characters
|
||||||
|
};
|
||||||
|
static ImWchar full_ranges[IM_ARRAYSIZE(base_ranges) + IM_ARRAYSIZE(accumulative_offsets_from_0x4E00)*2 + 1] = { 0 };
|
||||||
|
if (!full_ranges[0])
|
||||||
|
{
|
||||||
|
memcpy(full_ranges, base_ranges, sizeof(base_ranges));
|
||||||
|
UnpackAccumulativeOffsetsIntoRanges(0x4E00, accumulative_offsets_from_0x4E00, IM_ARRAYSIZE(accumulative_offsets_from_0x4E00), full_ranges + IM_ARRAYSIZE(base_ranges));
|
||||||
}
|
}
|
||||||
return &full_ranges[0];
|
return &full_ranges[0];
|
||||||
}
|
}
|
||||||
@ -2124,10 +2226,6 @@ const ImWchar* ImFontAtlas::GetGlyphRangesThai()
|
|||||||
return &ranges[0];
|
return &ranges[0];
|
||||||
}
|
}
|
||||||
|
|
||||||
//-----------------------------------------------------------------------------
|
|
||||||
// ImFontAtlas::GlyphRangesBuilder
|
|
||||||
//-----------------------------------------------------------------------------
|
|
||||||
|
|
||||||
void ImFontAtlas::GlyphRangesBuilder::AddText(const char* text, const char* text_end)
|
void ImFontAtlas::GlyphRangesBuilder::AddText(const char* text, const char* text_end)
|
||||||
{
|
{
|
||||||
while (text_end ? (text < text_end) : *text)
|
while (text_end ? (text < text_end) : *text)
|
||||||
@ -2163,7 +2261,7 @@ void ImFontAtlas::GlyphRangesBuilder::BuildRanges(ImVector<ImWchar>* out_ranges)
|
|||||||
}
|
}
|
||||||
|
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
// ImFont
|
// [SECTION] ImFont
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
|
|
||||||
ImFont::ImFont()
|
ImFont::ImFont()
|
||||||
@ -2257,24 +2355,26 @@ void ImFont::GrowIndex(int new_size)
|
|||||||
IndexLookup.resize(new_size, (unsigned short)-1);
|
IndexLookup.resize(new_size, (unsigned short)-1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// x0/y0/x1/y1 are offset from the character upper-left layout position, in pixels. Therefore x0/y0 are often fairly close to zero.
|
||||||
|
// Not to be mistaken with texture coordinates, which are held by u0/v0/u1/v1 in normalized format (0.0..1.0 on each texture axis).
|
||||||
void ImFont::AddGlyph(ImWchar codepoint, float x0, float y0, float x1, float y1, float u0, float v0, float u1, float v1, float advance_x)
|
void ImFont::AddGlyph(ImWchar codepoint, float x0, float y0, float x1, float y1, float u0, float v0, float u1, float v1, float advance_x)
|
||||||
{
|
{
|
||||||
Glyphs.resize(Glyphs.Size + 1);
|
Glyphs.resize(Glyphs.Size + 1);
|
||||||
ImFontGlyph& glyph = Glyphs.back();
|
ImFontGlyph& glyph = Glyphs.back();
|
||||||
glyph.Codepoint = (ImWchar)codepoint;
|
glyph.Codepoint = (ImWchar)codepoint;
|
||||||
glyph.X0 = x0;
|
glyph.X0 = x0;
|
||||||
glyph.Y0 = y0;
|
glyph.Y0 = y0;
|
||||||
glyph.X1 = x1;
|
glyph.X1 = x1;
|
||||||
glyph.Y1 = y1;
|
glyph.Y1 = y1;
|
||||||
glyph.U0 = u0;
|
glyph.U0 = u0;
|
||||||
glyph.V0 = v0;
|
glyph.V0 = v0;
|
||||||
glyph.U1 = u1;
|
glyph.U1 = u1;
|
||||||
glyph.V1 = v1;
|
glyph.V1 = v1;
|
||||||
glyph.AdvanceX = advance_x + ConfigData->GlyphExtraSpacing.x; // Bake spacing into AdvanceX
|
glyph.AdvanceX = advance_x + ConfigData->GlyphExtraSpacing.x; // Bake spacing into AdvanceX
|
||||||
|
|
||||||
if (ConfigData->PixelSnapH)
|
if (ConfigData->PixelSnapH)
|
||||||
glyph.AdvanceX = (float)(int)(glyph.AdvanceX + 0.5f);
|
glyph.AdvanceX = (float)(int)(glyph.AdvanceX + 0.5f);
|
||||||
|
|
||||||
// Compute rough surface usage metrics (+1 to account for average padding, +0.99 to round)
|
// Compute rough surface usage metrics (+1 to account for average padding, +0.99 to round)
|
||||||
DirtyLookupTables = true;
|
DirtyLookupTables = true;
|
||||||
MetricsTotalSurface += (int)((glyph.U1 - glyph.U0) * ContainerAtlas->TexWidth + 1.99f) * (int)((glyph.V1 - glyph.V0) * ContainerAtlas->TexHeight + 1.99f);
|
MetricsTotalSurface += (int)((glyph.U1 - glyph.U0) * ContainerAtlas->TexWidth + 1.99f) * (int)((glyph.V1 - glyph.V0) * ContainerAtlas->TexHeight + 1.99f);
|
||||||
@ -2370,7 +2470,7 @@ const char* ImFont::CalcWordWrapPositionA(float scale, const char* text, const c
|
|||||||
}
|
}
|
||||||
|
|
||||||
const float char_width = ((int)c < IndexAdvanceX.Size ? IndexAdvanceX[(int)c] : FallbackAdvanceX);
|
const float char_width = ((int)c < IndexAdvanceX.Size ? IndexAdvanceX[(int)c] : FallbackAdvanceX);
|
||||||
if (ImCharIsSpace(c))
|
if (ImCharIsBlankW(c))
|
||||||
{
|
{
|
||||||
if (inside_word)
|
if (inside_word)
|
||||||
{
|
{
|
||||||
@ -2453,7 +2553,7 @@ ImVec2 ImFont::CalcTextSizeA(float size, float max_width, float wrap_width, cons
|
|||||||
while (s < text_end)
|
while (s < text_end)
|
||||||
{
|
{
|
||||||
const char c = *s;
|
const char c = *s;
|
||||||
if (ImCharIsSpace((unsigned int)c)) { s++; } else if (c == '\n') { s++; break; } else { break; }
|
if (ImCharIsBlankA(c)) { s++; } else if (c == '\n') { s++; break; } else { break; }
|
||||||
}
|
}
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
@ -2540,11 +2640,32 @@ void ImFont::RenderText(ImDrawList* draw_list, float size, ImVec2 pos, ImU32 col
|
|||||||
const bool word_wrap_enabled = (wrap_width > 0.0f);
|
const bool word_wrap_enabled = (wrap_width > 0.0f);
|
||||||
const char* word_wrap_eol = NULL;
|
const char* word_wrap_eol = NULL;
|
||||||
|
|
||||||
// Skip non-visible lines
|
// Fast-forward to first visible line
|
||||||
const char* s = text_begin;
|
const char* s = text_begin;
|
||||||
if (!word_wrap_enabled && y + line_height < clip_rect.y)
|
if (y + line_height < clip_rect.y && !word_wrap_enabled)
|
||||||
while (s < text_end && *s != '\n') // Fast-forward to next line
|
while (y + line_height < clip_rect.y)
|
||||||
s++;
|
{
|
||||||
|
while (s < text_end)
|
||||||
|
if (*s++ == '\n')
|
||||||
|
break;
|
||||||
|
y += line_height;
|
||||||
|
}
|
||||||
|
|
||||||
|
// For large text, scan for the last visible line in order to avoid over-reserving in the call to PrimReserve()
|
||||||
|
// Note that very large horizontal line will still be affected by the issue (e.g. a one megabyte string buffer without a newline will likely crash atm)
|
||||||
|
if (text_end - s > 10000 && !word_wrap_enabled)
|
||||||
|
{
|
||||||
|
const char* s_end = s;
|
||||||
|
float y_end = y;
|
||||||
|
while (y_end < clip_rect.w)
|
||||||
|
{
|
||||||
|
while (s_end < text_end)
|
||||||
|
if (*s_end++ == '\n')
|
||||||
|
break;
|
||||||
|
y_end += line_height;
|
||||||
|
}
|
||||||
|
text_end = s_end;
|
||||||
|
}
|
||||||
|
|
||||||
// Reserve vertices for remaining worse case (over-reserving is useful and easily amortized)
|
// Reserve vertices for remaining worse case (over-reserving is useful and easily amortized)
|
||||||
const int vtx_count_max = (int)(text_end - s) * 4;
|
const int vtx_count_max = (int)(text_end - s) * 4;
|
||||||
@ -2578,7 +2699,7 @@ void ImFont::RenderText(ImDrawList* draw_list, float size, ImVec2 pos, ImU32 col
|
|||||||
while (s < text_end)
|
while (s < text_end)
|
||||||
{
|
{
|
||||||
const char c = *s;
|
const char c = *s;
|
||||||
if (ImCharIsSpace((unsigned int)c)) { s++; } else if (c == '\n') { s++; break; } else { break; }
|
if (ImCharIsBlankA(c)) { s++; } else if (c == '\n') { s++; break; } else { break; }
|
||||||
}
|
}
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
@ -2603,12 +2724,8 @@ void ImFont::RenderText(ImDrawList* draw_list, float size, ImVec2 pos, ImU32 col
|
|||||||
{
|
{
|
||||||
x = pos.x;
|
x = pos.x;
|
||||||
y += line_height;
|
y += line_height;
|
||||||
|
|
||||||
if (y > clip_rect.w)
|
if (y > clip_rect.w)
|
||||||
break;
|
break; // break out of main loop
|
||||||
if (!word_wrap_enabled && y + line_height < clip_rect.y)
|
|
||||||
while (s < text_end && *s != '\n') // Fast-forward to next line
|
|
||||||
s++;
|
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
if (c == '\r')
|
if (c == '\r')
|
||||||
@ -2695,14 +2812,57 @@ void ImFont::RenderText(ImDrawList* draw_list, float size, ImVec2 pos, ImU32 col
|
|||||||
}
|
}
|
||||||
|
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
// Internals Drawing Helpers
|
// [SECTION] Internal Render Helpers
|
||||||
|
// (progressively moved from imgui.cpp to here when they are redesigned to stop accessing ImGui global state)
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
|
// - RenderMouseCursor()
|
||||||
|
// - RenderArrowPointingAt()
|
||||||
|
// - RenderRectFilledRangeH()
|
||||||
|
//-----------------------------------------------------------------------------
|
||||||
|
|
||||||
|
void ImGui::RenderMouseCursor(ImDrawList* draw_list, ImVec2 pos, float scale, ImGuiMouseCursor mouse_cursor)
|
||||||
|
{
|
||||||
|
if (mouse_cursor == ImGuiMouseCursor_None)
|
||||||
|
return;
|
||||||
|
IM_ASSERT(mouse_cursor > ImGuiMouseCursor_None && mouse_cursor < ImGuiMouseCursor_COUNT);
|
||||||
|
|
||||||
|
const ImU32 col_shadow = IM_COL32(0, 0, 0, 48);
|
||||||
|
const ImU32 col_border = IM_COL32(0, 0, 0, 255); // Black
|
||||||
|
const ImU32 col_fill = IM_COL32(255, 255, 255, 255); // White
|
||||||
|
|
||||||
|
ImFontAtlas* font_atlas = draw_list->_Data->Font->ContainerAtlas;
|
||||||
|
ImVec2 offset, size, uv[4];
|
||||||
|
if (font_atlas->GetMouseCursorTexData(mouse_cursor, &offset, &size, &uv[0], &uv[2]))
|
||||||
|
{
|
||||||
|
pos -= offset;
|
||||||
|
const ImTextureID tex_id = font_atlas->TexID;
|
||||||
|
draw_list->PushTextureID(tex_id);
|
||||||
|
draw_list->AddImage(tex_id, pos + ImVec2(1,0)*scale, pos + ImVec2(1,0)*scale + size*scale, uv[2], uv[3], col_shadow);
|
||||||
|
draw_list->AddImage(tex_id, pos + ImVec2(2,0)*scale, pos + ImVec2(2,0)*scale + size*scale, uv[2], uv[3], col_shadow);
|
||||||
|
draw_list->AddImage(tex_id, pos, pos + size*scale, uv[2], uv[3], col_border);
|
||||||
|
draw_list->AddImage(tex_id, pos, pos + size*scale, uv[0], uv[1], col_fill);
|
||||||
|
draw_list->PopTextureID();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Render an arrow. 'pos' is position of the arrow tip. half_sz.x is length from base to tip. half_sz.y is length on each side.
|
||||||
|
void ImGui::RenderArrowPointingAt(ImDrawList* draw_list, ImVec2 pos, ImVec2 half_sz, ImGuiDir direction, ImU32 col)
|
||||||
|
{
|
||||||
|
switch (direction)
|
||||||
|
{
|
||||||
|
case ImGuiDir_Left: draw_list->AddTriangleFilled(ImVec2(pos.x + half_sz.x, pos.y - half_sz.y), ImVec2(pos.x + half_sz.x, pos.y + half_sz.y), pos, col); return;
|
||||||
|
case ImGuiDir_Right: draw_list->AddTriangleFilled(ImVec2(pos.x - half_sz.x, pos.y + half_sz.y), ImVec2(pos.x - half_sz.x, pos.y - half_sz.y), pos, col); return;
|
||||||
|
case ImGuiDir_Up: draw_list->AddTriangleFilled(ImVec2(pos.x + half_sz.x, pos.y + half_sz.y), ImVec2(pos.x - half_sz.x, pos.y + half_sz.y), pos, col); return;
|
||||||
|
case ImGuiDir_Down: draw_list->AddTriangleFilled(ImVec2(pos.x - half_sz.x, pos.y - half_sz.y), ImVec2(pos.x + half_sz.x, pos.y - half_sz.y), pos, col); return;
|
||||||
|
case ImGuiDir_None: case ImGuiDir_COUNT: break; // Fix warnings
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
static inline float ImAcos01(float x)
|
static inline float ImAcos01(float x)
|
||||||
{
|
{
|
||||||
if (x <= 0.0f) return IM_PI * 0.5f;
|
if (x <= 0.0f) return IM_PI * 0.5f;
|
||||||
if (x >= 1.0f) return 0.0f;
|
if (x >= 1.0f) return 0.0f;
|
||||||
return acosf(x);
|
return ImAcos(x);
|
||||||
//return (-0.69813170079773212f * x * x - 0.87266462599716477f) * x + 1.5707963267948966f; // Cheap approximation, may be enough for what we do.
|
//return (-0.69813170079773212f * x * x - 0.87266462599716477f) * x + 1.5707963267948966f; // Cheap approximation, may be enough for what we do.
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2766,11 +2926,13 @@ void ImGui::RenderRectFilledRangeH(ImDrawList* draw_list, const ImRect& rect, Im
|
|||||||
draw_list->PathFillConvex(col);
|
draw_list->PathFillConvex(col);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
// DEFAULT FONT DATA
|
// [SECTION] Decompression code
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
// Compressed with stb_compress() then converted to a C array.
|
// Compressed with stb_compress() then converted to a C array and encoded as base85.
|
||||||
// Use the program in misc/fonts/binary_to_compressed_c.cpp to create the array from a TTF file.
|
// Use the program in misc/fonts/binary_to_compressed_c.cpp to create the array from a TTF file.
|
||||||
|
// The purpose of encoding as base85 instead of "0x00,0x01,..." style is only save on _source code_ size.
|
||||||
// Decompression from stb.h (public domain) by Sean Barrett https://github.com/nothings/stb/blob/master/stb.h
|
// Decompression from stb.h (public domain) by Sean Barrett https://github.com/nothings/stb/blob/master/stb.h
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
|
|
||||||
@ -2885,6 +3047,8 @@ static unsigned int stb_decompress(unsigned char *output, const unsigned char *i
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//-----------------------------------------------------------------------------
|
||||||
|
// [SECTION] Default font data (ProggyClean.ttf)
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
// ProggyClean.ttf
|
// ProggyClean.ttf
|
||||||
// Copyright (c) 2004, 2005 Tristan Grimmer
|
// Copyright (c) 2004, 2005 Tristan Grimmer
|
||||||
@ -2892,7 +3056,8 @@ static unsigned int stb_decompress(unsigned char *output, const unsigned char *i
|
|||||||
// Download and more information at http://upperbounds.net
|
// Download and more information at http://upperbounds.net
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
// File: 'ProggyClean.ttf' (41208 bytes)
|
// File: 'ProggyClean.ttf' (41208 bytes)
|
||||||
// Exported using binary_to_compressed_c.cpp
|
// Exported using misc/fonts/binary_to_compressed_c.cpp (with compression + base85 string encoding).
|
||||||
|
// The purpose of encoding as base85 instead of "0x00,0x01,..." style is only save on _source code_ size.
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
static const char proggy_clean_ttf_compressed_data_base85[11980+1] =
|
static const char proggy_clean_ttf_compressed_data_base85[11980+1] =
|
||||||
"7])#######hV0qs'/###[),##/l:$#Q6>##5[n42>c-TH`->>#/e>11NNV=Bv(*:.F?uu#(gRU.o0XGH`$vhLG1hxt9?W`#,5LsCp#-i>.r$<$6pD>Lb';9Crc6tgXmKVeU2cD4Eo3R/"
|
"7])#######hV0qs'/###[),##/l:$#Q6>##5[n42>c-TH`->>#/e>11NNV=Bv(*:.F?uu#(gRU.o0XGH`$vhLG1hxt9?W`#,5LsCp#-i>.r$<$6pD>Lb';9Crc6tgXmKVeU2cD4Eo3R/"
|
||||||
|
File diff suppressed because it is too large
Load Diff
5725
Source/ThirdParty/ImGuiLibrary/Private/imgui_widgets.cpp
vendored
Normal file
5725
Source/ThirdParty/ImGuiLibrary/Private/imgui_widgets.cpp
vendored
Normal file
File diff suppressed because it is too large
Load Diff
@ -1,10 +1,9 @@
|
|||||||
// [ImGui] this is a slightly modified version of stb_textedit.h 1.9. Those changes would need to be pushed into nothings/stb
|
// [ImGui] this is a slightly modified version of stb_textedit.h 1.12. Those changes would need to be pushed into nothings/stb
|
||||||
// [ImGui] - fixed linestart handler when over last character of multi-line buffer + simplified existing code (#588, #815)
|
// [ImGui] - 2018-06: fixed undo/redo after pasting large amount of text (over 32 kb). Redo will still fail when undo buffers are exhausted, but text won't be corrupted (see nothings/stb issue #620)
|
||||||
// [ImGui] - fixed a state corruption/crash bug in stb_text_redo and stb_textedit_discard_redo (#715)
|
// [ImGui] - 2018-06: fix in stb_textedit_discard_redo (see https://github.com/nothings/stb/issues/321)
|
||||||
// [ImGui] - fixed a crash bug in stb_textedit_discard_redo (#681)
|
|
||||||
// [ImGui] - fixed some minor warnings
|
// [ImGui] - fixed some minor warnings
|
||||||
|
|
||||||
// stb_textedit.h - v1.9 - public domain - Sean Barrett
|
// stb_textedit.h - v1.12 - public domain - Sean Barrett
|
||||||
// Development of this library was sponsored by RAD Game Tools
|
// Development of this library was sponsored by RAD Game Tools
|
||||||
//
|
//
|
||||||
// This C header file implements the guts of a multi-line text-editing
|
// This C header file implements the guts of a multi-line text-editing
|
||||||
@ -23,9 +22,7 @@
|
|||||||
//
|
//
|
||||||
// LICENSE
|
// LICENSE
|
||||||
//
|
//
|
||||||
// This software is dual-licensed to the public domain and under the following
|
// See end of file for license information.
|
||||||
// license: you are granted a perpetual, irrevocable license to copy, modify,
|
|
||||||
// publish, and distribute this file as you see fit.
|
|
||||||
//
|
//
|
||||||
//
|
//
|
||||||
// DEPENDENCIES
|
// DEPENDENCIES
|
||||||
@ -37,6 +34,9 @@
|
|||||||
//
|
//
|
||||||
// VERSION HISTORY
|
// VERSION HISTORY
|
||||||
//
|
//
|
||||||
|
// 1.12 (2018-01-29) user can change STB_TEXTEDIT_KEYTYPE, fix redo to avoid crash
|
||||||
|
// 1.11 (2017-03-03) fix HOME on last line, dragging off single-line textfield
|
||||||
|
// 1.10 (2016-10-25) supress warnings about casting away const with -Wcast-qual
|
||||||
// 1.9 (2016-08-27) customizable move-by-word
|
// 1.9 (2016-08-27) customizable move-by-word
|
||||||
// 1.8 (2016-04-02) better keyboard handling when mouse button is down
|
// 1.8 (2016-04-02) better keyboard handling when mouse button is down
|
||||||
// 1.7 (2015-09-13) change y range handling in case baseline is non-0
|
// 1.7 (2015-09-13) change y range handling in case baseline is non-0
|
||||||
@ -55,12 +55,13 @@
|
|||||||
//
|
//
|
||||||
// Ulf Winklemann: move-by-word in 1.1
|
// Ulf Winklemann: move-by-word in 1.1
|
||||||
// Fabian Giesen: secondary key inputs in 1.5
|
// Fabian Giesen: secondary key inputs in 1.5
|
||||||
// Martins Mozeiko: STB_TEXTEDIT_memmove
|
// Martins Mozeiko: STB_TEXTEDIT_memmove in 1.6
|
||||||
//
|
//
|
||||||
// Bugfixes:
|
// Bugfixes:
|
||||||
// Scott Graham
|
// Scott Graham
|
||||||
// Daniel Keller
|
// Daniel Keller
|
||||||
// Omar Cornut
|
// Omar Cornut
|
||||||
|
// Dan Thompson
|
||||||
//
|
//
|
||||||
// USAGE
|
// USAGE
|
||||||
//
|
//
|
||||||
@ -90,8 +91,8 @@
|
|||||||
// moderate sizes. The undo system does no memory allocations, so
|
// moderate sizes. The undo system does no memory allocations, so
|
||||||
// it grows STB_TexteditState by the worst-case storage which is (in bytes):
|
// it grows STB_TexteditState by the worst-case storage which is (in bytes):
|
||||||
//
|
//
|
||||||
// [4 + sizeof(STB_TEXTEDIT_POSITIONTYPE)] * STB_TEXTEDIT_UNDOSTATE_COUNT
|
// [4 + 3 * sizeof(STB_TEXTEDIT_POSITIONTYPE)] * STB_TEXTEDIT_UNDOSTATE_COUNT
|
||||||
// + sizeof(STB_TEXTEDIT_CHARTYPE) * STB_TEXTEDIT_UNDOCHAR_COUNT
|
// + sizeof(STB_TEXTEDIT_CHARTYPE) * STB_TEXTEDIT_UNDOCHAR_COUNT
|
||||||
//
|
//
|
||||||
//
|
//
|
||||||
// Implementation mode:
|
// Implementation mode:
|
||||||
@ -114,7 +115,7 @@
|
|||||||
// Symbols that must be the same in header-file and implementation mode:
|
// Symbols that must be the same in header-file and implementation mode:
|
||||||
//
|
//
|
||||||
// STB_TEXTEDIT_CHARTYPE the character type
|
// STB_TEXTEDIT_CHARTYPE the character type
|
||||||
// STB_TEXTEDIT_POSITIONTYPE small type that a valid cursor position
|
// STB_TEXTEDIT_POSITIONTYPE small type that is a valid cursor position
|
||||||
// STB_TEXTEDIT_UNDOSTATECOUNT the number of undo states to allow
|
// STB_TEXTEDIT_UNDOSTATECOUNT the number of undo states to allow
|
||||||
// STB_TEXTEDIT_UNDOCHARCOUNT the number of characters to store in the undo buffer
|
// STB_TEXTEDIT_UNDOCHARCOUNT the number of characters to store in the undo buffer
|
||||||
//
|
//
|
||||||
@ -203,7 +204,7 @@
|
|||||||
// void stb_textedit_drag(STB_TEXTEDIT_STRING *str, STB_TexteditState *state, float x, float y)
|
// void stb_textedit_drag(STB_TEXTEDIT_STRING *str, STB_TexteditState *state, float x, float y)
|
||||||
// int stb_textedit_cut(STB_TEXTEDIT_STRING *str, STB_TexteditState *state)
|
// int stb_textedit_cut(STB_TEXTEDIT_STRING *str, STB_TexteditState *state)
|
||||||
// int stb_textedit_paste(STB_TEXTEDIT_STRING *str, STB_TexteditState *state, STB_TEXTEDIT_CHARTYPE *text, int len)
|
// int stb_textedit_paste(STB_TEXTEDIT_STRING *str, STB_TexteditState *state, STB_TEXTEDIT_CHARTYPE *text, int len)
|
||||||
// void stb_textedit_key(STB_TEXTEDIT_STRING *str, STB_TexteditState *state, int key)
|
// void stb_textedit_key(STB_TEXTEDIT_STRING *str, STB_TexteditState *state, STB_TEXEDIT_KEYTYPE key)
|
||||||
//
|
//
|
||||||
// Each of these functions potentially updates the string and updates the
|
// Each of these functions potentially updates the string and updates the
|
||||||
// state.
|
// state.
|
||||||
@ -237,7 +238,9 @@
|
|||||||
// inputs, set a high bit to distinguish the two; then you can define the
|
// inputs, set a high bit to distinguish the two; then you can define the
|
||||||
// various definitions like STB_TEXTEDIT_K_LEFT have the is-key-event bit
|
// various definitions like STB_TEXTEDIT_K_LEFT have the is-key-event bit
|
||||||
// set, and make STB_TEXTEDIT_KEYTOCHAR check that the is-key-event bit is
|
// set, and make STB_TEXTEDIT_KEYTOCHAR check that the is-key-event bit is
|
||||||
// clear.
|
// clear. STB_TEXTEDIT_KEYTYPE defaults to int, but you can #define it to
|
||||||
|
// anything other type you wante before including.
|
||||||
|
//
|
||||||
//
|
//
|
||||||
// When rendering, you can read the cursor position and selection state from
|
// When rendering, you can read the cursor position and selection state from
|
||||||
// the STB_TexteditState.
|
// the STB_TexteditState.
|
||||||
@ -297,9 +300,9 @@ typedef struct
|
|||||||
{
|
{
|
||||||
// private data
|
// private data
|
||||||
STB_TEXTEDIT_POSITIONTYPE where;
|
STB_TEXTEDIT_POSITIONTYPE where;
|
||||||
short insert_length;
|
STB_TEXTEDIT_POSITIONTYPE insert_length;
|
||||||
short delete_length;
|
STB_TEXTEDIT_POSITIONTYPE delete_length;
|
||||||
short char_storage;
|
int char_storage;
|
||||||
} StbUndoRecord;
|
} StbUndoRecord;
|
||||||
|
|
||||||
typedef struct
|
typedef struct
|
||||||
@ -308,7 +311,7 @@ typedef struct
|
|||||||
StbUndoRecord undo_rec [STB_TEXTEDIT_UNDOSTATECOUNT];
|
StbUndoRecord undo_rec [STB_TEXTEDIT_UNDOSTATECOUNT];
|
||||||
STB_TEXTEDIT_CHARTYPE undo_char[STB_TEXTEDIT_UNDOCHARCOUNT];
|
STB_TEXTEDIT_CHARTYPE undo_char[STB_TEXTEDIT_UNDOCHARCOUNT];
|
||||||
short undo_point, redo_point;
|
short undo_point, redo_point;
|
||||||
short undo_char_point, redo_char_point;
|
int undo_char_point, redo_char_point;
|
||||||
} StbUndoState;
|
} StbUndoState;
|
||||||
|
|
||||||
typedef struct
|
typedef struct
|
||||||
@ -450,6 +453,15 @@ static int stb_text_locate_coord(STB_TEXTEDIT_STRING *str, float x, float y)
|
|||||||
// API click: on mouse down, move the cursor to the clicked location, and reset the selection
|
// API click: on mouse down, move the cursor to the clicked location, and reset the selection
|
||||||
static void stb_textedit_click(STB_TEXTEDIT_STRING *str, STB_TexteditState *state, float x, float y)
|
static void stb_textedit_click(STB_TEXTEDIT_STRING *str, STB_TexteditState *state, float x, float y)
|
||||||
{
|
{
|
||||||
|
// In single-line mode, just always make y = 0. This lets the drag keep working if the mouse
|
||||||
|
// goes off the top or bottom of the text
|
||||||
|
if( state->single_line )
|
||||||
|
{
|
||||||
|
StbTexteditRow r;
|
||||||
|
STB_TEXTEDIT_LAYOUTROW(&r, str, 0);
|
||||||
|
y = r.ymin;
|
||||||
|
}
|
||||||
|
|
||||||
state->cursor = stb_text_locate_coord(str, x, y);
|
state->cursor = stb_text_locate_coord(str, x, y);
|
||||||
state->select_start = state->cursor;
|
state->select_start = state->cursor;
|
||||||
state->select_end = state->cursor;
|
state->select_end = state->cursor;
|
||||||
@ -459,9 +471,21 @@ static void stb_textedit_click(STB_TEXTEDIT_STRING *str, STB_TexteditState *stat
|
|||||||
// API drag: on mouse drag, move the cursor and selection endpoint to the clicked location
|
// API drag: on mouse drag, move the cursor and selection endpoint to the clicked location
|
||||||
static void stb_textedit_drag(STB_TEXTEDIT_STRING *str, STB_TexteditState *state, float x, float y)
|
static void stb_textedit_drag(STB_TEXTEDIT_STRING *str, STB_TexteditState *state, float x, float y)
|
||||||
{
|
{
|
||||||
int p = stb_text_locate_coord(str, x, y);
|
int p = 0;
|
||||||
|
|
||||||
|
// In single-line mode, just always make y = 0. This lets the drag keep working if the mouse
|
||||||
|
// goes off the top or bottom of the text
|
||||||
|
if( state->single_line )
|
||||||
|
{
|
||||||
|
StbTexteditRow r;
|
||||||
|
STB_TEXTEDIT_LAYOUTROW(&r, str, 0);
|
||||||
|
y = r.ymin;
|
||||||
|
}
|
||||||
|
|
||||||
if (state->select_start == state->select_end)
|
if (state->select_start == state->select_end)
|
||||||
state->select_start = state->cursor;
|
state->select_start = state->cursor;
|
||||||
|
|
||||||
|
p = stb_text_locate_coord(str, x, y);
|
||||||
state->cursor = state->select_end = p;
|
state->cursor = state->select_end = p;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -677,7 +701,7 @@ static int stb_textedit_cut(STB_TEXTEDIT_STRING *str, STB_TexteditState *state)
|
|||||||
}
|
}
|
||||||
|
|
||||||
// API paste: replace existing selection with passed-in text
|
// API paste: replace existing selection with passed-in text
|
||||||
static int stb_textedit_paste(STB_TEXTEDIT_STRING *str, STB_TexteditState *state, STB_TEXTEDIT_CHARTYPE const *text, int len)
|
static int stb_textedit_paste_internal(STB_TEXTEDIT_STRING *str, STB_TexteditState *state, STB_TEXTEDIT_CHARTYPE *text, int len)
|
||||||
{
|
{
|
||||||
// if there's a selection, the paste should delete it
|
// if there's a selection, the paste should delete it
|
||||||
stb_textedit_clamp(str, state);
|
stb_textedit_clamp(str, state);
|
||||||
@ -695,8 +719,12 @@ static int stb_textedit_paste(STB_TEXTEDIT_STRING *str, STB_TexteditState *state
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifndef STB_TEXTEDIT_KEYTYPE
|
||||||
|
#define STB_TEXTEDIT_KEYTYPE int
|
||||||
|
#endif
|
||||||
|
|
||||||
// API key: process a keyboard input
|
// API key: process a keyboard input
|
||||||
static void stb_textedit_key(STB_TEXTEDIT_STRING *str, STB_TexteditState *state, int key)
|
static void stb_textedit_key(STB_TEXTEDIT_STRING *str, STB_TexteditState *state, STB_TEXTEDIT_KEYTYPE key)
|
||||||
{
|
{
|
||||||
retry:
|
retry:
|
||||||
switch (key) {
|
switch (key) {
|
||||||
@ -1073,14 +1101,14 @@ static void stb_textedit_discard_undo(StbUndoState *state)
|
|||||||
if (state->undo_rec[0].char_storage >= 0) {
|
if (state->undo_rec[0].char_storage >= 0) {
|
||||||
int n = state->undo_rec[0].insert_length, i;
|
int n = state->undo_rec[0].insert_length, i;
|
||||||
// delete n characters from all other records
|
// delete n characters from all other records
|
||||||
state->undo_char_point = state->undo_char_point - (short) n; // vsnet05
|
state->undo_char_point -= n;
|
||||||
STB_TEXTEDIT_memmove(state->undo_char, state->undo_char + n, (size_t) ((size_t)state->undo_char_point*sizeof(STB_TEXTEDIT_CHARTYPE)));
|
STB_TEXTEDIT_memmove(state->undo_char, state->undo_char + n, (size_t) (state->undo_char_point*sizeof(STB_TEXTEDIT_CHARTYPE)));
|
||||||
for (i=0; i < state->undo_point; ++i)
|
for (i=0; i < state->undo_point; ++i)
|
||||||
if (state->undo_rec[i].char_storage >= 0)
|
if (state->undo_rec[i].char_storage >= 0)
|
||||||
state->undo_rec[i].char_storage = state->undo_rec[i].char_storage - (short) n; // vsnet05 // @OPTIMIZE: get rid of char_storage and infer it
|
state->undo_rec[i].char_storage -= n; // @OPTIMIZE: get rid of char_storage and infer it
|
||||||
}
|
}
|
||||||
--state->undo_point;
|
--state->undo_point;
|
||||||
STB_TEXTEDIT_memmove(state->undo_rec, state->undo_rec+1, (size_t) ((size_t)state->undo_point*sizeof(state->undo_rec[0])));
|
STB_TEXTEDIT_memmove(state->undo_rec, state->undo_rec+1, (size_t) (state->undo_point*sizeof(state->undo_rec[0])));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1096,14 +1124,17 @@ static void stb_textedit_discard_redo(StbUndoState *state)
|
|||||||
// if the k'th undo state has characters, clean those up
|
// if the k'th undo state has characters, clean those up
|
||||||
if (state->undo_rec[k].char_storage >= 0) {
|
if (state->undo_rec[k].char_storage >= 0) {
|
||||||
int n = state->undo_rec[k].insert_length, i;
|
int n = state->undo_rec[k].insert_length, i;
|
||||||
// delete n characters from all other records
|
// move the remaining redo character data to the end of the buffer
|
||||||
state->redo_char_point = state->redo_char_point + (short) n; // vsnet05
|
state->redo_char_point += n;
|
||||||
STB_TEXTEDIT_memmove(state->undo_char + state->redo_char_point, state->undo_char + state->redo_char_point-n, (size_t) ((size_t)(STB_TEXTEDIT_UNDOCHARCOUNT - state->redo_char_point)*sizeof(STB_TEXTEDIT_CHARTYPE)));
|
STB_TEXTEDIT_memmove(state->undo_char + state->redo_char_point, state->undo_char + state->redo_char_point-n, (size_t) ((STB_TEXTEDIT_UNDOCHARCOUNT - state->redo_char_point)*sizeof(STB_TEXTEDIT_CHARTYPE)));
|
||||||
|
// adjust the position of all the other records to account for above memmove
|
||||||
for (i=state->redo_point; i < k; ++i)
|
for (i=state->redo_point; i < k; ++i)
|
||||||
if (state->undo_rec[i].char_storage >= 0)
|
if (state->undo_rec[i].char_storage >= 0)
|
||||||
state->undo_rec[i].char_storage = state->undo_rec[i].char_storage + (short) n; // vsnet05
|
state->undo_rec[i].char_storage += n;
|
||||||
}
|
}
|
||||||
STB_TEXTEDIT_memmove(state->undo_rec + state->redo_point, state->undo_rec + state->redo_point-1, (size_t) ((size_t)(STB_TEXTEDIT_UNDOSTATECOUNT - state->redo_point)*sizeof(state->undo_rec[0])));
|
// now move all the redo records towards the end of the buffer; the first one is at 'redo_point'
|
||||||
|
STB_TEXTEDIT_memmove(state->undo_rec + state->redo_point+1, state->undo_rec + state->redo_point, (size_t) ((STB_TEXTEDIT_UNDOSTATECOUNT - state->redo_point)*sizeof(state->undo_rec[0])));
|
||||||
|
// now move redo_point to point to the new one
|
||||||
++state->redo_point;
|
++state->redo_point;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1139,15 +1170,15 @@ static STB_TEXTEDIT_CHARTYPE *stb_text_createundo(StbUndoState *state, int pos,
|
|||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
r->where = pos;
|
r->where = pos;
|
||||||
r->insert_length = (short) insert_len;
|
r->insert_length = (STB_TEXTEDIT_POSITIONTYPE) insert_len;
|
||||||
r->delete_length = (short) delete_len;
|
r->delete_length = (STB_TEXTEDIT_POSITIONTYPE) delete_len;
|
||||||
|
|
||||||
if (insert_len == 0) {
|
if (insert_len == 0) {
|
||||||
r->char_storage = -1;
|
r->char_storage = -1;
|
||||||
return NULL;
|
return NULL;
|
||||||
} else {
|
} else {
|
||||||
r->char_storage = state->undo_char_point;
|
r->char_storage = state->undo_char_point;
|
||||||
state->undo_char_point = state->undo_char_point + (short) insert_len;
|
state->undo_char_point += insert_len;
|
||||||
return &state->undo_char[r->char_storage];
|
return &state->undo_char[r->char_storage];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1187,16 +1218,16 @@ static void stb_text_undo(STB_TEXTEDIT_STRING *str, STB_TexteditState *state)
|
|||||||
|
|
||||||
// there's definitely room to store the characters eventually
|
// there's definitely room to store the characters eventually
|
||||||
while (s->undo_char_point + u.delete_length > s->redo_char_point) {
|
while (s->undo_char_point + u.delete_length > s->redo_char_point) {
|
||||||
// there's currently not enough room, so discard a redo record
|
|
||||||
stb_textedit_discard_redo(s);
|
|
||||||
// should never happen:
|
// should never happen:
|
||||||
if (s->redo_point == STB_TEXTEDIT_UNDOSTATECOUNT)
|
if (s->redo_point == STB_TEXTEDIT_UNDOSTATECOUNT)
|
||||||
return;
|
return;
|
||||||
|
// there's currently not enough room, so discard a redo record
|
||||||
|
stb_textedit_discard_redo(s);
|
||||||
}
|
}
|
||||||
r = &s->undo_rec[s->redo_point-1];
|
r = &s->undo_rec[s->redo_point-1];
|
||||||
|
|
||||||
r->char_storage = s->redo_char_point - u.delete_length;
|
r->char_storage = s->redo_char_point - u.delete_length;
|
||||||
s->redo_char_point = s->redo_char_point - (short) u.delete_length;
|
s->redo_char_point = s->redo_char_point - u.delete_length;
|
||||||
|
|
||||||
// now save the characters
|
// now save the characters
|
||||||
for (i=0; i < u.delete_length; ++i)
|
for (i=0; i < u.delete_length; ++i)
|
||||||
@ -1318,4 +1349,61 @@ static void stb_textedit_initialize_state(STB_TexteditState *state, int is_singl
|
|||||||
{
|
{
|
||||||
stb_textedit_clear_state(state, is_single_line);
|
stb_textedit_clear_state(state, is_single_line);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if defined(__GNUC__) || defined(__clang__)
|
||||||
|
#pragma GCC diagnostic push
|
||||||
|
#pragma GCC diagnostic ignored "-Wcast-qual"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
static int stb_textedit_paste(STB_TEXTEDIT_STRING *str, STB_TexteditState *state, STB_TEXTEDIT_CHARTYPE const *ctext, int len)
|
||||||
|
{
|
||||||
|
return stb_textedit_paste_internal(str, state, (STB_TEXTEDIT_CHARTYPE *) ctext, len);
|
||||||
|
}
|
||||||
|
|
||||||
|
#if defined(__GNUC__) || defined(__clang__)
|
||||||
|
#pragma GCC diagnostic pop
|
||||||
|
#endif
|
||||||
|
|
||||||
#endif//STB_TEXTEDIT_IMPLEMENTATION
|
#endif//STB_TEXTEDIT_IMPLEMENTATION
|
||||||
|
|
||||||
|
/*
|
||||||
|
------------------------------------------------------------------------------
|
||||||
|
This software is available under 2 licenses -- choose whichever you prefer.
|
||||||
|
------------------------------------------------------------------------------
|
||||||
|
ALTERNATIVE A - MIT License
|
||||||
|
Copyright (c) 2017 Sean Barrett
|
||||||
|
Permission is hereby granted, free of charge, to any person obtaining a copy of
|
||||||
|
this software and associated documentation files (the "Software"), to deal in
|
||||||
|
the Software without restriction, including without limitation the rights to
|
||||||
|
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
|
||||||
|
of the Software, and to permit persons to whom the Software is furnished to do
|
||||||
|
so, subject to the following conditions:
|
||||||
|
The above copyright notice and this permission notice shall be included in all
|
||||||
|
copies or substantial portions of the Software.
|
||||||
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||||
|
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||||
|
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||||
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||||
|
SOFTWARE.
|
||||||
|
------------------------------------------------------------------------------
|
||||||
|
ALTERNATIVE B - Public Domain (www.unlicense.org)
|
||||||
|
This is free and unencumbered software released into the public domain.
|
||||||
|
Anyone is free to copy, modify, publish, use, compile, sell, or distribute this
|
||||||
|
software, either in source code form or as a compiled binary, for any purpose,
|
||||||
|
commercial or non-commercial, and by any means.
|
||||||
|
In jurisdictions that recognize copyright laws, the author or authors of this
|
||||||
|
software dedicate any and all copyright interest in the software to the public
|
||||||
|
domain. We make this dedication for the benefit of the public at large and to
|
||||||
|
the detriment of our heirs and successors. We intend this dedication to be an
|
||||||
|
overt act of relinquishment in perpetuity of all present and future rights to
|
||||||
|
this software under copyright law.
|
||||||
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||||
|
AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
|
||||||
|
ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||||
|
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
|
------------------------------------------------------------------------------
|
||||||
|
*/
|
61
Source/ThirdParty/ImGuiLibrary/Private/misc/stl/imgui_stl.cpp
vendored
Normal file
61
Source/ThirdParty/ImGuiLibrary/Private/misc/stl/imgui_stl.cpp
vendored
Normal file
@ -0,0 +1,61 @@
|
|||||||
|
// imgui_stl.cpp
|
||||||
|
// Wrappers for C++ standard library (STL) types (std::string, etc.)
|
||||||
|
// This is also an example of how you may wrap your own similar types.
|
||||||
|
|
||||||
|
// Compatibility:
|
||||||
|
// - std::string support is only guaranteed to work from C++11.
|
||||||
|
// If you try to use it pre-C++11, please share your findings (w/ info about compiler/architecture)
|
||||||
|
|
||||||
|
#include "imgui.h"
|
||||||
|
#include "imgui_stl.h"
|
||||||
|
|
||||||
|
struct InputTextCallback_UserData
|
||||||
|
{
|
||||||
|
std::string* Str;
|
||||||
|
ImGuiInputTextCallback ChainCallback;
|
||||||
|
void* ChainCallbackUserData;
|
||||||
|
};
|
||||||
|
|
||||||
|
static int InputTextCallback(ImGuiInputTextCallbackData* data)
|
||||||
|
{
|
||||||
|
InputTextCallback_UserData* user_data = (InputTextCallback_UserData*)data->UserData;
|
||||||
|
if (data->EventFlag == ImGuiInputTextFlags_CallbackResize)
|
||||||
|
{
|
||||||
|
// Resize string callback
|
||||||
|
std::string* str = user_data->Str;
|
||||||
|
IM_ASSERT(data->Buf == str->c_str());
|
||||||
|
str->resize(data->BufTextLen);
|
||||||
|
data->Buf = (char*)str->c_str();
|
||||||
|
}
|
||||||
|
else if (user_data->ChainCallback)
|
||||||
|
{
|
||||||
|
// Forward to user callback, if any
|
||||||
|
data->UserData = user_data->ChainCallbackUserData;
|
||||||
|
return user_data->ChainCallback(data);
|
||||||
|
}
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool ImGui::InputText(const char* label, std::string* str, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback, void* user_data)
|
||||||
|
{
|
||||||
|
IM_ASSERT((flags & ImGuiInputTextFlags_CallbackResize) == 0);
|
||||||
|
flags |= ImGuiInputTextFlags_CallbackResize;
|
||||||
|
|
||||||
|
InputTextCallback_UserData cb_user_data;
|
||||||
|
cb_user_data.Str = str;
|
||||||
|
cb_user_data.ChainCallback = callback;
|
||||||
|
cb_user_data.ChainCallbackUserData = user_data;
|
||||||
|
return InputText(label, (char*)str->c_str(), str->capacity() + 1, flags, InputTextCallback, &cb_user_data);
|
||||||
|
}
|
||||||
|
|
||||||
|
bool ImGui::InputTextMultiline(const char* label, std::string* str, const ImVec2& size, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback, void* user_data)
|
||||||
|
{
|
||||||
|
IM_ASSERT((flags & ImGuiInputTextFlags_CallbackResize) == 0);
|
||||||
|
flags |= ImGuiInputTextFlags_CallbackResize;
|
||||||
|
|
||||||
|
InputTextCallback_UserData cb_user_data;
|
||||||
|
cb_user_data.Str = str;
|
||||||
|
cb_user_data.ChainCallback = callback;
|
||||||
|
cb_user_data.ChainCallbackUserData = user_data;
|
||||||
|
return InputTextMultiline(label, (char*)str->c_str(), str->capacity() + 1, size, flags, InputTextCallback, &cb_user_data);
|
||||||
|
}
|
132
Source/ThirdParty/ImGuiLibrary/README.md
vendored
132
Source/ThirdParty/ImGuiLibrary/README.md
vendored
@ -3,7 +3,7 @@ dear imgui,
|
|||||||
[![Build Status](https://travis-ci.org/ocornut/imgui.svg?branch=master)](https://travis-ci.org/ocornut/imgui)
|
[![Build Status](https://travis-ci.org/ocornut/imgui.svg?branch=master)](https://travis-ci.org/ocornut/imgui)
|
||||||
[![Coverity Status](https://scan.coverity.com/projects/4720/badge.svg)](https://scan.coverity.com/projects/4720)
|
[![Coverity Status](https://scan.coverity.com/projects/4720/badge.svg)](https://scan.coverity.com/projects/4720)
|
||||||
|
|
||||||
_(This library is free but needs your support to sustain its development. There are many desirable features and maintenance ahead. If you are an individual using dear imgui, please consider donating via Patreon or PayPal. If your company is using dear imgui, please consider financial support (e.g. sponsoring a few weeks/months of development. I can invoice for technical support, custom development etc. E-mail: omarcornut at gmail)._
|
_(This library is free but needs your support to sustain its development. There are many desirable features and maintenance ahead. If you are an individual using dear imgui, please consider donating via Patreon or PayPal. If your company is using dear imgui, please consider financial support (e.g. sponsoring a few weeks/months of development. I can invoice for technical support, custom development etc. Email: omarcornut at gmail)._
|
||||||
|
|
||||||
Monthly donations via Patreon:
|
Monthly donations via Patreon:
|
||||||
<br>[![Patreon](https://cloud.githubusercontent.com/assets/8225057/5990484/70413560-a9ab-11e4-8942-1a63607c0b00.png)](http://www.patreon.com/imgui)
|
<br>[![Patreon](https://cloud.githubusercontent.com/assets/8225057/5990484/70413560-a9ab-11e4-8942-1a63607c0b00.png)](http://www.patreon.com/imgui)
|
||||||
@ -22,6 +22,7 @@ Dear ImGui is self-contained within a few files that you can easily copy and com
|
|||||||
- imgui.h
|
- imgui.h
|
||||||
- imgui_demo.cpp
|
- imgui_demo.cpp
|
||||||
- imgui_draw.cpp
|
- imgui_draw.cpp
|
||||||
|
- imgui_widgets.cpp
|
||||||
- imgui_internal.h
|
- imgui_internal.h
|
||||||
- imconfig.h (empty by default, user-editable)
|
- imconfig.h (empty by default, user-editable)
|
||||||
- stb_rect_pack.h
|
- stb_rect_pack.h
|
||||||
@ -96,7 +97,7 @@ Demo Binaries
|
|||||||
-------------
|
-------------
|
||||||
|
|
||||||
You should be able to build the examples from sources (tested on Windows/Mac/Linux). If you don't, let me know! If you want to have a quick look at some Dear ImGui features, you can download Windows binaries of the demo app here:
|
You should be able to build the examples from sources (tested on Windows/Mac/Linux). If you don't, let me know! If you want to have a quick look at some Dear ImGui features, you can download Windows binaries of the demo app here:
|
||||||
- [imgui-demo-binaries-20180407.zip](http://www.miracleworld.net/imgui/binaries/imgui-demo-binaries-20180407.zip) (Windows binaries, Dear ImGui 1.60 built 2018/04/07, 5 executables)
|
- [imgui-demo-binaries-20180512.zip](http://www.miracleworld.net/imgui/binaries/imgui-demo-binaries-20180512.zip) (Windows binaries, Dear ImGui 1.61 WIP built 2018/05/12, 5 executables)
|
||||||
|
|
||||||
The demo applications are unfortunately not yet DPI aware so expect some blurriness on a 4K screen. For DPI awareness you can load/reload your font at different scale, and scale your Style with `style.ScaleAllSizes()`.
|
The demo applications are unfortunately not yet DPI aware so expect some blurriness on a 4K screen. For DPI awareness you can load/reload your font at different scale, and scale your Style with `style.ScaleAllSizes()`.
|
||||||
|
|
||||||
@ -108,44 +109,46 @@ Integrating Dear ImGui within your custom engine is a matter of 1) wiring mouse/
|
|||||||
_NB: those third-party bindings may be more or less maintained, more or less close to the original API (as people who create language bindings sometimes haven't used the C++ API themselves.. for the good reason that they aren't C++ users). Dear ImGui was designed with C++ in mind and some of the subtleties may be lost in translation with other languages. If your language supports it, I would suggest replicating the function overloading and default parameters used in the original, else the API may be harder to use. In doubt, please check the original C++ version first!_
|
_NB: those third-party bindings may be more or less maintained, more or less close to the original API (as people who create language bindings sometimes haven't used the C++ API themselves.. for the good reason that they aren't C++ users). Dear ImGui was designed with C++ in mind and some of the subtleties may be lost in translation with other languages. If your language supports it, I would suggest replicating the function overloading and default parameters used in the original, else the API may be harder to use. In doubt, please check the original C++ version first!_
|
||||||
|
|
||||||
Languages: (third-party bindings)
|
Languages: (third-party bindings)
|
||||||
- C: [cimgui](https://github.com/Extrawurst/cimgui)
|
- C: [cimgui](https://github.com/Extrawurst/cimgui) or [sonoro1234's cimgui](https://github.com/sonoro1234/cimgui) (more recent update), also see [#1879](https://github.com/ocornut/imgui/issues/1879)
|
||||||
- C#/.Net: [ImGui.NET](https://github.com/mellinoe/ImGui.NET)
|
- C#/.Net: [ImGui.NET](https://github.com/mellinoe/ImGui.NET)
|
||||||
- ChaiScript: [imgui-chaiscript](https://github.com/JuJuBoSc/imgui-chaiscript)
|
- ChaiScript: [imgui-chaiscript](https://github.com/JuJuBoSc/imgui-chaiscript)
|
||||||
- D: [DerelictImgui](https://github.com/Extrawurst/DerelictImgui)
|
- D: [DerelictImgui](https://github.com/Extrawurst/DerelictImgui)
|
||||||
- Go: [go-imgui](https://github.com/Armored-Dragon/go-imgui)
|
- Go: [go-imgui](https://github.com/Armored-Dragon/go-imgui)
|
||||||
- Haxe/hxcpp: [linc_imgui](https://github.com/Aidan63/linc_imgui)
|
- Haxe/hxcpp: [linc_imgui](https://github.com/Aidan63/linc_imgui)
|
||||||
|
- Java: [jimgui](https://github.com/ice1000/jimgui)
|
||||||
- JavaScript: [imgui-js](https://github.com/flyover/imgui-js)
|
- JavaScript: [imgui-js](https://github.com/flyover/imgui-js)
|
||||||
- Lua: [imgui_lua_bindings](https://github.com/patrickriordan/imgui_lua_bindings)
|
- Lua: [imgui_lua_bindings](https://github.com/patrickriordan/imgui_lua_bindings) or [lua-ffi-bindings](https://github.com/thenumbernine/lua-ffi-bindings)
|
||||||
- Odin: [odin-dear_imgui](https://github.com/ThisDrunkDane/odin-dear_imgui)
|
- Odin: [odin-dear_imgui](https://github.com/ThisDrunkDane/odin-dear_imgui)
|
||||||
- Pascal: [imgui-pas](https://github.com/dpethes/imgui-pas)
|
- Pascal: [imgui-pas](https://github.com/dpethes/imgui-pas)
|
||||||
- Python [CyImGui](https://github.com/chromy/cyimgui)
|
- PureBasic: [pb-cimgui](https://github.com/hippyau/pb-cimgui)
|
||||||
- Python [pyimgui](https://github.com/swistakm/pyimgui)
|
- Python [CyImGui](https://github.com/chromy/cyimgui) or [pyimgui](https://github.com/swistakm/pyimgui)
|
||||||
- Rust: [imgui-rs](https://github.com/Gekkio/imgui-rs)
|
- Rust: [imgui-rs](https://github.com/Gekkio/imgui-rs)
|
||||||
|
- Swift [swift-imgui](https://github.com/mnmly/Swift-imgui)
|
||||||
|
|
||||||
Frameworks:
|
Frameworks:
|
||||||
- DirectX 9, DirectX 10, DirectX 11, DirectX 12: [examples/](https://github.com/ocornut/imgui/tree/master/examples)
|
- Renderers: DirectX 9, DirectX 10, DirectX 11, DirectX 12, Metal, OpenGL2, OpenGL3+/ES2/ES3, Vulkan: [examples/](https://github.com/ocornut/imgui/tree/master/examples)
|
||||||
- OpenGL 2/3 (with GLFW or SDL): [examples/](https://github.com/ocornut/imgui/tree/master/examples)
|
- Platform: GLFW, SDL, Win32, OSX, Freeglut: [examples/](https://github.com/ocornut/imgui/tree/master/examples)
|
||||||
- Vulkan (with GLFW): [examples/](https://github.com/ocornut/imgui/tree/master/examples)
|
- Framework: Allegro 5, Marmalade: [examples/](https://github.com/ocornut/imgui/tree/master/examples)
|
||||||
- Allegro 5, iOS, Marmalade: [examples/](https://github.com/ocornut/imgui/tree/master/examples)
|
|
||||||
- Unmerged PR: SDL2 + OpenGLES + Emscripten: [#336](https://github.com/ocornut/imgui/pull/336)
|
- Unmerged PR: SDL2 + OpenGLES + Emscripten: [#336](https://github.com/ocornut/imgui/pull/336)
|
||||||
- Unmerged PR: FreeGlut + OpenGL2: [#801](https://github.com/ocornut/imgui/pull/801)
|
|
||||||
- Unmerged PR: Native Win32 and OSX: [#281](https://github.com/ocornut/imgui/pull/281)
|
|
||||||
- Unmerged PR: Android: [#421](https://github.com/ocornut/imgui/pull/421)
|
- Unmerged PR: Android: [#421](https://github.com/ocornut/imgui/pull/421)
|
||||||
|
- Unmerged PR: ORX: [#1843](https://github.com/ocornut/imgui/pull/1843)
|
||||||
- Cinder: [Cinder-ImGui](https://github.com/simongeilfus/Cinder-ImGui)
|
- Cinder: [Cinder-ImGui](https://github.com/simongeilfus/Cinder-ImGui)
|
||||||
- Cocos2d-x: [imguix](https://github.com/c0i/imguix), [issue #551](https://github.com/ocornut/imgui/issues/551)
|
- Cocos2d-x: [imguix](https://github.com/c0i/imguix), [issue #551](https://github.com/ocornut/imgui/issues/551)
|
||||||
- Flexium/SFML: [FlexGUI](https://github.com/DXsmiley/FlexGUI)
|
- Flexium: [FlexGUI](https://github.com/DXsmiley/FlexGUI)
|
||||||
- GML/GameMakerStudio2: [ImGuiGML](https://marketplace.yoyogames.com/assets/6221/imguigml)
|
- GML/GameMakerStudio2: [ImGuiGML](https://marketplace.yoyogames.com/assets/6221/imguigml)
|
||||||
- Irrlicht: [IrrIMGUI](https://github.com/ZahlGraf/IrrIMGUI)
|
- Irrlicht: [IrrIMGUI](https://github.com/ZahlGraf/IrrIMGUI)
|
||||||
- Ogre: [ogreimgui](https://bitbucket.org/LMCrashy/ogreimgui/src)
|
- Ogre: [ogreimgui](https://bitbucket.org/LMCrashy/ogreimgui/src)
|
||||||
- OpenFrameworks: [ofxImGui](https://github.com/jvcleave/ofxImGui)
|
- OpenFrameworks: [ofxImGui](https://github.com/jvcleave/ofxImGui)
|
||||||
- OpenSceneGraph/OSG: [gist](https://gist.github.com/fulezi/d2442ca7626bf270226014501357042c)
|
- OpenSceneGraph/OSG: [gist](https://gist.github.com/fulezi/d2442ca7626bf270226014501357042c)
|
||||||
- LÖVE: [love-imgui](https://github.com/slages/love-imgui)
|
- LÖVE+Lua: [love-imgui](https://github.com/slages/love-imgui)
|
||||||
|
- Magnum: [magnum-imgui](https://github.com/lecopivo/magnum-imgui), [MagnumImguiPort](https://github.com/lecopivo/MagnumImguiPort)
|
||||||
- NanoRT: [syoyo/imgui](https://github.com/syoyo/imgui/tree/nanort)
|
- NanoRT: [syoyo/imgui](https://github.com/syoyo/imgui/tree/nanort)
|
||||||
- Qt3d: [imgui-qt3d](https://github.com/alpqr/imgui-qt3d)
|
- Qt3d: [imgui-qt3d](https://github.com/alpqr/imgui-qt3d), QOpenGLWindow [qtimgui](https://github.com/ocornut/imgui/issues/1910)
|
||||||
|
- SFML: [imgui-sfml](https://github.com/EliasD/imgui-sfml)
|
||||||
|
- Software renderer: [imgui_software_renderer](https://github.com/emilk/imgui_software_renderer)
|
||||||
- Unreal Engine 4: [segross/UnrealImGui](https://github.com/segross/UnrealImGui) or [sronsse/UnrealEngine_ImGui](https://github.com/sronsse/UnrealEngine_ImGui)
|
- Unreal Engine 4: [segross/UnrealImGui](https://github.com/segross/UnrealImGui) or [sronsse/UnrealEngine_ImGui](https://github.com/sronsse/UnrealEngine_ImGui)
|
||||||
- SFML: [imgui-sfml](https://github.com/EliasD/imgui-sfml) or [imgui-backends](https://github.com/Mischa-Alff/imgui-backends)
|
|
||||||
|
|
||||||
For other bindings: see [this page](https://github.com/ocornut/imgui/wiki/Links/). Also see [wiki](https://github.com/ocornut/imgui/wiki) for a few other links and ideas. Contact me if you would like to add to those lists.
|
For other bindings: see [Bindings](https://github.com/ocornut/imgui/wiki/Bindings/). Also see [Wiki](https://github.com/ocornut/imgui/wiki) for more links and ideas.
|
||||||
|
|
||||||
Roadmap
|
Roadmap
|
||||||
-------
|
-------
|
||||||
@ -158,14 +161,14 @@ Some of the goals for 2018 are:
|
|||||||
|
|
||||||
Gallery
|
Gallery
|
||||||
-------
|
-------
|
||||||
|
|
||||||
User screenshots:
|
User screenshots:
|
||||||
<br>[Gallery Part 1](https://github.com/ocornut/imgui/issues/123) (Feb 2015 to Feb 2016)
|
<br>[Gallery Part 1](https://github.com/ocornut/imgui/issues/123) (Feb 2015 to Feb 2016)
|
||||||
<br>[Gallery Part 2](https://github.com/ocornut/imgui/issues/539) (Feb 2016 to Aug 2016)
|
<br>[Gallery Part 2](https://github.com/ocornut/imgui/issues/539) (Feb 2016 to Aug 2016)
|
||||||
<br>[Gallery Part 3](https://github.com/ocornut/imgui/issues/772) (Aug 2016 to Jan 2017)
|
<br>[Gallery Part 3](https://github.com/ocornut/imgui/issues/772) (Aug 2016 to Jan 2017)
|
||||||
<br>[Gallery Part 4](https://github.com/ocornut/imgui/issues/973) (Jan 2017 to Aug 2017)
|
<br>[Gallery Part 4](https://github.com/ocornut/imgui/issues/973) (Jan 2017 to Aug 2017)
|
||||||
<br>[Gallery Part 5](https://github.com/ocornut/imgui/issues/1269) (Aug 2017 to Feb 2018)
|
<br>[Gallery Part 5](https://github.com/ocornut/imgui/issues/1269) (Aug 2017 to Feb 2018)
|
||||||
<br>[Gallery Part 6](https://github.com/ocornut/imgui/issues/1607) (Feb 2018 onward)
|
<br>[Gallery Part 6](https://github.com/ocornut/imgui/issues/1607) (Feb 2018 to June 2018)
|
||||||
|
<br>[Gallery Part 7](https://github.com/ocornut/imgui/issues/1902) (June 2018 onward)
|
||||||
<br>Also see the [Mega screenshots](https://github.com/ocornut/imgui/issues/1273) for an idea of the available features.
|
<br>Also see the [Mega screenshots](https://github.com/ocornut/imgui/issues/1273) for an idea of the available features.
|
||||||
|
|
||||||
Various tools
|
Various tools
|
||||||
@ -207,45 +210,53 @@ The Immediate Mode GUI paradigm may at first appear unusual to some users. This
|
|||||||
- [Nicolas Guillemot's CppCon'16 flash-talk about Dear ImGui](https://www.youtube.com/watch?v=LSRJ1jZq90k).
|
- [Nicolas Guillemot's CppCon'16 flash-talk about Dear ImGui](https://www.youtube.com/watch?v=LSRJ1jZq90k).
|
||||||
- [Thierry Excoffier's Zero Memory Widget](http://perso.univ-lyon1.fr/thierry.excoffier/ZMW/).
|
- [Thierry Excoffier's Zero Memory Widget](http://perso.univ-lyon1.fr/thierry.excoffier/ZMW/).
|
||||||
|
|
||||||
See the [Links page](https://github.com/ocornut/imgui/wiki/Links) for third-party bindings to different languages and frameworks.
|
See the [Wiki](https://github.com/ocornut/imgui/wiki) and [Bindings](https://github.com/ocornut/imgui/wiki/Bindings) for third-party bindings to different languages and frameworks.
|
||||||
|
|
||||||
|
Support Forums
|
||||||
|
--------------
|
||||||
|
|
||||||
|
If you have issues with: compiling, linking, adding fonts, running or displaying Dear ImGui, or wiring inputs: please post on the Discourse forum: https://discourse.dearimgui.org/c/getting-started.
|
||||||
|
|
||||||
|
For any other questions, bug reports, requests, feedback, you may post on https://github.com/ocornut/imgui/issues.
|
||||||
|
|
||||||
Frequently Asked Question (FAQ)
|
Frequently Asked Question (FAQ)
|
||||||
-------------------------------
|
-------------------------------
|
||||||
|
|
||||||
<b>Where is the documentation?</b>
|
**Where is the documentation?**
|
||||||
|
|
||||||
- The documentation is at the top of imgui.cpp + effectively imgui.h.
|
- The documentation is at the top of imgui.cpp + effectively imgui.h.
|
||||||
- Example code is in imgui_demo.cpp and particularly the ImGui::ShowDemoWindow() function. It covers most features of ImGui so you can read the code and call the function itself to see its output.
|
- Example code is in imgui_demo.cpp and particularly the ImGui::ShowDemoWindow() function. It covers most features of ImGui so you can read the code and call the function itself to see its output.
|
||||||
- Standalone example applications using e.g. OpenGL/DirectX are provided in the examples/ folder.
|
- Standalone example applications using e.g. OpenGL/DirectX are provided in the examples/ folder.
|
||||||
- We obviously needs better documentation! Consider contributing or becoming a [Patron](http://www.patreon.com/imgui) to promote this effort.
|
- We obviously needs better documentation! Consider contributing or becoming a [Patron](http://www.patreon.com/imgui) to promote this effort.
|
||||||
|
|
||||||
<b>Which version should I get?</b>
|
**Which version should I get?**
|
||||||
|
|
||||||
I occasionally tag [Releases](https://github.com/ocornut/imgui/releases) but it is generally safe and recommended to sync to master/latest. The library is fairly stable and regressions tend to be fixed fast when reported.
|
I occasionally tag [Releases](https://github.com/ocornut/imgui/releases) but it is generally safe and recommended to sync to master/latest. The library is fairly stable and regressions tend to be fixed fast when reported.
|
||||||
|
|
||||||
<b>Who uses Dear ImGui?</b>
|
**Who uses Dear ImGui?**
|
||||||
|
|
||||||
See the [Software using dear imgui page](https://github.com/ocornut/imgui/wiki/Software-using-dear-imgui) for an (incomplete) list of games/software which are publicly known to use dear imgui. Please add yours if you can!
|
See the [Software using dear imgui page](https://github.com/ocornut/imgui/wiki/Software-using-dear-imgui) for an (incomplete) list of games/software which are publicly known to use dear imgui. Please add yours if you can!
|
||||||
|
|
||||||
<b>Why the odd dual naming, "dear imgui" vs "ImGui"?</b>
|
**Why the odd dual naming, "dear imgui" vs "ImGui"?**
|
||||||
|
|
||||||
The library started its life and is best known as "ImGui" only due to the fact that I didn't give it a proper name when I released it. However, the term IMGUI (immediate-mode graphical user interface) was coined before and is being used in variety of other situations. It seemed confusing and unfair to hog the name. To reduce the ambiguity without affecting existing codebases, I have decided on an alternate, longer name "dear imgui" that people can use to refer to this specific library in ambiguous situations.
|
The library started its life and is best known as "ImGui" only due to the fact that I didn't give it a proper name when I released it. However, the term IMGUI (immediate-mode graphical user interface) was coined before and is being used in variety of other situations. It seemed confusing and unfair to hog the name. To reduce the ambiguity without affecting existing codebases, I have decided on an alternate, longer name "dear imgui" that people can use to refer to this specific library in ambiguous situations.
|
||||||
|
|
||||||
<b>How can I tell whether to dispatch mouse/keyboard to imgui or to my application?</b>
|
**How can I tell whether to dispatch mouse/keyboard to imgui or to my application?**
|
||||||
<br><b>How can I display an image? What is ImTextureID, how does it works?</b>
|
<br>**How can I display an image? What is ImTextureID, how does it works?**
|
||||||
<br><b>How can I have multiple widgets with the same label or without a label? A primer on labels and the ID Stack.</b>
|
<br>**How can I have multiple widgets with the same label or without a label? A primer on labels and the ID Stack.**
|
||||||
<br><b>How can I load a different font than the default?</b>
|
<br>**How can I use my own math types instead of ImVec2/ImVec4?**
|
||||||
<br><b>How can I easily use icons in my application?</b>
|
<br>**How can I load a different font than the default?**
|
||||||
<br><b>How can I load multiple fonts?</b>
|
<br>**How can I easily use icons in my application?**
|
||||||
<br><b>How can I display and input non-latin characters such as Chinese, Japanese, Korean, Cyrillic?</b>
|
<br>**How can I load multiple fonts?**
|
||||||
<br><b>How can I use the drawing facilities without an Dear ImGui window? (using ImDrawList API)</b>
|
<br>**How can I display and input non-latin characters such as Chinese, Japanese, Korean, Cyrillic?**
|
||||||
<br><b>I integrated Dear ImGui in my engine and the text or lines are blurry..</b>
|
<br>**How can I use the drawing facilities without an Dear ImGui window? (using ImDrawList API)**
|
||||||
<br><b>I integrated Dear ImGui in my engine and some elements are disappearing when I move windows around..</b>
|
<br>**I integrated Dear ImGui in my engine and the text or lines are blurry..**
|
||||||
<br><b>How can I help?</b>
|
<br>**I integrated Dear ImGui in my engine and some elements are disappearing when I move windows around..**
|
||||||
|
<br>**How can I help?**
|
||||||
|
|
||||||
See the FAQ in imgui.cpp for answers.
|
See the FAQ in imgui.cpp for answers.
|
||||||
|
|
||||||
<b>How do you use Dear ImGui on a platform that may not have a mouse or keyboard?</b>
|
**How do you use Dear ImGui on a platform that may not have a mouse or keyboard?**
|
||||||
|
|
||||||
You can control Dear ImGui with a gamepad, see the explanation in imgui.cpp about how to use the navigation feature (short version: map your gamepad inputs into the `io.NavInputs[]` array and set `io.ConfigFlags |= ImGuiConfigFlags_NavEnableGamepad`).
|
You can control Dear ImGui with a gamepad, see the explanation in imgui.cpp about how to use the navigation feature (short version: map your gamepad inputs into the `io.NavInputs[]` array and set `io.ConfigFlags |= ImGuiConfigFlags_NavEnableGamepad`).
|
||||||
|
|
||||||
@ -253,28 +264,28 @@ You can share your computer mouse seamlessly with your console/tablet/phone usin
|
|||||||
|
|
||||||
For touch inputs, you can increase the hit box of widgets (via the _style.TouchPadding_ setting) to accommodate a little for the lack of precision of touch inputs, but it is recommended you use a mouse or gamepad to allow optimizing for screen real-estate and precision.
|
For touch inputs, you can increase the hit box of widgets (via the _style.TouchPadding_ setting) to accommodate a little for the lack of precision of touch inputs, but it is recommended you use a mouse or gamepad to allow optimizing for screen real-estate and precision.
|
||||||
|
|
||||||
<b>Can you create elaborate/serious tools with Dear ImGui?</b>
|
**Can you create elaborate/serious tools with Dear ImGui?**
|
||||||
|
|
||||||
Yes. People have written game editors, data browsers, debuggers, profilers and all sort of non-trivial tools with the library. In my experience the simplicity of the API is very empowering. Your UI runs close to your live data. Make the tools always-on and everybody in the team will be inclined to create new tools (as opposed to more "offline" UI toolkits where only a fraction of your team effectively creates tools). The list of sponsors below is also an indicator that serious game teams have been using the library.
|
Yes. People have written game editors, data browsers, debuggers, profilers and all sort of non-trivial tools with the library. In my experience the simplicity of the API is very empowering. Your UI runs close to your live data. Make the tools always-on and everybody in the team will be inclined to create new tools (as opposed to more "offline" UI toolkits where only a fraction of your team effectively creates tools). The list of sponsors below is also an indicator that serious game teams have been using the library.
|
||||||
|
|
||||||
Dear ImGui is very programmer centric and the immediate-mode GUI paradigm might requires you to readjust some habits before you can realize its full potential. Dear ImGui is about making things that are simple, efficient and powerful.
|
Dear ImGui is very programmer centric and the immediate-mode GUI paradigm might requires you to readjust some habits before you can realize its full potential. Dear ImGui is about making things that are simple, efficient and powerful.
|
||||||
|
|
||||||
<b>Can you reskin the look of Dear ImGui?</b>
|
**Can you reskin the look of Dear ImGui?**
|
||||||
|
|
||||||
You can alter the look of the interface to some degree: changing colors, sizes, padding, rounding, fonts. However, as Dear ImGui is designed and optimized to create debug tools, the amount of skinning you can apply is limited. There is only so much you can stray away from the default look and feel of the interface. Below is a screenshot from [LumixEngine](https://github.com/nem0/LumixEngine) with custom colors + a docking/tabs extension (both of which you can find in the Issues section and will eventually be merged):
|
You can alter the look of the interface to some degree: changing colors, sizes, padding, rounding, fonts. However, as Dear ImGui is designed and optimized to create debug tools, the amount of skinning you can apply is limited. There is only so much you can stray away from the default look and feel of the interface. Below is a screenshot from [LumixEngine](https://github.com/nem0/LumixEngine) with custom colors + a docking/tabs extension (both of which you can find in the Issues section and will eventually be merged):
|
||||||
|
|
||||||
![LumixEngine](https://raw.githubusercontent.com/wiki/ocornut/imgui/web/v151/lumix-201710-rearranged.png)
|
![LumixEngine](https://raw.githubusercontent.com/wiki/ocornut/imgui/web/v151/lumix-201710-rearranged.png)
|
||||||
|
|
||||||
<b>Why using C++ (as opposed to C)?</b>
|
**Why using C++ (as opposed to C)?**
|
||||||
|
|
||||||
Dear ImGui takes advantage of a few C++ languages features for convenience but nothing anywhere Boost-insanity/quagmire. Dear ImGui does NOT require C++11 so it can be used with most old C++ compilers. Dear ImGui doesn't use any C++ header file. Language-wise, function overloading and default parameters are used to make the API easier to use and code more terse. Doing so I believe the API is sitting on a sweet spot and giving up on those features would make the API more cumbersome. Other features such as namespace, constructors and templates (in the case of the ImVector<> class) are also relied on as a convenience.
|
Dear ImGui takes advantage of a few C++ languages features for convenience but nothing anywhere Boost-insanity/quagmire. Dear ImGui does NOT require C++11 so it can be used with most old C++ compilers. Dear ImGui doesn't use any C++ header file. Language-wise, function overloading and default parameters are used to make the API easier to use and code more terse. Doing so I believe the API is sitting on a sweet spot and giving up on those features would make the API more cumbersome. Other features such as namespace, constructors and templates (in the case of the ImVector<> class) are also relied on as a convenience.
|
||||||
|
|
||||||
There is an reasonably maintained [c-api for ImGui](https://github.com/Extrawurst/cimgui) by Stephan Dilly designed for binding in other languages. I would suggest using your target language functionalities to try replicating the function overloading and default parameters used in C++ else the API may be harder to use. Also see [Links](https://github.com/ocornut/imgui/wiki/Links) for third-party bindings to other languages.
|
There is a [c-api for ImGui (cimgui)](https://github.com/Extrawurst/cimgui) by Stephan Dilly + a newer, [auto-generated cimgui](https://github.com/sonoro1234/cimgui) by sonoro1234. Both are designed for binding other languages. I would suggest using your target language functionalities to try replicating the function overloading and default parameters used in C++ else the API may be harder to use. Also see [Bindings](https://github.com/ocornut/imgui/wiki/Bindings) for third-party bindings to other languages.
|
||||||
|
|
||||||
Support dear imgui
|
Support dear imgui
|
||||||
------------------
|
------------------
|
||||||
|
|
||||||
<b>How can I help financing further development of Dear ImGui?</b>
|
**How can I help financing further development of Dear ImGui?**
|
||||||
|
|
||||||
Your contributions are keeping the library alive. If you are an individual using dear imgui, please consider donating to enable me to spend more time improving the library.
|
Your contributions are keeping the library alive. If you are an individual using dear imgui, please consider donating to enable me to spend more time improving the library.
|
||||||
|
|
||||||
@ -284,7 +295,23 @@ Monthly donations via Patreon:
|
|||||||
One-off donations via PayPal:
|
One-off donations via PayPal:
|
||||||
<br>[![PayPal](https://www.paypalobjects.com/en_US/i/btn/btn_donate_LG.gif)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=5Q73FPZ9C526U)
|
<br>[![PayPal](https://www.paypalobjects.com/en_US/i/btn/btn_donate_LG.gif)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=5Q73FPZ9C526U)
|
||||||
|
|
||||||
If your company uses dear imgui, please consider financial support (e.g. sponsoring a few weeks/months of development. I can invoice for private support, custom development etc. E-mail: omarcornut at gmail). Thanks!
|
Ongoing dear imgui development is financially supported on [**Patreon**](http://www.patreon.com/imgui) and by private sponsors.
|
||||||
|
If your company uses dear imgui, please consider financial support (e.g. sponsoring a few weeks/months of development. I can also invoice for private support, custom development etc. contact me for details: omarcornut at gmail). Thanks!
|
||||||
|
|
||||||
|
**Platinum-chocolate sponsors**
|
||||||
|
- Blizzard Entertainment.
|
||||||
|
|
||||||
|
**Double-chocolate sponsors**
|
||||||
|
- Media Molecule, Mobigame, Insomniac Games, Aras Pranckevičius, Lizardcube, Greggman, DotEmu, Nadeo, Supercell, Runner, Artometa, Friendly Shade.
|
||||||
|
|
||||||
|
**Salty caramel supporters**
|
||||||
|
- Jetha Chan, Wild Sheep Studio, Pastagames, Mārtiņš Možeiko, Daniel Collin, Recognition Robotics, Chris Genova, ikrima, Glenn Fiedler, Geoffrey Evans, Dakko Dakko, Mercury Labs, Singularity Demo Group, Mischa Alff, Sebastien Ronsse, Lionel Landwerlin, Nikolay Ivanov, Ron Gilbert, Brandon Townsend, Nikhil Deshpande, Cort Stratton, drudru, Harfang 3D, Jeff Roberts.
|
||||||
|
|
||||||
|
**Caramel supporters**
|
||||||
|
- Michel Courtine, César Leblic, Dale Kim, Alex Evans, Rui Figueira, Paul Patrashcu, Jerome Lanquetot, Ctrl Alt Ninja, Paul Fleming, Neil Henning, Stephan Dilly, Neil Blakey-Milner, Aleksei, NeiloGD, Justin Paver, FiniteSol, Vincent Pancaldi, James Billot, Robin Hübner, furrtek, Eric, Simon Barratt, Game Atelier, Julian Bosch, Simon Lundmark, Vincent Hamm, Farhan Wali, Matt Reyer, Colin Riley, Victor Martins, Josh Simmons, Garrett Hoofman, Sergio Gonzales, Andrew Berridge, Roy Eltham, Game Preservation Society, Kit framework, Josh Faust, Martin Donlon, Quinton, Felix, Andrew Belt, Codecat, Cort Stratton, Claudio Canepa, Doug McNabb, Emmanuel Julien, Guillaume Chereau, Jeffrey Slutter, Jeremiah Deckard, r-lyeh, Roger Clark, Nekith, Joshua Fisher, Malte Hoffmann, Mustafa Karaalioglu, Merlyn Morgan-Graham, Per Vognsen, Fabian Giesen, Jan Staubach, Matt Hargett, John Shearer, Jesse Chounard, kingcoopa, Miloš Tošić, Jonas Bernemann, Johan Andersson, Nathan Hartman, Michael Labbe, Tomasz Golebiowski, Louis Schnellbach, Felipe Alfonso, Jimmy Andrews, Bojan Endrovski, Robin Berg Pettersen, Rachel Crawford, Edsel Malasig, Andrew Johnson, Sean Hunter, Jordan Mellow, Nefarius Software Solutions, Laura Wieme, Robert Nix, Mick Honey, Astrofra, Jonas Lehmann, Steven Kah Hien Wong, Bartosz Bielecki, Oscar Penas, A M, Liam Moynihan.
|
||||||
|
|
||||||
|
And all other supporters; THANK YOU!
|
||||||
|
(Please contact me if you would like to be added or removed from this list)
|
||||||
|
|
||||||
Credits
|
Credits
|
||||||
-------
|
-------
|
||||||
@ -299,27 +326,6 @@ Embeds [stb_textedit.h, stb_truetype.h, stb_rectpack.h](https://github.com/nothi
|
|||||||
|
|
||||||
Inspiration, feedback, and testing for early versions: Casey Muratori, Atman Binstock, Mikko Mononen, Emmanuel Briney, Stefan Kamoda, Anton Mikhailov, Matt Willis. And everybody posting feedback, questions and patches on the GitHub.
|
Inspiration, feedback, and testing for early versions: Casey Muratori, Atman Binstock, Mikko Mononen, Emmanuel Briney, Stefan Kamoda, Anton Mikhailov, Matt Willis. And everybody posting feedback, questions and patches on the GitHub.
|
||||||
|
|
||||||
Ongoing dear imgui development is financially supported on [**Patreon**](http://www.patreon.com/imgui) and by private sponsors.
|
|
||||||
|
|
||||||
Double-chocolate sponsors:
|
|
||||||
- Blizzard Entertainment
|
|
||||||
- Media Molecule
|
|
||||||
- Mobigame
|
|
||||||
- Insomniac Games
|
|
||||||
- Aras Pranckevičius
|
|
||||||
- Lizardcube
|
|
||||||
- Greggman
|
|
||||||
- DotEmu
|
|
||||||
|
|
||||||
Salty caramel supporters:
|
|
||||||
- Jetha Chan, Wild Sheep Studio, Pastagames, Mārtiņš Možeiko, Daniel Collin, Recognition Robotics, Chris Genova, ikrima, Glenn Fiedler, Geoffrey Evans, Dakko Dakko, Mercury Labs, Singularity Demo Group, Mischa Alff, Sebastien Ronsse, Lionel Landwerlin, Nikolay Ivanov, Ron Gilbert.
|
|
||||||
|
|
||||||
Caramel supporters:
|
|
||||||
- Michel Courtine, César Leblic, Dale Kim, Alex Evans, Rui Figueira, Paul Patrashcu, Jerome Lanquetot, Ctrl Alt Ninja, Paul Fleming, Neil Henning, Stephan Dilly, Neil Blakey-Milner, Aleksei, NeiloGD, Justin Paver, FiniteSol, Vincent Pancaldi, James Billot, Robin Hübner, furrtek, Eric, Simon Barratt, Game Atelier, Julian Bosch, Simon Lundmark, Vincent Hamm, Farhan Wali, Jeff Roberts, Matt Reyer, Colin Riley, Victor Martins, Josh Simmons, Garrett Hoofman, Sergio Gonzales, Andrew Berridge, Roy Eltham, Game Preservation Society, Kit framework, Josh Faust, Martin Donlon, Quinton, Felix, Andrew Belt, Codecat, Cort Stratton, Claudio Canepa, Doug McNabb, Emmanuel Julien, Guillaume Chereau, Jeffrey Slutter, Jeremiah Deckard, r-lyeh, Roger Clark, Nekith, Joshua Fisher, Malte Hoffmann, Mustafa Karaalioglu, Merlyn Morgan-Graham, Per Vognsen, Fabian Giesen, Jan Staubach, Matt Hargett, John Shearer, Jesse Chounard, kingcoopa, Miloš Tošić, Jonas Bernemann, Johan Andersson, Nathan Hartman, Michael Labbe, Tomasz Golebiowski, Louis Schnellbach, Felipe Alfonso, Jimmy Andrews, Bojan Endrovski, Robin Berg Pettersen, Rachel Crawford, Edsel Malasig, Andrew Johnson, Sean Hunter, Jordan Mellow.
|
|
||||||
|
|
||||||
And other supporters; thanks!
|
|
||||||
(Please contact me or PR if you would like to be added or removed from this list)
|
|
||||||
|
|
||||||
License
|
License
|
||||||
-------
|
-------
|
||||||
|
|
||||||
|
100
Source/ThirdParty/ImGuiLibrary/TODO.txt
vendored
100
Source/ThirdParty/ImGuiLibrary/TODO.txt
vendored
@ -17,7 +17,8 @@ It's mostly a bunch of personal notes, probably incomplete. Feel free to query i
|
|||||||
- window: background options for child windows, border option (disable rounding).
|
- window: background options for child windows, border option (disable rounding).
|
||||||
- window: resizing from any sides? done. > need backends to honor mouse cursors properly. (#822)
|
- window: resizing from any sides? done. > need backends to honor mouse cursors properly. (#822)
|
||||||
- window: resize from borders: support some form of outer padding to make it easier to grab borders. (#822)
|
- window: resize from borders: support some form of outer padding to make it easier to grab borders. (#822)
|
||||||
- window: begin with *p_open == false should return false.
|
- window: fix resize glitch when collapsing an AlwaysAutoResize window.
|
||||||
|
- window: begin with *p_open == false could return false.
|
||||||
- window: get size/pos helpers given names (see discussion in #249)
|
- window: get size/pos helpers given names (see discussion in #249)
|
||||||
- window: a collapsed window can be stuck behind the main menu bar?
|
- window: a collapsed window can be stuck behind the main menu bar?
|
||||||
- window: when window is very small, prioritize resize button over close button.
|
- window: when window is very small, prioritize resize button over close button.
|
||||||
@ -25,20 +26,26 @@ It's mostly a bunch of personal notes, probably incomplete. Feel free to query i
|
|||||||
- window: increase minimum size of a window with menus or fix the menu rendering so that it doesn't look odd.
|
- window: increase minimum size of a window with menus or fix the menu rendering so that it doesn't look odd.
|
||||||
- window: double-clicking on title bar to minimize isn't consistent, perhaps move to single-click on left-most collapse icon?
|
- window: double-clicking on title bar to minimize isn't consistent, perhaps move to single-click on left-most collapse icon?
|
||||||
- window: expose contents size. (#1045)
|
- window: expose contents size. (#1045)
|
||||||
|
- window: using SetWindowPos() inside Begin() and moving the window with the mouse reacts a very ugly glitch. We should just defer the SetWindowPos() call.
|
||||||
- window: GetWindowSize() returns (0,0) when not calculated? (#1045)
|
- window: GetWindowSize() returns (0,0) when not calculated? (#1045)
|
||||||
- window: freeze window flag: if not focused/hovered, return false, render with previous ImDrawList. and/or reduce refresh rate.
|
- window: freeze window flag: if not focused/hovered, return false, render with previous ImDrawList. and/or reduce refresh rate.
|
||||||
!- scrolling: allow immediately effective change of scroll after Begin() if we haven't appended items yet.
|
- window: investigate better auto-positioning for new windows.
|
||||||
|
- scrolling: allow immediately effective change of scroll after Begin() if we haven't appended items yet.
|
||||||
- scrolling/clipping: separator on the initial position of a window is not visible (cursorpos.y <= clippos.y). (2017-08-20: can't repro)
|
- scrolling/clipping: separator on the initial position of a window is not visible (cursorpos.y <= clippos.y). (2017-08-20: can't repro)
|
||||||
|
- scrolling/style: shadows on scrollable areas to denote that there is more contents
|
||||||
|
|
||||||
- drawdata: make it easy to clone (or swap?) a ImDrawData so user can easily save that data if they use threaded renderering.
|
- drawdata: make it easy to clone (or swap?) a ImDrawData so user can easily save that data if they use threaded rendering.
|
||||||
- drawlist: end-user probably can't call Clear() directly because we expect a texture to be pushed in the stack.
|
- drawlist: end-user probably can't call Clear() directly because we expect a texture to be pushed in the stack.
|
||||||
- drawlist: maintaining bounding box per command would allow to merge draw command when clipping isn't relied on (typical non-scrolling window or non-overflowing column would merge with previous command).
|
- drawlist: maintaining bounding box per command would allow to merge draw command when clipping isn't relied on (typical non-scrolling window or non-overflowing column would merge with previous command).
|
||||||
- drawlist: primtiives/helpers to manipulate vertices post submission, so e.g. a quad/rect can be resized to fit later submitted content, _without_ using the ChannelSplit api
|
- drawlist: primitives/helpers to manipulate vertices post submission, so e.g. a quad/rect can be resized to fit later submitted content, _without_ using the ChannelSplit api
|
||||||
- drawlist: make it easier to toggle AA per primitive, so we can use e.g. non-AA fill + AA borders more naturally
|
- drawlist: make it easier to toggle AA per primitive, so we can use e.g. non-AA fill + AA borders more naturally
|
||||||
- drawlist: non-AA strokes have gaps between points (#593, #288), especially RenderCheckmark().
|
- drawlist: non-AA strokes have gaps between points (#593, #288), especially RenderCheckmark().
|
||||||
- drawlist: would be good to be able to deep copy a draw list (ImVector= op?).
|
- drawlist: would be good to be able to deep copy of ImDrawData (we have a deep copy of ImDrawList now).
|
||||||
|
- drawlist: rendering: provide a way for imgui to output to a single/global vertex buffer, re-order indices only at the end of the frame (ref: https://gist.github.com/floooh/10388a0afbe08fce9e617d8aefa7d302)
|
||||||
|
- drawlist: callback: add an extra void* in ImDrawCallback to allow passing render-local data to the callback (would break API).
|
||||||
|
- drawlist/opt: store rounded corners in texture to use 1 quad per corner (filled and wireframe) to lower the cost of rounding. (#1962)
|
||||||
- drawlist/opt: AddRect() axis aligned pixel aligned (no-aa) could use 8 triangles instead of 16 and no normal calculation.
|
- drawlist/opt: AddRect() axis aligned pixel aligned (no-aa) could use 8 triangles instead of 16 and no normal calculation.
|
||||||
|
|
||||||
- main: considering adding an Init() function? some constructs are awkward in the implementation because of the lack of them.
|
- main: considering adding an Init() function? some constructs are awkward in the implementation because of the lack of them.
|
||||||
- main: find a way to preserve relative orders of multiple reappearing windows (so an app toggling between "modes" e.g. fullscreen vs all tools) won't lose relative ordering.
|
- main: find a way to preserve relative orders of multiple reappearing windows (so an app toggling between "modes" e.g. fullscreen vs all tools) won't lose relative ordering.
|
||||||
- main: IsItemHovered() make it more consistent for various type of widgets, widgets with multiple components, etc. also effectively IsHovered() region sometimes differs from hot region, e.g tree nodes
|
- main: IsItemHovered() make it more consistent for various type of widgets, widgets with multiple components, etc. also effectively IsHovered() region sometimes differs from hot region, e.g tree nodes
|
||||||
@ -47,29 +54,32 @@ It's mostly a bunch of personal notes, probably incomplete. Feel free to query i
|
|||||||
|
|
||||||
- widgets: display mode: widget-label, label-widget (aligned on column or using fixed size), label-newline-tab-widget etc. (#395)
|
- widgets: display mode: widget-label, label-widget (aligned on column or using fixed size), label-newline-tab-widget etc. (#395)
|
||||||
- widgets: clean up widgets internal toward exposing everything and stabilizing imgui_internals.h.
|
- widgets: clean up widgets internal toward exposing everything and stabilizing imgui_internals.h.
|
||||||
- widgets: add visauls for Disabled/ReadOnly mode and expose publicly (#211)
|
- widgets: add visuals for Disabled/ReadOnly mode and expose publicly (#211)
|
||||||
- widgets: add always-allow-overlap mode.
|
- widgets: add always-allow-overlap mode.
|
||||||
|
- widgets: start exposing PushItemFlag() and ImGuiItemFlags
|
||||||
- widgets: alignment options in style (e.g. center Selectable, Right-Align within Button, etc.) #1260
|
- widgets: alignment options in style (e.g. center Selectable, Right-Align within Button, etc.) #1260
|
||||||
- widgets: activate by identifier (trigger button, focus given id)
|
- widgets: activate by identifier (trigger button, focus given id)
|
||||||
|
- widgets: a way to represent "mixed" values, so e.g. all values replaced with **, including check-boxes, colors, etc. with support for multi-components widgets (e.g. SliderFloat3, make only "Y" mixed)
|
||||||
|
|
||||||
- input text: clean up the mess caused by converting UTF-8 <> wchar. the code is rather inefficient right now and super fragile.
|
- input text: clean up the mess caused by converting UTF-8 <> wchar. the code is rather inefficient right now and super fragile.
|
||||||
- input text: reorganize event handling, allow CharFilter to modify buffers, allow multiple events? (#541)
|
- input text: reorganize event handling, allow CharFilter to modify buffers, allow multiple events? (#541)
|
||||||
- input text: expose CursorPos in char filter event (#816)
|
- input text: expose CursorPos in char filter event (#816)
|
||||||
- input text: access public fields via a non-callback API e.g. InputTextGetState("xxx") that may return NULL if not active.
|
- input text: access public fields via a non-callback API e.g. InputTextGetState("xxx") that may return NULL if not active.
|
||||||
- input text: flag to disable live update of the user buffer (also applies to float/int text input) (#701)
|
- input text: flag to disable live update of the user buffer (also applies to float/int text input) (#701)
|
||||||
- input text: way to dynamically grow the buffer without forcing the user to initially allocate for worse case, e.g. more natural std::string (follow up on #200)
|
|
||||||
- input text: hover tooltip could show unclamped text
|
- input text: hover tooltip could show unclamped text
|
||||||
- input text: option to Tab after an Enter validation.
|
- input text: option to Tab after an Enter validation.
|
||||||
- input text: add ImGuiInputTextFlags_EnterToApply? (off #218)
|
- input text: add ImGuiInputTextFlags_EnterToApply? (off #218)
|
||||||
- input text: easier ways to update buffer (from source char*) while owned. preserve some sort of cursor position for multi-line text.
|
- input text: easier ways to update buffer (from source char*) while owned. preserve some sort of cursor position for multi-line text.
|
||||||
- input text: add discard flag (e.g. ImGuiInputTextFlags_DiscardActiveBuffer) or make it easier to clear active focus for text replacement during edition (#725)
|
- input text: add discard flag (e.g. ImGuiInputTextFlags_DiscardActiveBuffer) or make it easier to clear active focus for text replacement during edition (#725)
|
||||||
- input text: display bug when clicking a drag/slider after an input text in a different window has all-selected text (order dependant). actually a very old bug but no one appears to have noticed it.
|
- input text: display bug when clicking a drag/slider after an input text in a different window has all-selected text (order dependent). actually a very old bug but no one appears to have noticed it.
|
||||||
|
- input text: allow centering/positioning text so that ctrl+clicking Drag or Slider keeps the textual value at the same pixel position.
|
||||||
|
- input text: what's the easiest way to implement a nice IP/Mac address input editor?
|
||||||
- input text multi-line: don't directly call AddText() which does an unnecessary vertex reserve for character count prior to clipping. and/or more line-based clipping to AddText(). and/or reorganize TextUnformatted/RenderText for more efficiency for large text (e.g TextUnformatted could clip and log separately, etc).
|
- input text multi-line: don't directly call AddText() which does an unnecessary vertex reserve for character count prior to clipping. and/or more line-based clipping to AddText(). and/or reorganize TextUnformatted/RenderText for more efficiency for large text (e.g TextUnformatted could clip and log separately, etc).
|
||||||
- input text multi-line: support for cut/paste without selection (cut/paste the current line)
|
- input text multi-line: support for cut/paste without selection (cut/paste the current line)
|
||||||
- input text multi-line: line numbers? status bar? (follow up on #200)
|
- input text multi-line: line numbers? status bar? (follow up on #200)
|
||||||
- input text multi-line: behave better when user changes input buffer while editing is active (even though it is illegal behavior). namely, the change of buffer can create a scrollbar glitch (#725)
|
- input text multi-line: behave better when user changes input buffer while editing is active (even though it is illegal behavior). namely, the change of buffer can create a scrollbar glitch (#725)
|
||||||
- input text multi-line: better horizontal scrolling support (#383, #1224)
|
- input text multi-line: better horizontal scrolling support (#383, #1224)
|
||||||
- input text: allow centering/positioning text so that ctrl+clicking Drag or Slider keeps the textual value at the same pixel position.
|
- input text multi-line: single call to AddText() should be coarse clipped on InputTextEx() end.
|
||||||
- input number: optional range min/max for Input*() functions
|
- input number: optional range min/max for Input*() functions
|
||||||
- input number: holding [-]/[+] buttons could increase the step speed non-linearly (or user-controlled)
|
- input number: holding [-]/[+] buttons could increase the step speed non-linearly (or user-controlled)
|
||||||
- input number: use mouse wheel to step up/down
|
- input number: use mouse wheel to step up/down
|
||||||
@ -82,12 +92,12 @@ It's mostly a bunch of personal notes, probably incomplete. Feel free to query i
|
|||||||
- layout: more generic alignment state (left/right/centered) for single items?
|
- layout: more generic alignment state (left/right/centered) for single items?
|
||||||
- layout: clean up the InputFloatN/SliderFloatN/ColorEdit4 layout code. item width should include frame padding.
|
- layout: clean up the InputFloatN/SliderFloatN/ColorEdit4 layout code. item width should include frame padding.
|
||||||
- layout: BeginGroup() needs a border option. (~#1496)
|
- layout: BeginGroup() needs a border option. (~#1496)
|
||||||
- layout: vertical alignement of mixed height items (e.g. buttons) within a same line (#1284)
|
- layout: vertical alignment of mixed height items (e.g. buttons) within a same line (#1284)
|
||||||
|
|
||||||
- columns: sizing policy (e.g. for each column: fixed size, %, fill, distribute default size among fills) (#513, #125)
|
- columns: sizing policy (e.g. for each column: fixed size, %, fill, distribute default size among fills) (#513, #125)
|
||||||
- columns: add a conditional parameter to SetColumnOffset() (#513, #125)
|
- columns: add a conditional parameter to SetColumnOffset() (#513, #125)
|
||||||
- columns: headers. reorderable. (#513, #125)
|
- columns: headers. reorderable. (#513, #125)
|
||||||
- columns: optional sorting modifiers (up/down), sort list so sorting can be done multi-critera. notify user when sort order changed.
|
- columns: optional sorting modifiers (up/down), sort list so sorting can be done multi-criteria. notify user when sort order changed.
|
||||||
- columns: option to alternate background colors on odd/even scanlines.
|
- columns: option to alternate background colors on odd/even scanlines.
|
||||||
- columns: allow columns to recurse.
|
- columns: allow columns to recurse.
|
||||||
- columns: allow a same columns set to be interrupted by e.g. CollapsingHeader and resume with columns in sync when moving them.
|
- columns: allow a same columns set to be interrupted by e.g. CollapsingHeader and resume with columns in sync when moving them.
|
||||||
@ -97,10 +107,9 @@ It's mostly a bunch of personal notes, probably incomplete. Feel free to query i
|
|||||||
|
|
||||||
!- color: the color conversion helpers/types are a mess and needs sorting out.
|
!- color: the color conversion helpers/types are a mess and needs sorting out.
|
||||||
- color: (api breaking) ImGui::ColorConvertXXX functions should be loose ImColorConvertXX to match imgui_internals.h
|
- color: (api breaking) ImGui::ColorConvertXXX functions should be loose ImColorConvertXX to match imgui_internals.h
|
||||||
- coloredit: it is still somehow awkward to copy colors around (unless going through Hex mode).
|
|
||||||
|
|
||||||
- plot: full featured plot/graph api w/ scrolling, zooming etc. all bell & whistle. why not!
|
- plot: full featured plot/graph api w/ scrolling, zooming etc. all bell & whistle. why not!
|
||||||
- plot: PlotLines() should use the polygon-stroke facilities, less verticles (currently issues with averaging normals)
|
- plot: PlotLines() should use the polygon-stroke facilities, less vertices (currently issues with averaging normals)
|
||||||
- plot: make it easier for user to draw extra stuff into the graph (e.g: draw basis, highlight certain points, 2d plots, multiple plots)
|
- plot: make it easier for user to draw extra stuff into the graph (e.g: draw basis, highlight certain points, 2d plots, multiple plots)
|
||||||
- plot: "smooth" automatic scale over time, user give an input 0.0(full user scale) 1.0(full derived from value)
|
- plot: "smooth" automatic scale over time, user give an input 0.0(full user scale) 1.0(full derived from value)
|
||||||
- plot: option/feature: draw the zero line
|
- plot: option/feature: draw the zero line
|
||||||
@ -119,20 +128,20 @@ It's mostly a bunch of personal notes, probably incomplete. Feel free to query i
|
|||||||
|
|
||||||
- tabs: re-ordering, close buttons, context menu, persistent order (#261, #351)
|
- tabs: re-ordering, close buttons, context menu, persistent order (#261, #351)
|
||||||
|
|
||||||
- ext: stl-ish friendly extension (imgui_stl.h) that has wrapped for std::string, std::vector etc.
|
- ext: stl-ish friendly extension (imgui_stl.h) that has wrapper for std::string, std::vector etc.
|
||||||
|
|
||||||
- button: provide a button that looks framed.
|
- button: provide a button that looks framed.
|
||||||
- image/image button: misalignment on padded/bordered button?
|
- image/image button: misalignment on padded/bordered button?
|
||||||
- image/image button: parameters are confusing, image() has tint_col,border_col whereas imagebutton() has bg_col/tint_col. Even thou they are different parameters ordering could be more consistent. can we fix that?
|
- image/image button: parameters are confusing, image() has tint_col,border_col whereas imagebutton() has bg_col/tint_col. Even thou they are different parameters ordering could be more consistent. can we fix that?
|
||||||
- image button: not taking an explicit id is odd.
|
- image button: not taking an explicit id is odd.
|
||||||
- slider: allow using the [-]/[+] buttons used by InputFloat()/InputInt()
|
- slider: allow using the [-]/[+] buttons used by InputFloat()/InputInt()
|
||||||
- slider: initial absolute click is imprecise. change to relative movement slider (same as scrollbar).
|
- slider: initial absolute click is imprecise. change to relative movement slider (same as scrollbar). (#1946)
|
||||||
- slider: add dragging-based widgets to edit values with mouse (on 2 axises), saving screen real-estate.
|
- slider: add dragging-based widgets to edit values with mouse (on 2 axises), saving screen real-estate.
|
||||||
- slider: tint background based on value (e.g. v_min -> v_max, or use 0.0f either side of the sign)
|
- slider: tint background based on value (e.g. v_min -> v_max, or use 0.0f either side of the sign)
|
||||||
- slider: precision dragging
|
- slider: relative dragging? + precision dragging
|
||||||
- slider: step option (#1183)
|
- slider: step option (#1183)
|
||||||
|
- slider style: fill % of the bar instead of positioning a drag.
|
||||||
- knob: rotating knob widget (#942)
|
- knob: rotating knob widget (#942)
|
||||||
- slider & drag: int data passing through a float
|
|
||||||
- drag float: up/down axis
|
- drag float: up/down axis
|
||||||
- drag float: added leeway on edge (e.g. a few invisible steps past the clamp limits)
|
- drag float: added leeway on edge (e.g. a few invisible steps past the clamp limits)
|
||||||
|
|
||||||
@ -150,22 +159,24 @@ It's mostly a bunch of personal notes, probably incomplete. Feel free to query i
|
|||||||
- listbox: scrolling should track modified selection.
|
- listbox: scrolling should track modified selection.
|
||||||
|
|
||||||
!- popups/menus: clarify usage of popups id, how MenuItem/Selectable closing parent popups affects the ID, etc. this is quite fishy needs improvement! (#331, #402)
|
!- popups/menus: clarify usage of popups id, how MenuItem/Selectable closing parent popups affects the ID, etc. this is quite fishy needs improvement! (#331, #402)
|
||||||
|
- popups/modal: make modal title bar blink when trying to click outside the modal
|
||||||
- popups: reopening context menu at new position should be the behavior by default? (equivalent to internal OpenPopupEx() with reopen_existing=true) (~#1497)
|
- popups: reopening context menu at new position should be the behavior by default? (equivalent to internal OpenPopupEx() with reopen_existing=true) (~#1497)
|
||||||
- popups: if the popup functions took explicit ImGuiID it would allow the user to manage the scope of those ID. (#331)
|
- popups: if the popup functions took explicit ImGuiID it would allow the user to manage the scope of those ID. (#331)
|
||||||
- popups: clicking outside (to close popup) and holding shouldn't drag window below.
|
- popups: clicking outside (to close popup) and holding shouldn't drag window below.
|
||||||
- popups: add variant using global identifier similar to Begin/End (#402)
|
- popups: add variant using global identifier similar to Begin/End (#402)
|
||||||
- popups: border options. richer api like BeginChild() perhaps? (#197)
|
- popups: border options. richer api like BeginChild() perhaps? (#197)
|
||||||
|
- tooltip: drag and drop with tooltip near monitor edges lose/changes its last direction instead of locking one. The drag and drop tooltip should always follow without changing direction.
|
||||||
- tooltip: tooltip that doesn't fit in entire screen seems to lose their "last preferred direction" and may teleport when moving mouse.
|
- tooltip: tooltip that doesn't fit in entire screen seems to lose their "last preferred direction" and may teleport when moving mouse.
|
||||||
- tooltip: allow to set the width of a tooltip to allow TextWrapped() etc. while keeping the height automatic.
|
- tooltip: allow to set the width of a tooltip to allow TextWrapped() etc. while keeping the height automatic.
|
||||||
- tooltip: allow tooltips with timers? or general timer policy? (instaneous vs timed)
|
- tooltip: tooltips with delay timers? or general timer policy? (instantaneous vs timed): IsItemHovered() with timer + implicit aabb-id for items with no ID. (#1485)
|
||||||
|
|
||||||
- menus: calling BeginMenu() twice with a same name doesn't append as Begin() does for regular windows (#1207)
|
- menus: calling BeginMenu() twice with a same name doesn't append as Begin() does for regular windows (#1207)
|
||||||
- menus: menu bars inside modals windows are acting weird.
|
- menus: menu bars inside modal windows are acting weird.
|
||||||
- statusbar: add a per-window status bar helper similar to what menubar does.
|
- status-bar: add a per-window status bar helper similar to what menu-bar does.
|
||||||
- shortcuts: local-style shortcut api, e.g. parse "&Save"
|
- shortcuts: local-style shortcut api, e.g. parse "&Save"
|
||||||
- shortcuts,menus: global-style shortcut api e.g. "Save (CTRL+S)" -> explicit flag for recursing into closed menu
|
- shortcuts,menus: global-style shortcut api e.g. "Save (CTRL+S)" -> explicit flag for recursing into closed menu
|
||||||
- shortcuts: programmatically access shortcuts "Focus("&Save"))
|
- shortcuts: programmatically access shortcuts "Focus("&Save"))
|
||||||
- menus: menubars: main menu-bar could affect clamping of windows position (~ akin to modifying DisplayMin)
|
- menus: menu-bar: main menu-bar could affect clamping of windows position (~ akin to modifying DisplayMin)
|
||||||
- menus: hovering from menu to menu on a menu-bar has 1 frame without any menu, which is a little annoying. ideally either 0 either longer.
|
- menus: hovering from menu to menu on a menu-bar has 1 frame without any menu, which is a little annoying. ideally either 0 either longer.
|
||||||
|
|
||||||
- text: selectable text (for copy) as a generic feature (ItemFlags?)
|
- text: selectable text (for copy) as a generic feature (ItemFlags?)
|
||||||
@ -190,7 +201,6 @@ It's mostly a bunch of personal notes, probably incomplete. Feel free to query i
|
|||||||
!- style: better default styles. (#707)
|
!- style: better default styles. (#707)
|
||||||
- style: add a highlighted text color (for headers, etc.)
|
- style: add a highlighted text color (for headers, etc.)
|
||||||
- style: border types: out-screen, in-screen, etc. (#447)
|
- style: border types: out-screen, in-screen, etc. (#447)
|
||||||
- style/optimization: store rounded corners in texture to use 1 quad per corner (filled and wireframe) to lower the cost of rounding.
|
|
||||||
- style: add window shadow (fading away from the window. Paint-style calculation of vertices alpha after drawlist would be easier)
|
- style: add window shadow (fading away from the window. Paint-style calculation of vertices alpha after drawlist would be easier)
|
||||||
- style: a concept of "compact style" that the end-user can easily rely on (e.g. PushStyleCompact()?) that maps to other settings? avoid implementing duplicate helpers such as SmallCheckbox(), etc.
|
- style: a concept of "compact style" that the end-user can easily rely on (e.g. PushStyleCompact()?) that maps to other settings? avoid implementing duplicate helpers such as SmallCheckbox(), etc.
|
||||||
- style: try to make PushStyleVar() more robust to incorrect parameters (to be more friendly to edit & continues situation).
|
- style: try to make PushStyleVar() more robust to incorrect parameters (to be more friendly to edit & continues situation).
|
||||||
@ -206,13 +216,17 @@ It's mostly a bunch of personal notes, probably incomplete. Feel free to query i
|
|||||||
- log: let user copy any window content to clipboard easily (CTRL+C on windows? while moving it? context menu?). code is commented because it fails with multiple Begin/End pairs.
|
- log: let user copy any window content to clipboard easily (CTRL+C on windows? while moving it? context menu?). code is commented because it fails with multiple Begin/End pairs.
|
||||||
|
|
||||||
- filters: set a current filter that tree node can automatically query to hide themselves
|
- filters: set a current filter that tree node can automatically query to hide themselves
|
||||||
- filters: handle wildcards (with implicit leading/trailing *), regexps
|
- filters: handle wild-cards (with implicit leading/trailing *), reg-exprs
|
||||||
- filters: fuzzy matches (may use code at blog.forrestthewoods.com/4cffeed33fdb)
|
- filters: fuzzy matches (may use code at blog.forrestthewoods.com/4cffeed33fdb)
|
||||||
|
|
||||||
- drag and drop: add demo. (#143, #479)
|
- drag and drop: have some way to know when a drag begin from BeginDragDropSource() pov.
|
||||||
|
- drag and drop: allow preview tooltip to be submitted from a different place than the drag source. (#1725)
|
||||||
- drag and drop: allow using with other mouse buttons (where activeid won't be set). (#1637)
|
- drag and drop: allow using with other mouse buttons (where activeid won't be set). (#1637)
|
||||||
|
- drag and drop: make it easier and provide a demo to have tooltip both are source and target site, with a more detailed one on target site (tooltip ordering problem)
|
||||||
- drag and drop: test with reordering nodes (in a list, or a tree node). (#143)
|
- drag and drop: test with reordering nodes (in a list, or a tree node). (#143)
|
||||||
- drag and drop: test integrating with os drag and drop.
|
- drag and drop: test integrating with os drag and drop (make it easy to do a naive WM_DROPFILE integration)
|
||||||
|
- drag and drop: make payload optional? (#143)
|
||||||
|
- drag and drop: feedback when hovering a modal (cursor?)
|
||||||
- node/graph editor (#306)
|
- node/graph editor (#306)
|
||||||
- pie menus patterns (#434)
|
- pie menus patterns (#434)
|
||||||
- markup: simple markup language for color change? (#902)
|
- markup: simple markup language for color change? (#902)
|
||||||
@ -220,18 +234,20 @@ It's mostly a bunch of personal notes, probably incomplete. Feel free to query i
|
|||||||
!- font: need handling of missing glyphs by not packing/rasterizing glyph 0 of a given font.
|
!- font: need handling of missing glyphs by not packing/rasterizing glyph 0 of a given font.
|
||||||
- font: MergeMode: flags to select overwriting or not.
|
- font: MergeMode: flags to select overwriting or not.
|
||||||
- font: MergeMode: duplicate glyphs are stored in the atlas texture which is suboptimal.
|
- font: MergeMode: duplicate glyphs are stored in the atlas texture which is suboptimal.
|
||||||
- font: better vertical centering (based e.g on height of lowercase 'x'?). currently Roboto-Medium size 16 px isn't currently centered. (#1619)
|
|
||||||
- font: free the Alpha buffer if user only requested RGBA.
|
- font: free the Alpha buffer if user only requested RGBA.
|
||||||
!- font: better CalcTextSizeA() API, at least for simple use cases. current one is horrible (perhaps have simple vs extended versions).
|
!- font: better CalcTextSizeA() API, at least for simple use cases. current one is horrible (perhaps have simple vs extended versions).
|
||||||
- font: a CalcTextHeight() helper could run faster than CalcTextSize().y
|
- font: a CalcTextHeight() helper could run faster than CalcTextSize().y
|
||||||
- font: enforce monospace through ImFontConfig (for icons?) + create dual ImFont output from same input, reusing rasterized data but with different glyphs/AdvanceX
|
- font: enforce monospace through ImFontConfig (for icons?) + create dual ImFont output from same input, reusing rasterized data but with different glyphs/AdvanceX
|
||||||
- font: finish CustomRectRegister() to allow mapping unicode codepoint to custom texture data
|
- font: finish CustomRectRegister() to allow mapping Unicode codepoint to custom texture data
|
||||||
- font: PushFontSize API (#1018)
|
- font: PushFontSize API (#1018)
|
||||||
|
- font: MemoryTTF taking ownership confusing/not obvious, maybe default should be opposite?
|
||||||
|
- font/atlas: add a missing Glyphs.reserve()
|
||||||
- font/atlas: incremental updates
|
- font/atlas: incremental updates
|
||||||
- font/atlas: dynamic font atlas to avoid baking huge ranges into bitmap and make scaling easier.
|
- font/atlas: dynamic font atlas to avoid baking huge ranges into bitmap and make scaling easier.
|
||||||
- font/atlas: allow user to submit its own primitive to be rectpacked, and allow to map them on a Unicode point.
|
- font/atlas: allow user to submit its own primitive to be rectpacked, and allow to map them on a Unicode point.
|
||||||
- font: MemoryTTF taking ownership confusing/not obvious, maybe default should be opposite?
|
- font/draw: vertical and/or rotated text renderer (#705) - vertical is easier clipping wise
|
||||||
- font/text: vertical and/or rotated text renderer (#705) - vertical is easier clipping wise
|
- font/draw: need to be able to specify wrap start position.
|
||||||
|
- font/draw: better reserve policy for large horizontal block of text (shouldn't reserve for all clipped lines)
|
||||||
- font: imgui_freetype.h alternative renderer (#618)
|
- font: imgui_freetype.h alternative renderer (#618)
|
||||||
- font: optimization: for monospace font (like the default one) we can trim IndexXAdvance as long as trailing value is == FallbackXAdvance (need to make sure TAB is still correct).
|
- font: optimization: for monospace font (like the default one) we can trim IndexXAdvance as long as trailing value is == FallbackXAdvance (need to make sure TAB is still correct).
|
||||||
- font: add support for kerning, probably optional. A) perhaps default to (32..128)^2 matrix ~ 9K entries = 36KB, then hash for non-ascii?. B) or sparse lookup into per-char list?
|
- font: add support for kerning, probably optional. A) perhaps default to (32..128)^2 matrix ~ 9K entries = 36KB, then hash for non-ascii?. B) or sparse lookup into per-char list?
|
||||||
@ -239,16 +255,22 @@ It's mostly a bunch of personal notes, probably incomplete. Feel free to query i
|
|||||||
- font: fix AddRemapChar() to work before font has been built.
|
- font: fix AddRemapChar() to work before font has been built.
|
||||||
- font: (api breaking) removed "TTF" from symbol names. also because it now supports OTF.
|
- font: (api breaking) removed "TTF" from symbol names. also because it now supports OTF.
|
||||||
|
|
||||||
|
- nav: wrap around logic to allow e.g. grid based layout (pressing NavRight on the right-most element would go to the next row, etc.). see internal's NavMoveRequestTryWrapping().
|
||||||
|
- nav: patterns to make it possible for arrows key to update selection
|
||||||
|
- nav: restore/find nearest navid when current one disappear (e.g. pressed a button that disappear, or perhaps auto restoring when current button change name)
|
||||||
- nav: SetItemDefaultFocus() level of priority, so widget like Selectable when inside a popup could claim a low-priority default focus on the first selected iem
|
- nav: SetItemDefaultFocus() level of priority, so widget like Selectable when inside a popup could claim a low-priority default focus on the first selected iem
|
||||||
- nav: allow input system to be be more tolerant of io.DeltaTime=0.0f
|
- nav: allow input system to be be more tolerant of io.DeltaTime=0.0f
|
||||||
- nav: ESC on a flattened child
|
- nav: ESC within a menu of a child window seems to exit the child window.
|
||||||
|
- nav: NavFlattened: ESC on a flattened child should select something.
|
||||||
|
- nav: NavFlattened: broken: in typical usage scenario, the items of a fully clipped child are currently not considered to enter into a NavFlattened child.
|
||||||
|
- nav: NavFlattened: init request doesn't select items that are part of a NavFlattened child
|
||||||
|
- nav: NavFlattened: cannot access menu-bar of a flattened child window with Alt/menu key (not a very common use case..).
|
||||||
- nav: Left within a tree node block as a fallback (ImGuiTreeNodeFlags_NavLeftJumpsBackHere by default?)
|
- nav: Left within a tree node block as a fallback (ImGuiTreeNodeFlags_NavLeftJumpsBackHere by default?)
|
||||||
- nav: menus: pressing left-right on a vertically clipped menu bar tends to jump to the collapse/close buttons.
|
- nav: menus: pressing left-right on a vertically clipped menu bar tends to jump to the collapse/close buttons.
|
||||||
- nav: menus: allow pressing Menu to leave a sub-menu.
|
- nav: menus: allow pressing Menu to leave a sub-menu.
|
||||||
- nav: simulate right-click or context activation? (SHIFT+F10)
|
- nav: simulate right-click or context activation? (SHIFT+F10)
|
||||||
- nav: tabs should go through most/all widgets (in submission order?).
|
- nav: tabs should go through most/all widgets (in submission order?).
|
||||||
- nav: when CTRL-Tab/windowing is active, the HoveredWindow detection doesn't take account of the window display re-ordering.
|
- nav: when CTRL-Tab/windowing is active, the HoveredWindow detection doesn't take account of the window display re-ordering.
|
||||||
- nav: cannot access menubar of a flattened child window with Alt/menu key (not a very common use case..).
|
|
||||||
- nav: esc/enter default behavior for popups, e.g. be able to mark an "ok" or "cancel" button that would get triggered by those keys.
|
- nav: esc/enter default behavior for popups, e.g. be able to mark an "ok" or "cancel" button that would get triggered by those keys.
|
||||||
- nav: when activating a button that changes label (without a static ID) or disappear, can we somehow automatically recover into a nearest highlight item?
|
- nav: when activating a button that changes label (without a static ID) or disappear, can we somehow automatically recover into a nearest highlight item?
|
||||||
- nav: there's currently no way to completely clear focus with the keyboard. depending on patterns used by the application to dispatch inputs, it may be desirable.
|
- nav: there's currently no way to completely clear focus with the keyboard. depending on patterns used by the application to dispatch inputs, it may be desirable.
|
||||||
@ -260,6 +282,8 @@ It's mostly a bunch of personal notes, probably incomplete. Feel free to query i
|
|||||||
- inputs: we need an explicit flag about whether the imgui window is focused, to be able to distinguish focused key releases vs alt-tabbing all release behaviors.
|
- inputs: we need an explicit flag about whether the imgui window is focused, to be able to distinguish focused key releases vs alt-tabbing all release behaviors.
|
||||||
- inputs: rework IO system to be able to pass actual ordered/timestamped events. use an event queue? (~#335, #71)
|
- inputs: rework IO system to be able to pass actual ordered/timestamped events. use an event queue? (~#335, #71)
|
||||||
- inputs: support track pad style scrolling & slider edit.
|
- inputs: support track pad style scrolling & slider edit.
|
||||||
|
- inputs/io: backspace and arrows in the context of a text input could use system repeat rate.
|
||||||
|
- inputs/io: clarify/standardize/expose repeat rate and repeat delays (#1808)
|
||||||
|
|
||||||
- misc: idle refresh: expose cursor blink animation timer for backend to be able to lower framerate.
|
- misc: idle refresh: expose cursor blink animation timer for backend to be able to lower framerate.
|
||||||
- misc: make the ImGuiCond values linear (non-power-of-two). internal storage for ImGuiWindow can use integers to combine into flags (Why?)
|
- misc: make the ImGuiCond values linear (non-power-of-two). internal storage for ImGuiWindow can use integers to combine into flags (Why?)
|
||||||
@ -267,18 +291,22 @@ It's mostly a bunch of personal notes, probably incomplete. Feel free to query i
|
|||||||
- misc: PushItemFlag(): add a flag to disable keyboard capture when used with mouse? (#1682)
|
- misc: PushItemFlag(): add a flag to disable keyboard capture when used with mouse? (#1682)
|
||||||
- misc: use more size_t in public api?
|
- misc: use more size_t in public api?
|
||||||
- misc: ImVector: erase_unsorted() helper
|
- misc: ImVector: erase_unsorted() helper
|
||||||
|
- misc: imgui_cpp: perhaps a misc/ header file with more friendly helper (e.g. type-infer versions of DragScalar, vector<> variants if appropriate for some functions).
|
||||||
|
|
||||||
|
- backend: bgfx? https://gist.github.com/RichardGale/6e2b74bc42b3005e08397236e4be0fd0
|
||||||
- web/emscriptem: refactor some examples to facilitate integration with emscripten main loop system. (#1713, #336)
|
- web/emscriptem: refactor some examples to facilitate integration with emscripten main loop system. (#1713, #336)
|
||||||
- web/emscriptem: tweak OpenGL renderers to support OpenGL ES. (#1713, #336)
|
- web/emscriptem: with refactored examples, we could provide a direct imgui_impl_emscripten platform layer (see eg. https://github.com/floooh/sokol-samples/blob/master/html5/imgui-emsc.cc#L42)
|
||||||
|
|
||||||
- remote: make a system like RemoteImGui first-class citizen/project (#75)
|
- remote: make a system like RemoteImGui first-class citizen/project (#75)
|
||||||
|
|
||||||
|
- demo: find a way to demonstrate textures in the examples application, as it such a a common issue for new users.
|
||||||
- demo: add vertical separator demo
|
- demo: add vertical separator demo
|
||||||
- demo: add virtual scrolling example?
|
- demo: add virtual scrolling example?
|
||||||
- examples: directx9: save/restore device state more thoroughly.
|
- demo: demonstration Plot offset
|
||||||
- examples: window minimize, maximize (#583)
|
- examples: window minimize, maximize (#583)
|
||||||
- examples: provide a zero-framerate/idle example.
|
- examples: provide a zero frame-rate/idle example.
|
||||||
- examples: glfw: could go idle when minimized? if (glfwGetWindowAttrib(window, GLFW_ICONIFIED)) { glfwWaitEvents(); continue; } // the problem is that DeltaTime will be super high on resume, perhaps provide a way to let impl know (#440)
|
- examples: apple: example_apple should be using modern GL3.
|
||||||
|
- examples: glfw: could go idle when minimized? if (glfwGetWindowAttrib(window, GLFW_ICONIFIED)) { glfwWaitEvents(); continue; } // issue: DeltaTime will be super high on resume, perhaps provide a way to let impl know (#440)
|
||||||
- optimization: replace vsnprintf with stb_printf? or enable the defines/infrastructure to allow it (#1038)
|
- optimization: replace vsnprintf with stb_printf? or enable the defines/infrastructure to allow it (#1038)
|
||||||
- optimization: add clipping for multi-component widgets (SliderFloatX, ColorEditX, etc.). one problem is that nav branch can't easily clip parent group when there is a move request.
|
- optimization: add clipping for multi-component widgets (SliderFloatX, ColorEditX, etc.). one problem is that nav branch can't easily clip parent group when there is a move request.
|
||||||
- optimization: add a flag to disable most of rendering, for the case where the user expect to skip it (#335)
|
- optimization: add a flag to disable most of rendering, for the case where the user expect to skip it (#335)
|
||||||
|
Loading…
Reference in New Issue
Block a user