Skip to content

Update layouts branch to 1.91.9b #6

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 550 commits into
base: layouts
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
550 commits
Select commit Hold shift + click to select a range
d78e823
InputText: added ImGuiInputTextFlags_ElideLeft. (#1442, #1440, #4391,…
ocornut Dec 9, 2024
c3ffd4c
Misc: Added IMGUI_USE_LEGACY_CRC32_ADLER to use old tables. (#8169, #…
ocornut Dec 11, 2024
2ca83f0
Fixed missing symbols when using IMGUI_DISABLE_DEMO_WINDOWS (e.g. wit…
StewMcc Dec 11, 2024
993fa34
Version 1.91.6
ocornut Dec 11, 2024
f25665f
Version 1.91.7 WIP
ocornut Dec 11, 2024
e487eb9
Backends: Vulkan: Fixed setting VkSwapchainCreateInfoKHR::preTransfor…
Zer0xFF Dec 11, 2024
1d069cf
Fonts: store 0 for unset EllipsisChar/FallbackChar. Pull config in Bu…
ocornut Dec 11, 2024
4cc464e
BeginListBox(): Comments (#8220)
ocornut Dec 12, 2024
f9f4e22
InputText: some tidying up. (#7925)
ocornut Dec 12, 2024
4ad5496
Drags: Added ImGuiSliderFlags_NoSpeedTweaks flag to disable keyboard …
ocornut Dec 12, 2024
8237ab4
Drags, Sliders: store initial value on activation, as a convenience f…
ocornut Dec 12, 2024
324d4bb
InputText: calling ReloadUserBuf doesn't clear undo stack. (#2890)
ocornut Dec 12, 2024
f5f11e9
InputText: Fixed a bug where character replacements performed from a …
ocornut Dec 15, 2024
13c4084
Nav: Fixed an issue where Alt key would clear current active item on …
ocornut Dec 16, 2024
f31d530
TestEngine: for consistency, title bar / window items are registered …
ocornut Dec 18, 2024
e900571
InputText: Fixed issue when activating a ReadOnly field when the unde…
ocornut Dec 18, 2024
32f1140
InputText: use TextSrc more consistently to facilitate accessing user…
ocornut Dec 18, 2024
cd6c83c
Fixes GCC warnings (#8241)
Raffaello Dec 18, 2024
457fae2
Silence more zealous GCC warning. (#8241)
ocornut Dec 18, 2024
ae83962
Docs: Updated EXAMPLES.md (#8246)
Tiamat-Defender Dec 19, 2024
9b0e61a
InputText: sanity checks to e.g. detect non zero-terminated buffers +…
ocornut Dec 19, 2024
fd93229
Tables, MultiSelect: Fixed an issue where column width may be mismeas…
ocornut Dec 19, 2024
eed9502
Error Handling: Fixed bugs recovering from within a table that create…
ocornut Dec 20, 2024
91e8f2b
Debug Tools: Debug Log: hovering 0xXXXXXXXX values in log is allowed …
ocornut Dec 20, 2024
d30e102
Scrollbar, TestEngine: for consistency, scrollbars are registered in …
ocornut Dec 20, 2024
61d4bf9
Fonts: Allowing PushFont()/PopFont() to be called outside the imgui f…
ocornut Dec 20, 2024
7219fa6
Revert "Fonts: Allowing PushFont()/PopFont() to be called outside the…
ocornut Dec 20, 2024
006721f
Added ImFontAtlas section index in comments + minor tweaks to DX12 ba…
ocornut Dec 11, 2024
2a600bd
ImGuiDebugLogFlags_EventFont should not be set by default (had no eff…
ocornut Dec 20, 2024
18929bd
Internals: merge ScaleWindowsInViewport() from docking branch.
ocornut Dec 20, 2024
6982ce4
InputText: fixed badly broken clipboard copy/bug (#8254, #8242)
ocornut Dec 22, 2024
87f3109
Fix capitalization of ImGuiID in comment. (#8283)
AdmiralCurtiss Jan 3, 2025
2d2c7d3
Backends: Allegro5: Avoid calling al_set_mouse_cursor() repeatedly si…
Helodity Dec 23, 2024
c147a59
Clarified alternative for ImGuiButtonFlags_Repeat being ImGuiItemFlag…
ocornut Jan 6, 2025
a0f9079
Happy new year!
ocornut Jan 6, 2025
f169102
Misc: fixed misc/cpp/imgui_stdlib.h/.cpp not supporting IMGUI_DISABLE…
juur Jan 6, 2025
80aafbc
Data types: moved ImGuiDataType_String to public API as a convenience…
ocornut Jan 6, 2025
2f1194a
Demo: Added label edition to Property Editor demo + fix an ID issue. …
ocornut Jan 6, 2025
d0021e1
Backends: Metal: Fixed resource leak when using multiple contexts. (#…
ocornut Jan 6, 2025
e7e898e
Tables: Fixed TableAngledHeadersRow() creating an infinite horizontal…
ocornut Jan 6, 2025
dbf76f6
Update issue_template.yml
ocornut Jan 6, 2025
a2e2172
Backends: Vulkan: moved helpers to backend: ImGui_ImplVulkanH_SelectP…
ocornut Jan 6, 2025
38e606a
Examples: Add Win32+Vulkan example. (#8180)
jristic Nov 23, 2024
93a9307
Examples: Add Win32+Vulkan example, amends. (#8180)
ocornut Jan 6, 2025
af271e7
Backends: DX11: Expose vertex constant buffer in ImGui_ImplDX11_Rende…
ocornut Jan 6, 2025
f04d3cb
Backends: DirectX10: Expose selected render state in ImGui_ImplDX10_R…
ocornut Jan 6, 2025
cec8ff1
Backends: Vulkan: Fixed building with using VK_NO_PROTOTYPES. (#8180)
ocornut Jan 6, 2025
3115ae0
Demo: Font selector combo sets default focus.
ocornut Dec 27, 2024
0514332
Avoid clang/gcc warnings: -Wnontrivial-memaccess in backends. (#8295,…
ocornut Jan 8, 2025
e6a7c76
Backends: Metal: Fixed memory leaks. (#8276, #8166)
selimsandal Jan 8, 2025
bbbdc70
Refactor: moved FindBlockingModal() in its section.
ocornut Jan 8, 2025
2b85456
Refactor: moved Window Focus related functions to a dedicated section.
ocornut Jan 8, 2025
1c67a34
BeginChild: also caller to manually set ImGuiNextWindowDataFlags_HasC…
ocornut Jan 8, 2025
90094a8
Fonts: Fixed miscalculation of Ellipsis ("...") character width when …
ocornut Jan 8, 2025
c798311
Fonts: Further tweaks for Ellipsis ("...") character width when autom…
ocornut Jan 8, 2025
940d954
Fixed MinGW builds uses UTF-8 friendly _wfopen(). (#8300)
ocornut Jan 9, 2025
8bbccf7
Backends: SDLGPU3: Added sdl_gpu backend. (#8163, #7998, #7988)
DeltaW0x Jan 9, 2025
e799849
Backends: SDLGPU3: Added sdl_gpu backend (amends). (#8163, #7998, #7988)
ocornut Jan 9, 2025
596e097
Backends: SDL3: Added ImGui_ImplSDL3_InitForSDLGPU() for consistency.…
ocornut Jan 9, 2025
e7fb972
Backends: Metal: Added missing IM_UNUSED (#8302)
ffAudio Jan 9, 2025
0b8ff4b
Backends, Examples: Vulkan: add IMGUI_IMPL_VULKAN_MINIMUM_IMAGE_SAMPL…
ocornut Jan 9, 2025
1d96282
Error Handling: Turned common EndTable() and other TableXXX functions…
ocornut Jan 12, 2025
a28ffa8
Docs: added more references to IsKeyDown(), InFlags. (#8317)
ocornut Jan 13, 2025
a604d4f
Fixed IsItemDeactivated(), IsItemDeactivatedAfterEdit() to work when …
ocornut Jan 10, 2025
00f12b9
InputText: Fixed not calling CallbackEdit on revert/clear with Escape…
ocornut Jan 13, 2025
32cea85
Debug Tools: Item Picker: Always available in menu. Tweak Demo Debug…
ocornut Jan 13, 2025
6fb7d44
Backends: SDL2/SDL3: Comments. (#7672, #7670)
ocornut Jan 13, 2025
290e402
TreeNode, Tables: added ImGuiTreeNodeFlags_LabelSpanAllColumns. (#831…
ocornut Jan 13, 2025
c5f6094
Demo: tweak demo for ImGuiTreeNodeFlags_LabelSpanAllColumns. (#8318, …
ocornut Jan 13, 2025
c38c18c
Avoid using 1<<31 for ImGuiWindowFlags_NavFlattened as it seems to co…
ocornut Jan 13, 2025
21902e2
Backends: SDL_GPU: fixed SDL_GPUViewport initialisation. (#8163, #799…
ocornut Jan 13, 2025
9f8481a
(Breaking) TreeNode: renamed ImGuiTreeNodeFlags_SpanTextWidth to ImGu…
ocornut Jan 14, 2025
5c1d2d1
Version 1.91.7
ocornut Jan 14, 2025
c59a226
Version 1.91.8 WIP
ocornut Jan 15, 2025
100075f
Backends: DirectX12: Texture upload use the command queue provided in…
ocornut Jan 15, 2025
8a9de84
FontAtlas: reduced baked IM_DRAWLIST_TEX_LINES_WIDTH_MAX from 63 to 3…
ocornut Jan 15, 2025
0e21bde
Misc shallow merge to reduce diff in other branches.
ocornut Jan 15, 2025
6684984
Examples: DirectX12: Reduced number of frame in flight from 3 to 2 in…
ocornut Jan 15, 2025
8ebf22d
Backends: Vulkan: use ImVector<> for simplicity.
ocornut Jan 15, 2025
0f33d71
Examples: Vulkan: vkAcquireNextImageKHR() and vkQueuePresentKHR() ret…
ocornut Jan 15, 2025
b4a5d1d
Backends: SDLGPU3: Rename GpuDevice->Device. Expose ImGui_ImplSDLGPU3…
ocornut Jan 16, 2025
0077357
Ignore vscode artifacts (#8324)
dimateos Jan 16, 2025
4c64ba1
imgui_freetype: fixed issue where glyph advances would incorrectly be…
ocornut Jan 16, 2025
b7c27c5
Windows: legacy SetWindowFontScale() is properly inherited by nested …
ocornut Jan 16, 2025
f2262eb
Windows: latch FontRefSize at time of Begin(), consistent with e.g. T…
ocornut Jan 16, 2025
487d7f9
Font: Internals: make used page maps smaller. Since it's extremely ra…
ocornut Jan 16, 2025
dd89a37
Backends: Vulkan: sharing duplicate code. (#5446, #8326)
ocornut Jan 17, 2025
d7454de
Font: minor tweak to struct alignment.
ocornut Jan 17, 2025
80c9cd1
Font: reduce unnecessary padding in ImFontConfig struct too.
ocornut Jan 18, 2025
aa23f38
Backends: SDL_Renderer2/3: Use endian-dependent RGBA32 texture format…
Jan 17, 2025
aa1b4ea
Backends: OSX: Remove notification observer when shutting down. (#8331)
jrachele Jan 19, 2025
8b0af7f
Backends: SDL: update comments regarding API stability, regarding SDL…
ocornut Jan 20, 2025
4c2e7bb
Backends: SDL2,SDL3: removed assert preventing using ImGui_ImplSDL2_S…
ocornut Jan 20, 2025
e8779a6
Font: direct AddText()/RenderText() calls don't need to call strlen()…
ocornut Jan 20, 2025
7ae7c90
Tabs, Style: reworked selected overline rendering to better accommoda…
ocornut Jan 21, 2025
2af26b7
ColorEdit, ColorPicker: Fixed alpha preview broken in 1.91.7. (#8336,…
PathogenDavid Jan 21, 2025
bf13442
Moved ImGuiColorEditFlags_AlphaPreview/ImGuiColorEditFlags_AlphaPrevi…
ocornut Jan 21, 2025
3e6bdc2
Examples: SDL3+SDL_GPU: use SDL_GPU_PRESENTMODE_MAILBOX swapchain par…
ocornut Jan 22, 2025
d17e9fc
Backends: SDL_GPU: shallow tweaks + disable anisotropy in sampler. Ex…
ocornut Jan 22, 2025
fdca6c0
Inputs: added IsMouseReleasedWithDelay() helper. (#8337, #8320)
ocornut Jan 22, 2025
6906ac9
ColorEdit, ColorPicker: (Breaking) redesigned how alpha is displayed …
ocornut Jan 22, 2025
71da34c
Debug Tools: Tweaked font preview + indent "Glyphs" block.
ocornut Jan 22, 2025
1019934
ImFontAtlas: made calling ClearFonts() call ClearInputData(). (#8174,…
ocornut Jan 23, 2025
9bc5b04
Windows, Style: Fixed small rendering issues with menu bar, resize gr…
ocornut Jan 24, 2025
bbf9578
Amend 9bc5b04 to avoid using GImGui mid-function.
ocornut Jan 24, 2025
ed7551c
Selectable: Fixed horizontal label alignment when combined with using…
ocornut Jan 24, 2025
53244aa
Amend 9bc5b04 with a shadowed variable warning fix.
ocornut Jan 24, 2025
9eafb7b
ImFont: IndexLookup[] table hold 16-bit values even in ImWchar32 mode.
ocornut Jan 24, 2025
4211fdc
ImFont: compact comments in header section.
ocornut Jan 22, 2025
8a1613a
Fonts: OversampleH/OversampleV value defaults to 0 for automatic sele…
ocornut Jan 24, 2025
afb6e9a
Fonts: OversampleH auto-selection uses 36 as heuristic for now.
ocornut Jan 24, 2025
96e3b14
Fixed build with IMGUI_ENABLE_FREETYPE (#8346)
ocornut Jan 25, 2025
5a28f18
Fixed parameter names to SetLastItemData() to align with current names.
ocornut Jan 27, 2025
134fbe1
Windows: Fixed IsItemXXXX() functions not working on append-version o…
ocornut Jan 27, 2025
a05d547
Windows: separating WindowItemStatusFlags from ChildItemStatusFlag, b…
ocornut Jan 27, 2025
9c4948a
TabBar: Internals: added TabItemSpacing(). (#8349, #3291)
ocornut Jan 27, 2025
ea0da0b
Extracted PushPasswordFont() out of InputText code.
ocornut Jan 27, 2025
4230e98
Error Handling, Debug Log: IMGUI_DEBUG_LOG_ERROR() doesn't need the e…
ocornut Jan 28, 2025
dfd1bc3
Tables, Menus: Fixed using BeginTable() in menu layer (any menu bar).…
ocornut Jan 29, 2025
a711915
EndMainMenuBar doesn't attempt to restore focus when there's an activ…
ocornut Jan 29, 2025
dabc990
Rename internal id for standardizing naming convention. "##menubar" -…
ocornut Jan 29, 2025
c0308da
Fixed zealous GCC warning. (#8355)
ocornut Jan 29, 2025
fa178f4
Error Handling: Recovery from missing EndMenuBar() call. (#1651)
ocornut Jan 30, 2025
ae6cfd3
Tables, Menus: Fixed tables or child windows submitted inside BeginMa…
ocornut Jan 30, 2025
e6c5296
Examples: SDL3: Fix for Emscripten platform (#8363)
podsvirov Jan 31, 2025
dbb5eea
Version 1.91.8
ocornut Jan 31, 2025
e2a99b5
Internals: renamed GetIOEx() to GetIO(). Added GetPlatformIO() explic…
ocornut Jan 31, 2025
e4db4e4
Internals: renamed GetIOEx() to GetIO(). Added GetPlatformIO() explic…
ocornut Jan 31, 2025
f820bf7
Version 1.91.9 WIP
ocornut Feb 3, 2025
6265339
Fixed IsItemDeactivatedAfterEdit() signal being broken for Checkbox()…
ocornut Feb 3, 2025
204cebc
Backends: Metal: Fixed a crash on application resources. (#8367, #741…
ocornut Feb 3, 2025
5dd8408
InputTextWithHint(): Fixed buffer overflow when user callback modifie…
ocornut Feb 3, 2025
da0ba9e
Backends: WebGPU: add type alias for dawn WGPUProgrammableStageDescri…
PhantomCloak Feb 2, 2025
de962e8
ImFont: remove SetGlyphVisible()
ocornut Feb 3, 2025
1a31e31
(Breaking) Fonts: removed ImFontConfig::GlyphExtraSpacing option whic…
ocornut Feb 3, 2025
2d20e13
Backends: GLFW: Added comment about io.AddMouseSourceEvent() not bein…
ocornut Feb 4, 2025
cfed18a
Add ImFontConfig::GlyphExtraAdvanceX as a replacement for GlyphExtraS…
ocornut Feb 6, 2025
0625b37
Scrollbar: Rework logic that fades-out scrollbar when it becomes too …
ocornut Feb 6, 2025
4f1d380
Fixed tabs and spaces (#8377)
tanksdude Feb 6, 2025
914fbcf
Fonts: removed unnecessary const qualifier from ImFont::FindGlyph()
ocornut Feb 7, 2025
4982602
Windows, Style: Added style.WindowBorderHoverPadding setting to confi…
ocornut Feb 7, 2025
e5668b8
Internals: rename ImGuiNextWindowData::Flags to HasFlags for consiste…
ocornut Feb 7, 2025
e368015
Tables: a clipped scrolling table correctly clears SetNextWindowXXX f…
ocornut Feb 7, 2025
50dbb08
Tables: sneakily honor ImGuiNextWindowDataFlags_HasChildFlags/ImGuiNe…
ocornut Feb 7, 2025
e8ad60c
Fix typo (#8382)
edenoftheware Feb 8, 2025
2206e31
Demo: Combos: demonstrate a very simple way to add a filter to a comb…
ocornut Feb 10, 2025
a18622c
TextLinkOpenURL(): fixed default Win32 io.PlatformOpenInShellFn handl…
ocornut Feb 10, 2025
a431e12
Backends: SDL2, SDL3: Using SDL_OpenURL() in platform_io.Platform_Op…
ocornut Feb 10, 2025
88cda0c
Fixed minor warning. Added comment.
ocornut Feb 10, 2025
4dc9df6
Tables: fixed an issue where Columns Visible/Hidden state wouldn't be…
ocornut Feb 10, 2025
3b2f260
Windows: Fixed an issue where BeginChild() inside a collapsed Begin()…
ocornut Feb 10, 2025
6916f93
InputText: Allow CTRL+Shift+Z to redo even outside of OSX. (#8389)
tanksdude Feb 11, 2025
3d900ed
Examples: Win32+DirectX12: Fixed ExampleDescriptorHeapAllocator overf…
PuPuHX Feb 11, 2025
ef7ffaf
Styles, Tabs: (Breaking) Renamed TabMinWidthForCloseButton to TabClos…
ocornut Feb 12, 2025
7221f5e
Styles, Tabs: Fixed ef7ffaf. (#8387)
ocornut Feb 12, 2025
7cd31c3
Tables: tamed some .ini settings optimizations to more accurately all…
ocornut Feb 12, 2025
a931fb7
Fixed static analyzer warning.
ocornut Feb 12, 2025
b78cc37
Backends: SDL2: Fixed build for versions older than 2.0.14. (#7660)
ocornut Feb 12, 2025
f94a5f0
Docs: Update doc about plutosvg (#8395)
RT2Code Feb 13, 2025
890ead6
Backends: Vulkan: Added ApiVersion field in ImGui_ImplVulkan_InitInfo…
ocornut Feb 13, 2025
12963f5
Examples: Vulkan: make ApiVersion a little more visible in examples. …
ocornut Feb 13, 2025
e1ae7db
Backends: Vulkan: Fixed building with older headers not supporting VK…
ocornut Feb 13, 2025
98c2f6b
Tables, Error Handling: Recovery from invalid index in TableSetColumn…
ocornut Feb 13, 2025
ec4cd2c
Backends: Vulkan: Fixed crash with using no prototypes + *BREAKING* A…
ocornut Feb 14, 2025
474305c
ImFont: simpler constructor.
ocornut Feb 14, 2025
2860d7b
Selectable: Fixed horizontal label alignment with SelectableTextAlign…
ocornut Feb 14, 2025
78ec127
ImDrawList: added InitialFringeScale in ImDrawListSharedData. Default…
ocornut Feb 14, 2025
c4a32a1
Tabs: fixed middle-button to close not checking hovering, only close …
nicovanbentum Feb 13, 2025
8f0411f
Backends: OpenGL3: Lazily reinitialize embedded GL loader for when ca…
ocornut Feb 18, 2025
8a35386
Added ImGuiMouseCursor_Wait mouse cursor (busy/wait/hourglass shape) …
ocornut Feb 18, 2025
eec097f
Added ImGuiMouseCursor_Progress mouse cursor 8a35386+ support in SDL2…
ocornut Feb 18, 2025
8b7b3ce
Tables: fixed an issue where Columns Width state wouldn't be correctl…
ocornut Feb 19, 2025
05742f9
Tables: share code between TableSetupColumn() and TableLoadSettings()…
ocornut Feb 19, 2025
85c488e
Hot-fix for broken MouseDrawCursor support for ImGuiMouseCursor_Wait/…
ocornut Feb 20, 2025
6dc376f
ImFontAtlas: added software/drawlist version of ImGuiMouseCursor_Wait…
ocornut Feb 20, 2025
a6bcbb1
Examples: Android: Update kotlin version (#8409)
tygyh Feb 20, 2025
1e18a6c
Examples: GLFW+Vulkan: make GLFW_DIR overridable in cmake bit. (#8419)
ocornut Feb 21, 2025
434b771
Internals: packing ImGuiDataVarInfo + misc renaming + value of ImGuiD…
ocornut Feb 19, 2025
edc66d7
Nav: extract code into a NavUpdateWindowingApplyFocus() so it may be …
ocornut Feb 21, 2025
74afea0
Fix typos in docs (#8427)
tygyh Feb 22, 2025
5dce79e
Backends: DirectX12: Fixed an issue where pre-1.91.5 legacy ImGui_Imp…
ocornut Feb 24, 2025
ef969a5
Tabs: fixed Unsaved Marker not being visible when Close Button is. (#…
ocornut Feb 24, 2025
dac40d0
Backends: SDL2, SDL3: don't call SDL_GetGlobalMouseState() when mouse…
TheMode Feb 22, 2025
030746f
Debug Tools: Added io.ConfigDebugHighlightIdConflictsShowItemPicker. …
ocornut Feb 24, 2025
6e29450
Internals: added IsItemActiveAsInputText() helper.
ocornut Feb 25, 2025
4c0604e
Font: shallow refactor, rename ConfigData[] fields to Sources[], Conf…
ocornut Jan 18, 2025
a86fcbd
Examples: SDL3+SDL_Renderer: removed reference to OpenGL to remove co…
philomelus Feb 26, 2025
242d856
Examples: SDL3+SDL_Renderer: removed reference to OpenGL to remove co…
ocornut Feb 26, 2025
4f4fb1d
Backends: WebGPU: update code for latest webgpu-native changes. (#8426)
pplux Feb 22, 2025
6aa0810
Backends: WebGPU: update code for latest webgpu-native changes. Amend…
ocornut Feb 26, 2025
9996a2d
Backends: WebGPU: update code for latest webgpu-native changes. Fix f…
ocornut Feb 26, 2025
aaacb01
Backends: WebGPU: Recreate image bind groups during render. (#8426, #…
pplux Feb 26, 2025
aa83d5d
Backends: SDL2, SDL3: Only start SDL_CaptureMouse() when mouse is bei…
ocornut Feb 26, 2025
8bd3e20
Backends: WebGPU: include imgui.h before backend check (#8437)
alan-j-hu Feb 26, 2025
cdafefd
Backends: WebGPU: Add nextInChain field for VertexAttributes under Da…
alan-j-hu Feb 27, 2025
494ea57
Image: removed 'tint_col', 'border_col' parameters from Image(). Adde…
ocornut Feb 27, 2025
482a1f5
Internals: rename ImGuiDataVarInfo to ImGuiStyleVarInfo. Move ImGuiSt…
ocornut Feb 27, 2025
1aab00d
Misc shallow tweaks/tidying up. (#8446)
ocornut Feb 27, 2025
9c2876b
ShowFontAtlas() uses ImageWithBg(). (#8131, #8238)
ocornut Feb 27, 2025
c5ade65
TextLink(), TextLinkOpenURL(): fixed honoring text baseline alignment…
ocornut Mar 2, 2025
4819eae
Clipper: Fixed an issue where passing an out of bound index to Includ…
ocornut Mar 2, 2025
ce13f6b
Backends: GLFW: Fixed clipboard handler assertion when using GLFW <= …
ocornut Mar 3, 2025
eefd2da
Demo: (Refactor) Added new empty sections.. Renamed existing helper f…
ocornut Mar 3, 2025
b2c55c9
Demo: (Refactor) Moved code into DemoWindowWidgetsBasic() section.
ocornut Mar 3, 2025
de3f68a
Demo: (Refactor) Moved code into DemoWindowWidgetsTooltips(), DemoWin…
ocornut Mar 3, 2025
94877a1
Demo: (Refactor) Moved code into DemoWindowWidgetsBullets(), DemoWind…
ocornut Mar 3, 2025
22baec4
Demo: (Refactor) Moved code into DemoWindowWidgetsComboBoxes(), DemoW…
ocornut Mar 3, 2025
4450d61
Demo: (Refactor) Moved code into DemoWindowWidgetsSelectables(), Demo…
ocornut Mar 3, 2025
4d0c776
Demo: (Refactor) Moved code into DemoWindowWidgetsPlotting(), DemoWin…
ocornut Mar 3, 2025
510a9a7
Demo: (Refactor) Moved code into DemoWindowWidgetsDataTypes() section.
ocornut Mar 3, 2025
caf3faa
Demo: (Refactor) Moved code into DemoWindowWidgetsColorAndPickers() s…
ocornut Mar 3, 2025
9b486e4
Demo: (Refactor) Moved code into DemoWindowWidgetsDragsAndSliders(), …
ocornut Mar 3, 2025
0758594
Demo: (Refactor) Moved code into DemoWindowWidgetsDragAndDrop() section.
ocornut Mar 3, 2025
7a919e8
Demo: (Refactor) Moved code into DemoWindowWidgetsQueryingStatuses() …
ocornut Mar 3, 2025
71b160c
Demo: (Refactor) Moved code into DemoWindowWidgetsDisableBlocks() sec…
ocornut Mar 3, 2025
df31774
Disabled: Fixed an issue restoring Alpha in EndDisabled() when using …
ocornut Mar 3, 2025
a7657f2
Examples: SDL3: Added comments to clarify setup for users of the unfo…
ocornut Mar 4, 2025
324172f
Demo: (Refactor) Moved DemoWindowWidgets() below the functions it cal…
ocornut Mar 5, 2025
fcec08f
Demo: (Refactor) Moved ExampleTreeNode contents below ShowDemoWindow(…
ocornut Mar 5, 2025
119dfbc
Debug Tools: Tweaked layout of ID Stack Tool and always display full …
ocornut Mar 5, 2025
9f49292
Internals: Menus: reworked mangling of menu windows to use "###Menu_0…
ocornut Mar 5, 2025
377a387
Add proper ImGuiTextBuffer::resize() support other than 0.
ocornut Mar 5, 2025
1ec99f4
Internals: added ImStrlen/ImMemchr #define to facilitate experimentin…
ocornut Mar 7, 2025
806731e
Set IMGUI_DISABLE_DEFAULT_SHELL_FUNCTIONS on 3DS sdk (#8477, #8476)
TheMode Mar 9, 2025
3c3d943
Docs: Fix some typos (#8473)
tanksdude Mar 8, 2025
88d4827
Update FAQ.md for SDL3 (#8480)
asvrada Mar 9, 2025
a9e5382
Backends: Win32, SDL2, SDL3, GLFW: prioritize scancodes instead of tr…
ocornut Mar 10, 2025
39585aa
Amend Changelog to talk about OEM keys. (#7136, #7201, #7206, #7306, …
ocornut Mar 10, 2025
51e4cba
Backends: Fixed zealous warnings.
ocornut Mar 11, 2025
6da2306
Examples: Updated all .vcxproj from VS2015 to VS2019 (toolset v140 to…
ocornut Mar 11, 2025
557c77e
Added ImGuiKey_AbntC1, ImGuiKey_AbntC2 + Backends: GLFW, Win32: added…
ocornut Mar 11, 2025
09654f4
Revert "Examples: Updated all .vcxproj from VS2015 to VS2019 (toolset…
ocornut Mar 11, 2025
de4f77b
Backends: DX12: comment about using SrvDescriptorAllocFn/SrvDescripto…
ocornut Mar 12, 2025
6e30c42
Tables: fixed an issue with TableSetupColumn() overriding ini data. (…
ocornut Mar 12, 2025
d9dad2f
Scrollbar: stabilize visibility of ScrollbarX when detecting a feedba…
ocornut Mar 12, 2025
79bba34
Revert "Added ImGuiKey_AbntC1, ImGuiKey_AbntC2 + Backends: GLFW, Win3…
ocornut Mar 13, 2025
b758b82
InputText: Pasting a multi-line buffer into a single-line edit replac…
ocornut Mar 13, 2025
ea2a121
Misc: Various zealous warning fixes for newer version of Clang.
ocornut Mar 14, 2025
97428e8
Version 1.91.9
ocornut Mar 14, 2025
d6493aa
Fix typo in comment (#8494)
wizard00000 Mar 16, 2025
4d4f1fd
Docs: retroactively document ConfigData->Sources renaming. (#8495)
ocornut Mar 17, 2025
2737dbb
Docs: Fixed typo. Very oops. (#8495)
ocornut Mar 17, 2025
bfaef8c
Version 1.92.0 WIP
ocornut Mar 17, 2025
a7dc184
Moved ImDrawIdx definition lower in imgui.h. Moved ImTextureID slight…
ocornut Mar 17, 2025
93b446a
Backtrack of version tagging 1.92.0 > 1.91.9b for publishing a hotfix…
ocornut Mar 17, 2025
cfed7a3
Tables: fixed assert/issues loading settings. (#8496, #7934)
ocornut Mar 17, 2025
f5befd2
Version 1.91.9b
ocornut Mar 17, 2025
e7c707f
Merge branch 'layouts' into MyLittleShader
lapinozz May 1, 2025
f4c3e58
Merge branch 'MyLittleShader' into layouts
lapinozz May 1, 2025
cc35200
Removed asserts
lapinozz May 1, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion .github/ISSUE_TEMPLATE/issue_template.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,11 @@ body:
attributes:
value: |
FOR FIRST-TIME USERS ISSUES COMPILING/LINKING/RUNNING or LOADING FONTS, please use [GitHub Discussions](https://github.com/ocornut/imgui/discussions)
For anything else: we are happy to use 'GitHub Issues' for many types of open-ended questions. We are encouraging 'Issues' becoming a large, centralized and cross-referenced database of Dear ImGui contents.
For anything else: **we are happy to use 'GitHub Issues' for many types of open-ended questions**. We are encouraging 'Issues' becoming a large, centralized, tagged, cross-referenced database of Dear ImGui contents.

Be mindful that messages are being sent to the e-mail box of "Watching" users. Try to proof-read your messages before sending them. Edits are not seen by those users.

**If you are using Dear ImGui as part of a job that you are being well-paid for** and your company is not a sponsor. Please be mindful that this is a Free Software and you might be about to ask volunteers to help you doing your job. Please put extra effort describing your issue or question properly. If your company is wealthy, please read [Funding](https://github.com/ocornut/imgui/wiki/Funding) and consider getting in touch.
- type: markdown
attributes:
value: |
Expand Down
68 changes: 64 additions & 4 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ on:
# "scheduled" workflow, while maintaining ability to perform local CI builds.
workflows:
- scheduled
- manual
branches:
- master
- docking
Expand Down Expand Up @@ -123,6 +124,11 @@ jobs:
run: '"%MSBUILD_PATH%\MSBuild.exe" examples/example_glfw_vulkan/example_glfw_vulkan.vcxproj /p:Platform=Win32 /p:Configuration=Release'
if: github.event_name == 'workflow_run'

- name: Build Win32 example_sdl2_sdlrenderer2
shell: cmd
run: '"%MSBUILD_PATH%\MSBuild.exe" examples/example_sdl2_sdlrenderer2/example_sdl2_sdlrenderer2.vcxproj /p:Platform=Win32 /p:Configuration=Release'
if: github.event_name == 'workflow_run'

- name: Build Win32 example_sdl2_vulkan
shell: cmd
run: '"%MSBUILD_PATH%\MSBuild.exe" examples/example_sdl2_vulkan/example_sdl2_vulkan.vcxproj /p:Platform=Win32 /p:Configuration=Release'
Expand Down Expand Up @@ -168,6 +174,11 @@ jobs:
shell: cmd
run: '"%MSBUILD_PATH%\MSBuild.exe" examples/example_glfw_vulkan/example_glfw_vulkan.vcxproj /p:Platform=x64 /p:Configuration=Release'

- name: Build x64 example_sdl2_sdlrenderer2
shell: cmd
run: '"%MSBUILD_PATH%\MSBuild.exe" examples/example_sdl2_sdlrenderer2/example_sdl2_sdlrenderer2.vcxproj /p:Platform=x64 /p:Configuration=Release'
if: github.event_name == 'workflow_run'

- name: Build x64 example_sdl2_vulkan
shell: cmd
run: '"%MSBUILD_PATH%\MSBuild.exe" examples/example_sdl2_vulkan/example_sdl2_vulkan.vcxproj /p:Platform=x64 /p:Configuration=Release'
Expand Down Expand Up @@ -207,7 +218,7 @@ jobs:
run: '"%MSBUILD_PATH%\MSBuild.exe" examples/example_win32_directx12/example_win32_directx12.vcxproj /p:Platform=x64 /p:Configuration=Release'

Linux:
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4

Expand Down Expand Up @@ -313,6 +324,18 @@ jobs:
EOF
g++ -I. -std=c++11 -Wall -Wformat -o example_single_file example_single_file.cpp

- name: Build example_null (with C++20)
run: |
cat > example_single_file.cpp <<'EOF'

#define IMGUI_DISABLE_OBSOLETE_KEYIO
#define IMGUI_IMPLEMENTATION
#include "misc/single_file/imgui_single_file.h"
#include "examples/example_null/main.cpp"

EOF
g++ -I. -std=c++20 -Wall -Wformat -o example_single_file example_single_file.cpp

- name: Build example_null (with IMGUI_DISABLE_DEMO_WINDOWS and IMGUI_DISABLE_DEBUG_TOOLS)
run: |
cat > example_single_file.cpp <<'EOF'
Expand Down Expand Up @@ -370,6 +393,18 @@ jobs:
EOF
g++ -I. -std=c++11 -Wall -Wformat -o example_single_file example_single_file.cpp

- name: Build example_null (C++26, Clang)
run: |
cat > example_single_file.cpp <<'EOF'

#define IMGUI_IMPLEMENTATION
#define IMGUI_DISABLE_DEMO_WINDOWS
#include "misc/single_file/imgui_single_file.h"
#include "examples/example_null/main.cpp"

EOF
clang++ -I. -std=c++26 -Wall -Wformat -fno-exceptions -fno-threadsafe-statics -lc -lm -o example_single_file example_single_file.cpp

- name: Build example_null (without c++ runtime, Clang)
run: |
cat > example_single_file.cpp <<'EOF'
Expand Down Expand Up @@ -422,6 +457,17 @@ jobs:
EOF
clang++ -I. -std=c++11 -Wall -Wformat -o example_single_file example_single_file.cpp

- name: Build example_null (single file build, c++20)
run: |
cat > example_single_file.cpp <<'EOF'

#define IMGUI_IMPLEMENTATION
#include "misc/single_file/imgui_single_file.h"
#include "examples/example_null/main.cpp"

EOF
clang++ -I. -std=c++20 -Wall -Wformat -o example_single_file example_single_file.cpp

- name: Build example_null (without c++ runtime)
run: |
cat > example_single_file.cpp <<'EOF'
Expand Down Expand Up @@ -470,7 +516,7 @@ jobs:
xcodebuild -project examples/example_apple_metal/example_apple_metal.xcodeproj -target example_apple_metal_ios CODE_SIGN_IDENTITY="" CODE_SIGNING_REQUIRED=NO CODE_SIGNING_ALLOWED=NO

Emscripten:
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4

Expand All @@ -481,6 +527,7 @@ jobs:
emsdk-master/emsdk update
emsdk-master/emsdk install latest
emsdk-master/emsdk activate latest
sudo apt-get install build-essential

- name: Build example_sdl2_opengl3 with Emscripten
run: |
Expand All @@ -489,15 +536,28 @@ jobs:
popd
make -C examples/example_sdl2_opengl3 -f Makefile.emscripten

- name: Build example_glfw_wgpu
# This build compiles example_glfw_wgpu using Makefile.emscripten and Emscripten GLFW built-in implementation (-sUSE_GLFW=3)
# This ensures 2 things: the make build works, and the GLFW built-in implementation is tested
- name: Build example_glfw_wgpu with Emscripten/Makefile
run: |
pushd emsdk-master
source ./emsdk_env.sh
popd
make -C examples/example_glfw_wgpu -f Makefile.emscripten

# This build compiles example_glfw_wgpu using CMakeLists.txt and Emscripten GLFW contrib port (--use-port=contrib.glfw3)
# This ensures 2 things: the CMake build works, and the GLFW contrib port is tested
- name: Build example_glfw_wgpu with Emscripten/CMake
run: |
pushd emsdk-master
source ./emsdk_env.sh
popd
emcc -v
emcmake cmake -B build -DCMAKE_BUILD_TYPE=Release examples/example_glfw_wgpu
cmake --build build

Android:
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4

Expand Down
12 changes: 12 additions & 0 deletions .github/workflows/manual.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#
# This is a dummy workflow used to trigger full builds manually.
#
name: manual

on: workflow_dispatch

jobs:
manual:
runs-on: ubuntu-latest
steps:
- run: exit 0
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,9 @@ examples/example_sdl2_opengl3/web/*
.idea
cmake-build-*

## VS code artifacts
.vscode

## Unix executables from our example Makefiles
examples/example_glfw_metal/example_glfw_metal
examples/example_glfw_opengl2/example_glfw_opengl2
Expand Down
2 changes: 1 addition & 1 deletion LICENSE.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
The MIT License (MIT)

Copyright (c) 2014-2024 Omar Cornut
Copyright (c) 2014-2025 Omar Cornut

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
70 changes: 44 additions & 26 deletions backends/imgui_impl_allegro5.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@

// Implemented features:
// [X] Renderer: User texture binding. Use 'ALLEGRO_BITMAP*' as ImTextureID. Read the FAQ about ImTextureID!
// [X] Platform: Keyboard support. Since 1.87 we are using the io.AddKeyEvent() function. Pass ImGuiKey values to all key functions e.g. ImGui::IsKeyPressed(ImGuiKey_Space). [Legacy ALLEGRO_KEY_* values will also be supported unless IMGUI_DISABLE_OBSOLETE_KEYIO is set]
// [X] Platform: Clipboard support (from Allegro 5.1.12)
// [X] Platform: Mouse cursor shape and visibility. Disable with 'io.ConfigFlags |= ImGuiConfigFlags_NoMouseCursorChange'.
// Issues:
// [X] Platform: Keyboard support. Since 1.87 we are using the io.AddKeyEvent() function. Pass ImGuiKey values to all key functions e.g. ImGui::IsKeyPressed(ImGuiKey_Space). [Legacy ALLEGRO_KEY_* values are obsolete since 1.87 and not supported since 1.91.5]
// [X] Platform: Clipboard support (from Allegro 5.1.12).
// [X] Platform: Mouse cursor shape and visibility (ImGuiBackendFlags_HasMouseCursors). Disable with 'io.ConfigFlags |= ImGuiConfigFlags_NoMouseCursorChange'.
// Missing features or Issues:
// [ ] Renderer: The renderer is suboptimal as we need to convert vertices manually.
// [ ] Platform: Missing gamepad support.

Expand All @@ -20,6 +20,11 @@

// CHANGELOG
// (minor and older changes stripped away, please see git history for details)
// 2025-02-18: Added ImGuiMouseCursor_Wait and ImGuiMouseCursor_Progress mouse cursor support.
// 2025-01-06: Avoid calling al_set_mouse_cursor() repeatedly since it appears to leak on on X11 (#8256).
// 2024-08-22: moved some OS/backend related function pointers from ImGuiIO to ImGuiPlatformIO:
// - io.GetClipboardTextFn -> platform_io.Platform_GetClipboardTextFn
// - io.SetClipboardTextFn -> platform_io.Platform_SetClipboardTextFn
// 2022-11-30: Renderer: Restoring using al_draw_indexed_prim() when Allegro version is >= 5.2.5.
// 2022-10-11: Using 'nullptr' instead of 'NULL' as per our switch to C++11.
// 2022-09-26: Inputs: Renamed ImGuiKey_ModXXX introduced in 1.87 to ImGuiMod_XXX (old names still supported).
Expand Down Expand Up @@ -92,6 +97,7 @@ struct ImGui_ImplAllegro5_Data
ALLEGRO_MOUSE_CURSOR* MouseCursorInvisible;
ALLEGRO_VERTEX_DECL* VertexDecl;
char* ClipboardTextData;
ImGuiMouseCursor LastCursor;

ImVector<ImDrawVertAllegro> BufVertices;
ImVector<int> BufIndices;
Expand Down Expand Up @@ -146,14 +152,14 @@ void ImGui_ImplAllegro5_RenderDrawData(ImDrawData* draw_data)
// Render command lists
for (int n = 0; n < draw_data->CmdListsCount; n++)
{
const ImDrawList* cmd_list = draw_data->CmdLists[n];
const ImDrawList* draw_list = draw_data->CmdLists[n];

ImVector<ImDrawVertAllegro>& vertices = bd->BufVertices;
#if ALLEGRO_HAS_DRAW_INDEXED_PRIM
vertices.resize(cmd_list->VtxBuffer.Size);
for (int i = 0; i < cmd_list->VtxBuffer.Size; i++)
vertices.resize(draw_list->VtxBuffer.Size);
for (int i = 0; i < draw_list->VtxBuffer.Size; i++)
{
const ImDrawVert* src_v = &cmd_list->VtxBuffer[i];
const ImDrawVert* src_v = &draw_list->VtxBuffer[i];
ImDrawVertAllegro* dst_v = &vertices[i];
DRAW_VERT_IMGUI_TO_ALLEGRO(dst_v, src_v);
}
Expand All @@ -163,39 +169,39 @@ void ImGui_ImplAllegro5_RenderDrawData(ImDrawData* draw_data)
// FIXME-OPT: Allegro doesn't support 16-bit indices.
// You can '#define ImDrawIdx int' in imconfig.h to request Dear ImGui to output 32-bit indices.
// Otherwise, we convert them from 16-bit to 32-bit at runtime here, which works perfectly but is a little wasteful.
bd->BufIndices.resize(cmd_list->IdxBuffer.Size);
for (int i = 0; i < cmd_list->IdxBuffer.Size; ++i)
bd->BufIndices[i] = (int)cmd_list->IdxBuffer.Data[i];
bd->BufIndices.resize(draw_list->IdxBuffer.Size);
for (int i = 0; i < draw_list->IdxBuffer.Size; ++i)
bd->BufIndices[i] = (int)draw_list->IdxBuffer.Data[i];
indices = bd->BufIndices.Data;
}
else if (sizeof(ImDrawIdx) == 4)
{
indices = (const int*)cmd_list->IdxBuffer.Data;
indices = (const int*)draw_list->IdxBuffer.Data;
}
#else
// Allegro's implementation of al_draw_indexed_prim() for DX9 was broken until 5.2.5. Unindex buffers ourselves while converting vertex format.
vertices.resize(cmd_list->IdxBuffer.Size);
for (int i = 0; i < cmd_list->IdxBuffer.Size; i++)
vertices.resize(draw_list->IdxBuffer.Size);
for (int i = 0; i < draw_list->IdxBuffer.Size; i++)
{
const ImDrawVert* src_v = &cmd_list->VtxBuffer[cmd_list->IdxBuffer[i]];
const ImDrawVert* src_v = &draw_list->VtxBuffer[draw_list->IdxBuffer[i]];
ImDrawVertAllegro* dst_v = &vertices[i];
DRAW_VERT_IMGUI_TO_ALLEGRO(dst_v, src_v);
}
#endif

// Render command lists
ImVec2 clip_off = draw_data->DisplayPos;
for (int cmd_i = 0; cmd_i < cmd_list->CmdBuffer.Size; cmd_i++)
for (int cmd_i = 0; cmd_i < draw_list->CmdBuffer.Size; cmd_i++)
{
const ImDrawCmd* pcmd = &cmd_list->CmdBuffer[cmd_i];
const ImDrawCmd* pcmd = &draw_list->CmdBuffer[cmd_i];
if (pcmd->UserCallback)
{
// User callback, registered via ImDrawList::AddCallback()
// (ImDrawCallback_ResetRenderState is a special callback value used by the user to request the renderer to reset render state.)
if (pcmd->UserCallback == ImDrawCallback_ResetRenderState)
ImGui_ImplAllegro5_SetupRenderState(draw_data);
else
pcmd->UserCallback(cmd_list, pcmd);
pcmd->UserCallback(draw_list, pcmd);
}
else
{
Expand Down Expand Up @@ -291,7 +297,7 @@ void ImGui_ImplAllegro5_InvalidateDeviceObjects()
}

#if ALLEGRO_HAS_CLIPBOARD
static const char* ImGui_ImplAllegro5_GetClipboardText(void*)
static const char* ImGui_ImplAllegro5_GetClipboardText(ImGuiContext*)
{
ImGui_ImplAllegro5_Data* bd = ImGui_ImplAllegro5_GetBackendData();
if (bd->ClipboardTextData)
Expand All @@ -300,14 +306,16 @@ static const char* ImGui_ImplAllegro5_GetClipboardText(void*)
return bd->ClipboardTextData;
}

static void ImGui_ImplAllegro5_SetClipboardText(void*, const char* text)
static void ImGui_ImplAllegro5_SetClipboardText(ImGuiContext*, const char* text)
{
ImGui_ImplAllegro5_Data* bd = ImGui_ImplAllegro5_GetBackendData();
al_set_clipboard_text(bd->Display, text);
}
#endif

static ImGuiKey ImGui_ImplAllegro5_KeyCodeToImGuiKey(int key_code)
// Not static to allow third-party code to use that if they want to (but undocumented)
ImGuiKey ImGui_ImplAllegro5_KeyCodeToImGuiKey(int key_code);
ImGuiKey ImGui_ImplAllegro5_KeyCodeToImGuiKey(int key_code)
{
switch (key_code)
{
Expand Down Expand Up @@ -433,6 +441,7 @@ bool ImGui_ImplAllegro5_Init(ALLEGRO_DISPLAY* display)
io.BackendFlags |= ImGuiBackendFlags_HasMouseCursors; // We can honor GetMouseCursor() values (optional)

bd->Display = display;
bd->LastCursor = ALLEGRO_SYSTEM_MOUSE_CURSOR_NONE;

// Create custom vertex declaration.
// Unfortunately Allegro doesn't support 32-bit packed colors so we have to convert them to 4 floats.
Expand All @@ -447,9 +456,9 @@ bool ImGui_ImplAllegro5_Init(ALLEGRO_DISPLAY* display)
bd->VertexDecl = al_create_vertex_decl(elems, sizeof(ImDrawVertAllegro));

#if ALLEGRO_HAS_CLIPBOARD
io.SetClipboardTextFn = ImGui_ImplAllegro5_SetClipboardText;
io.GetClipboardTextFn = ImGui_ImplAllegro5_GetClipboardText;
io.ClipboardUserData = nullptr;
ImGuiPlatformIO& platform_io = ImGui::GetPlatformIO();
platform_io.Platform_SetClipboardTextFn = ImGui_ImplAllegro5_SetClipboardText;
platform_io.Platform_GetClipboardTextFn = ImGui_ImplAllegro5_GetClipboardText;
#endif

return true;
Expand Down Expand Up @@ -563,9 +572,16 @@ static void ImGui_ImplAllegro5_UpdateMouseCursor()

ImGui_ImplAllegro5_Data* bd = ImGui_ImplAllegro5_GetBackendData();
ImGuiMouseCursor imgui_cursor = ImGui::GetMouseCursor();
if (io.MouseDrawCursor || imgui_cursor == ImGuiMouseCursor_None)

// Hide OS mouse cursor if imgui is drawing it
if (io.MouseDrawCursor)
imgui_cursor = ImGuiMouseCursor_None;

if (bd->LastCursor == imgui_cursor)
return;
bd->LastCursor = imgui_cursor;
if (imgui_cursor == ImGuiMouseCursor_None)
{
// Hide OS mouse cursor if imgui is drawing it or if it wants no cursor
al_set_mouse_cursor(bd->Display, bd->MouseCursorInvisible);
}
else
Expand All @@ -579,6 +595,8 @@ static void ImGui_ImplAllegro5_UpdateMouseCursor()
case ImGuiMouseCursor_ResizeEW: cursor_id = ALLEGRO_SYSTEM_MOUSE_CURSOR_RESIZE_E; break;
case ImGuiMouseCursor_ResizeNESW: cursor_id = ALLEGRO_SYSTEM_MOUSE_CURSOR_RESIZE_NE; break;
case ImGuiMouseCursor_ResizeNWSE: cursor_id = ALLEGRO_SYSTEM_MOUSE_CURSOR_RESIZE_NW; break;
case ImGuiMouseCursor_Wait: cursor_id = ALLEGRO_SYSTEM_MOUSE_CURSOR_BUSY; break;
case ImGuiMouseCursor_Progress: cursor_id = ALLEGRO_SYSTEM_MOUSE_CURSOR_PROGRESS; break;
case ImGuiMouseCursor_NotAllowed: cursor_id = ALLEGRO_SYSTEM_MOUSE_CURSOR_UNAVAILABLE; break;
}
al_set_system_mouse_cursor(bd->Display, cursor_id);
Expand Down
9 changes: 5 additions & 4 deletions backends/imgui_impl_allegro5.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@

// Implemented features:
// [X] Renderer: User texture binding. Use 'ALLEGRO_BITMAP*' as ImTextureID. Read the FAQ about ImTextureID!
// [X] Platform: Keyboard support. Since 1.87 we are using the io.AddKeyEvent() function. Pass ImGuiKey values to all key functions e.g. ImGui::IsKeyPressed(ImGuiKey_Space). [Legacy ALLEGRO_KEY_* values will also be supported unless IMGUI_DISABLE_OBSOLETE_KEYIO is set]
// [X] Platform: Clipboard support (from Allegro 5.1.12)
// [X] Platform: Mouse cursor shape and visibility. Disable with 'io.ConfigFlags |= ImGuiConfigFlags_NoMouseCursorChange'.
// Issues:
// [X] Platform: Keyboard support. Since 1.87 we are using the io.AddKeyEvent() function. Pass ImGuiKey values to all key functions e.g. ImGui::IsKeyPressed(ImGuiKey_Space). [Legacy ALLEGRO_KEY_* values are obsolete since 1.87 and not supported since 1.91.5]
// [X] Platform: Clipboard support (from Allegro 5.1.12).
// [X] Platform: Mouse cursor shape and visibility (ImGuiBackendFlags_HasMouseCursors). Disable with 'io.ConfigFlags |= ImGuiConfigFlags_NoMouseCursorChange'.
// Missing features or Issues:
// [ ] Renderer: The renderer is suboptimal as we need to unindex our buffers and convert vertices manually.
// [ ] Platform: Missing gamepad support.

Expand All @@ -25,6 +25,7 @@
struct ALLEGRO_DISPLAY;
union ALLEGRO_EVENT;

// Follow "Getting Started" link and check examples/ folder to learn about using backends!
IMGUI_IMPL_API bool ImGui_ImplAllegro5_Init(ALLEGRO_DISPLAY* display);
IMGUI_IMPL_API void ImGui_ImplAllegro5_Shutdown();
IMGUI_IMPL_API void ImGui_ImplAllegro5_NewFrame();
Expand Down
Loading