Commit Graph

7228 Commits

Author SHA1 Message Date
ocornut 5d74891285 Backends: Win32: Use WM_NCMOUSEMOVE / WM_NCMOUSELEAVE to track mouse positions over non-client area (OS decorations) when app is not focused. (#6045, #6162) 2023-02-15 18:11:41 +01:00
ocornut 4f630b0449 imgui_freetype: fixed non-ASCII characters in sources. (#6166) 2023-02-15 16:43:08 +01:00
ocornut 204cb4d226 Version 1.89.4 WIP 2023-02-15 15:35:56 +01:00
ocornut 458a109031 Version 1.89.3 2023-02-14 16:00:18 +01:00
Laurens Holst b0c1816664 Backends: OpenGL3: Fixed loader compatibility with GL_VERSION for GL 2.x (#6154, #4445, #3530)
GL_MAJOR_VERSION and GL_MINOR_VERSION are available on GL 3.0 and above.
So we have to parse GL_VERSION under GL 2.x
Reference https://www.khronos.org/opengl/wiki/OpenGL_Context#Context_information_queries
Regressed since 459de65477
See https://github.com/ocornut/imgui/pull/3530
2023-02-14 15:39:49 +01:00
ocornut fa0852f9e5 ColorEdit, ColorPicker: Fixed hue/saturation preservation logic from interfering with the displayed value (but not stored value) of others widgets instances. (#6155)
Amend 30546bc0, accb0261b, 38d22bc4
2023-02-14 15:35:00 +01:00
ocornut 092b6825ac Fonts: Assert that in each GlyphRanges[] pairs first is <= second. 2023-02-14 15:00:12 +01:00
ocornut f0ac68ad35 Internal: Settings: amend 0b86513 revert to use FindWindowSettingsByID().
Namely for docking system.
2023-02-10 17:01:14 +01:00
ocornut 082b20e46b Internals: Settings: added ClearWindowSettings(). Extract part of CreateNewWindow() into InitOrLoadWindowSettings().
Designed to that if the window reappear in the session it won't take an additional slot.
2023-02-10 16:46:31 +01:00
ocornut b2ebd03b16 Internals: Settings: moved Windows setting to their sub-section. 2023-02-10 16:06:39 +01:00
ocornut 0b865136e3 Internals: Settings: Added FindWindowSettingsByName() (replacing old version by ID) FindWindowSettingsByWindow() + remove unnecessary FindOrCreateWindowSettings().
In 1 code path we do a redundant hash but this happens only once per window per session so we are ok.
2023-02-10 16:06:29 +01:00
ocornut 99c0bd65df Added SeparatorText() widget. (#1643) 2023-02-10 12:16:41 +01:00
ocornut 85395b76b0 CI: Update versions.
Backends: GLFW: Warning fix under Linux.
2023-02-07 20:17:18 +01:00
ocornut fac19e1883 Backends: SDL2:+SDL3 Implement SetPlatformImeDataFn (amends). (#6071, #1953) + fix SDL3 setting PlatformHandleRaw. (#6146) 2023-02-07 19:29:44 +01:00
imkzh 734c6af187 Backends: SDL2: Implement SetPlatformImeDataFn. (#6071, #1953) 2023-02-07 18:50:12 +01:00
ocornut 13fbd99491 Backends: SDL3: update to run with SDL3. Examples: Add SDL3+Gl example. Remove some version checks. (#6146)
More update upcoming in docking branch.
2023-02-07 16:07:53 +01:00
ocornut d9bf80f655 Backends: SDL3: copied imgui_impl_sdl2 into imgui_impl_sdl3 and ONLY replaced strings (1/2). (#6146)
NO OTHER CHANGES. This WILL NOT compile with SDL3.
This intermediate commit designed to make it easier to visualize the meaningful channges commit in the next commit.
2023-02-07 13:32:38 +01:00
ocornut e816bc6723 Merge misc changes from docking branch to reduce small drift.
In particular:
- imgui.cpp : move UpdateInputEvents() higher in NewFrame() to match docking + update RenderMouseCursor() to match.
- imgui_draw.cpp: ImDrawList::_ResetForNewFrame() change from c807192ab
- Backends: SDL2. Add MouseWindowID + change SDL_CaptureMouse() test to match docking branch. Not strictly necessary but aimed at reducing drift because we go on and fork this file.
+ moved responsability of checking valid names to TabBarGetTabName() to simplify both branches.
2023-02-07 13:22:23 +01:00
ocornut 1b27ac982f Backends+Examples: SDL2: renamed imgui_impl_sdl.cpp/.h to imgui_impl_sdl2.cpp/.h. (#6146)
+ CI: Update Windows CI to update SDL 2.26.3 instead of 2.0.10
2023-02-07 12:04:38 +01:00
ocornut d6ea56dfd9 Tables: amend f799a29 with a better solution + fix potential overflow (#6140) 2023-02-03 22:50:43 +01:00
ocornut ea39841fcd Examples: (Again, but better) made SDL+GL and GLFW+GL examples build with Emscripten. (#2492, #2494, #3699, #3705) 2023-02-03 22:39:43 +01:00
ocornut f43c6ea6a4 Revert most of "Examples: refactor all examples with a MainLoopStep() function..." (#2492, #3699)"
This reverts commit 96ab68eee0.

# Conflicts:
#	docs/CHANGELOG.txt
#	examples/example_glfw_opengl3/main.cpp
#	examples/example_sdl_opengl3/main.cpp
2023-02-03 22:17:40 +01:00
ocornut f799a293c8 Tables: Solved an ID conflict issue with multiple-instances of a same table. Storing instance id for convenience. (#6140)
TableGetColumnResizeID() are still using an incorrect table, but having only one-level left tends to cancel things out.
2023-02-03 20:03:03 +01:00
Giuseppe Barbieri c75410e72c
Debug: fix display order of InputText's data CurLenA/CurLenW (#6143) 2023-02-03 17:55:26 +01:00
ocornut a085581057 Backends: GLFW: added ImGui_ImplGlfw_SetCallbacksChainForAllWindows(). (#6142) 2023-02-03 17:53:53 +01:00
ocornut 265b88273e Backends: Fixed pragma warning with old GCC. 2023-02-03 16:14:49 +01:00
ocornut d0b1aaa076 Backends: GLFW: Registering custom low-level mouse wheel handler to get more accurate scrolling impulses on Emscripten. (#4019, #6096)
Namely, GLFW JS emulation seems to quantize values to a min of -1/+1 which breaks modern OSX/Windows emulating smoothness with stepping wheels (slow steps are sending sub-1.0 values)
+ Massage changelog.
2023-02-03 15:05:39 +01:00
ocornut 6584de4a78 Backends: SDL: Avoid calling SDL_SetCursor() when cursor has not changed. (#6113) 2023-02-02 21:28:28 +01:00
ocornut 46efed8b70 CI: Fix Emscripten build. 2023-02-02 19:35:36 +01:00
ocornut 1f1861dae6 Backends: Added support for SDL 2.0.18+ preciseX/preciseY mouse wheel data for smooth scrolling + scaling for Emscripten. (#4019, #6096)
+ Missing changelog entries.
2023-02-02 19:18:58 +01:00
ocornut 624c057ae1 Backends: GLFW: revert flipping mouse-wheel axis for Emscripten. (#4019)
Latest version seems ok.
2023-02-02 18:09:20 +01:00
ocornut ce6e6da510 Examples: Made example_sdl_opengl3 and example_glfw_opengl3 build with Emscripten. Removed dedicated examples. (#2492, #2494, #3699, #3705) 2023-02-02 18:08:17 +01:00
ocornut 96ab68eee0 Examples: refactor all examples with a MainLoopStep() function, to facilitate use with Emscripten. (#2492, #3699)
Aligned all examples.
2023-02-02 17:30:48 +01:00
ocornut b51919dce1 Examples: Emscripten+GLFW: revert to use a shell_minimal.html closer to vanilla one, as our fullscreen + misc tweaks to Emscripten+SDL example to match other version. 2023-02-02 15:27:14 +01:00
ocornut 0370856d78 Backends: GLFW: Removed mouse-wheel value scaling for Emscripten. (#4019, #6096, #6081) 2023-02-02 15:27:14 +01:00
ocornut f822e07d76 Backends: SDL: Removed SDL_MOUSEWHEEL value clamping. (#4019, #6096, #6081)
+ Fix warnings.
2023-02-02 15:27:14 +01:00
ocornut 3617a96372 Backends, Inputs: Made horizontal scroll wheel and horizontal scroll direction consistent accross backends/os. (#4019, #6096, #1463)
Documented assumptions.
2023-02-01 21:29:08 +01:00
ocornut 8d29665ae1 Backends: OSX: Fixed scroll wheel scaling for devices emitting events with hasPreciseScrollingDeltas==false (e.g. non-Apple mices).
Ref #4019 for details provided in .XLS sheet, although not strictly related to main issue topic.
+ Rename Emscripten demo titles to make SDL visible.
2023-02-01 19:43:03 +01:00
nahkhiir 2efebe3315 ShowFontAtlas, Demo: optionally use style text color for tint. (#6129) 2023-01-31 18:12:42 +01:00
ocornut 5a3f82e2f4 Examples: SDL+SDL_Renderer: Added call to SDL_RenderSetScale() to display is correct on a Retina display (albeit lower-res as our other unmodified examples). (#6121, #6065, #5931). 2023-01-31 15:49:54 +01:00
ocornut 867bdbecb3 Text: fixed issue in RenderText() leading to IM_ASSERT_PARANOID() triggering if enabled. (#6132, #5720, #5919)
Amend 3482d4ec, bd96f6e
2023-01-31 14:41:16 +01:00
ocornut d719776460 Internals: added 'ImGuiButtonFlags flags' to ImageButtonEx(). (#6126) 2023-01-31 11:30:27 +01:00
ocornut f142887088 Combo: Allow SetNextWindowSize() to alter combo popup size. (#6130)
Amend a5e939214
2023-01-31 11:23:24 +01:00
ocornut 259560aa26 Demo: moved sections around in prevision for adding nicer separators. 2023-01-27 19:05:33 +01:00
ocornut 27f2dd56d6 Internals: move "%s" skip-formatting logic to ImFormatStringToTempBuffer() function, meaning Text() and all the *V() functions can also benefit from it. (#3466)
Amend 645a6e0 and 23a785a.
2023-01-27 15:24:23 +01:00
Basil Fierz d73e3285de Backends: WebGU: Revert the implicit render pipeline layout generation as introduced in 83bdfef (#6117, #4116, #3632)
The feature was removed from WebGPU (https://github.com/gpuweb/gpuweb/issues/2470)
2023-01-25 21:55:17 +01:00
ocornut fc50532213 InputText: On OSX, inhibit usage of Alt key to toggle menu when active (used for work skip). 2023-01-25 21:44:30 +01:00
ocornut 5741cbae45 Internals: ImFileOpen: fixed misleading use of ImWchar (would allocate more when ImWchar=ImWchar32) + update version for previous changes namely tab bar ones. 2023-01-25 20:34:48 +01:00
AJ Weeks f4ef420c01 InputText: Added support for Ctrl+Delete to delete up to end of word. (#6067) 2023-01-25 14:41:38 +01:00
ocornut 07490618ae Misc: Tolerate zero delta-time under Emscripten. (#6114, #3644) 2023-01-25 14:13:12 +01:00