ocornut
1e18da5c38
Backends, Examples: Add comments about using WndProc handler and WantCaptureXXX flags. ( #5061 )
...
+ update README.
2022-02-28 20:51:50 +01:00
Clownacy
c6cab1f352
Backends: SDL: Added SDL_Renderer* parameter to ImGui_ImplSDL2_InitForSDLRenderer(). Use SDL_GetRendererOutputSize() instead of SDL_GL_GetDrawableSize() when bound to a SDL_Renderer. ( #4927 )
...
This is (kind of) an OpenGL-only function, which should be avoided when SDL2 isn't using OpenGL.
The only alternative that is recommended is SDL_GetRendererOutputSize, which limits this fix to the SDL_Renderer backend. Still, I think it's better than nothing.
I say that SDL_GL_GetDrawableSize is "kind of" OpenGL-only because it does technically work even when SDL2 isn't using OpenGL.
It's just that it becomes a shim to SDL_GetWindowSize, which is not suitable for high-DPI usage because it reflects the size of the window in screen coordinates, not actual pixels, so it really should be avoided when not using OpenGL.
2022-02-04 16:51:29 +01:00
ocornut
c906c65cac
(BREAKING) Replaced AddKeyModsEvent() added by 790132a
in favor of unified key enum system. Backends: update most. ( #4921 , #4858 )
...
Sorry this is an unusual breaking but since we are WIP it is a good time to make a correction.
2022-01-27 17:46:48 +01:00
ocornut
cda3db1449
Backends: SDL: Fixed key mapping for ImGuiKey_Menu ( #4921 ) + misc typos ( #4928 )
2022-01-24 12:19:51 +01:00
ocornut
62d6be3747
IO: Removed ImGuiInputSource from public api for now, unnecessary. ( #4858 , #787 )
2022-01-20 17:39:25 +01:00
ocornut
39c3412f91
Backends: SDL: Add full gamepad support using io.AddKeyEvent(), io.AddKeyAnalogEvent(), stopped writing to io.NavInputs[]. ( #4858 , #787 )
2022-01-20 17:25:31 +01:00
thedmd
b8e56dce83
IO: Added AddMousePosEvent(), AddMouseButtonEvent(), AddMouseWheelEvent() api + updated all Backends. ( #4858 ) (input queue code will be next commit)
...
Details: note that SDL, OSX and GLFW backends removed recording of MouseJustPressed[] which will be unnecessary with input queue (which is the NEXT commit). (#2787 , #1992 , #3383 , #2525 , #1320 )
2022-01-17 17:35:37 +01:00
ocornut
92c4ff1c2f
Rename ImGuiKey_LeftControl to ImGuiKey_LeftCtrl, ImGuiKey_RightControl to ImGuiKey_RightCtrl + made key order match mods order. ( #4858 )
2022-01-17 15:42:04 +01:00
ocornut
0755767440
Backends: move io.AddKeyModsEvent() next to io.AddKeyEvent() submission, rely on mods from platform/source. ( #4858 ) + fix #2622 again broken by 746c9f7
...
Amended to submit modifiers before.
2022-01-17 15:21:17 +01:00
ocornut
553b04883e
Backends: SDL: Fix for Emscriptem. Amend 98ce013
.
2022-01-13 18:52:19 +01:00
ocornut
98ce013242
Backends: SDL: Update mouse inputs using SDL_MOUSEMOTION/SDL_WINDOWEVENT_LEAVE + fallback to provide it when focused but not hovered/captured + update MousePos before MouseButtons.
2022-01-12 17:48:47 +01:00
ocornut
7f8a89c25c
Backends: Win32, SDL: maintain MouseButtonsDown instead of using IsAnyMouseDown(). Internals: added GetInputSourceName().
2022-01-12 16:12:10 +01:00
Théo Monnom
0818a42396
Backend: WebGPU: Fixed incorrect size parameters in WGPU backend ( #4891 )
...
+ squash SDL alignment bits.
2022-01-12 14:16:55 +01:00
ocornut
e8172fdfbc
Rename io.AddKeyModEvent() -> io.AddKeyModsEvent() and updated backends accordingly. ( #2625 , #4858 )
...
Amend 790132a
(breaking)
2022-01-10 17:00:32 +01:00
ocornut
790132a672
Added io.AddKeyModEvent() and updated backends accordingly. ( #2625 , #4858 )
2022-01-10 15:17:00 +01:00
thedmd
fe646ea591
Backends: SDL2: Update to use io.AddEventKey() will full key map ( #2625 , #4858 ) + created localized key (using keycode instead of scancode) ( #456 )
...
Legacy indexing stills uses Scancode
2022-01-10 15:12:58 +01:00
ocornut
afffcd5810
Inputs: rename ImGuiKey_KeyPadEnter > ImGuiKey_KeypadEnter ( #2625 )
2022-01-06 14:25:56 +01:00
ocornut
3a90dc3893
Platform IME: changed io.ImeSetInputScreenPosFn() to io.SetPlatformImeDataFn() API.
...
Ref #2589 , #2598 , #3108 , #3113 , #3653 , #4642
2022-01-05 13:47:20 +01:00
ocornut
fba756176d
Backends: SDL_Renderer: Amend 1d2d246, various tweaks, fixes, sync to latest. ( #3926 )
2021-09-21 19:29:48 +02:00
Sylvain
62b17f928e
Backends: SDL_Renderer: Added renderer backend for SDL 2.0.17+ ( #3926 )
...
(Squashed 20 commits)
2021-09-21 19:29:48 +02:00
ocornut
c6ca327fb2
Backends: Added more implicit asserts to detect invalid/redundant calls to Shutdown functions. ( #4562 )
2021-09-20 18:43:05 +02:00
Siarhei Fiedartsou
f8bad7e1e3
Backends: OpenGL3: Add TargetConditionals.h ( #4473 ) + standardize include
2021-08-24 15:36:44 +02:00
ocornut
f24abbc47d
Fix various warnings ( #4442 )
2021-08-18 12:38:24 +02:00
thedmd
2f40be638f
IO, Backends: add io.AddFocusEvent(). Clear pressed keys after loosing input focus ( #3532 )
...
Amend/fix #2445 , #2696 , #3751 , #4377
2021-08-17 20:10:45 +02:00
ocornut
2ad912bb85
Backends: Win32, SDL, GLFW: only honor io.WantSetMousePos when focused + fix GLFW uninstalling handler + tweaks to reduce branch drift with docking. ( #787 , #2445 , #2696 , #3751 , #4377 )
2021-08-02 16:19:50 +02:00
ocornut
1cdd110eb4
Backends: SDL2: Mouse position is correctly reported when the host platform window is hovered but not focused. ( #2445 , #3751 , #4377 )
...
(requires SDL 2.0.5 because SDL_GetMouseFocus() is only usable with SDL_HINT_MOUSE_FOCUS_CLICKTHROUGH).
2021-07-29 18:47:43 +02:00
ocornut
cf2daf353e
Backends: Cleanup, removed unnecessary create/destroy wrappers. Fix allegro5 backend + use same code as other backend.
...
+ Update gallery links (#4280 )
2021-06-30 15:50:15 +02:00
Giovanni Funchal
6792e1a3e0
Backends: SDL2: Remove unnecessary ImGui_ImplSDL2_NewFrame() parameter. ( #3244 )
2021-06-30 15:04:40 +02:00
ocornut
23a15834fa
Fonts: Fix calling ClearTexData() (clearing CPU side font data) triggering an assert in NewFrame(). ( #3487 ) + Backends: added additional assert to facilitate detecting user understand they haven't initialized a backend.
2021-06-29 18:16:47 +02:00
ocornut
4cec3a0467
Backends: support for multiple imgui context with little testing ( #586 , #1851 , #2004 , #3012 , #3934 , #4141 )
...
I believe more renderer backends should work. GLFW/Win32/SDL/Vulkan probably have many issues.
2021-06-29 16:42:13 +02:00
ocornut
70c603854e
Backends: moved global to a data structure to facilitate support for multi-contexts. ( #586 , #1851 , #2004 , #3012 , #3934 , #4141 )
...
This is NOT enable multi-contexts for any backends
- in order to make this commit as harmless as possible, while containing all the cruft/renaming
-
2021-06-29 14:37:58 +02:00
ocornut
95db098477
ImFontAtlas: move implicit AddFontDefault call to Build() function + remove unnecessary asserts in backend.
2021-06-25 17:27:17 +02:00
ocornut
838c16533d
Backends: Comments.
2021-05-27 13:59:35 +02:00
Nikolai Wuttke
186b734db0
Backends: SDL2: Extend global mouse pos availability check ( #3950 )
2021-03-22 15:08:13 +01:00
ocornut
8dd692c29c
Android: Amend backend and examples with minor consistency tweaks. ( #3446 )
2021-03-04 11:07:03 +01:00
ocornut
b1a18d82e3
Moving backends code from examples/ to backends/ (step 6: update markdown documentation)
2020-10-14 14:42:00 +02:00
ocornut
d9b2fb7338
Moving backends code from examples/ to backends/ (step 1: moving source files)
2020-10-14 14:41:40 +02:00