1
0
mirror of https://github.com/Drezil/imgui.git synced 2024-12-22 15:46:35 +00:00
Commit Graph

46 Commits

Author SHA1 Message Date
Gereon V
055e71518e Backends: clear bits set in io.BackendFlags on backend Shutdown(). Clear BackendPlatformName. (, )
Amended with fix for missing clear for ImGuiBackendFlags_HasGamepad.
2023-04-17 14:57:12 +02:00
Michael Martz
506f7e0074 Using nullptr in locations where warning disable is not convenient. (, ) 2023-04-11 11:33:50 +02:00
David Maas
e92b29ad53 Backends: OSX: Added support for io.AddMouseSourceEvent(). ()
Also marked "mouse" input in example_apple_metal's UIKit micro-backend as being touch input.

# Conflicts:
#	docs/CHANGELOG.txt
2023-04-11 10:14:53 +02: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
8d29665ae1 Backends: OSX: Fixed scroll wheel scaling for devices emitting events with hasPreciseScrollingDeltas==false (e.g. non-Apple mices).
Ref  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
ocornut
a5f3596e6c Backends: Allegro5: use al_draw_indexed_prim() or al_draw_prim() depending on version. ()
+ OSX comments ()
Amend 185b4dde + 50aeeff
2022-11-30 14:46:45 +01:00
Akira Maezawa
86f2af2bc7 Backends: OSX: Fixed mouse coordinate before clicking on the host window. () 2022-11-02 12:02:39 +01:00
ocornut
dfa1bb0ac7 Backends: OSX: Fixed mouse inputs on flipped views. () 2022-10-06 14:28:14 +02:00
ocornut
fd408c9790 Renamed and merged keyboard modifiers key enums and flags into a same set:. ImGuiKey_ModXXX -> ImGuiMod_XXX and ImGuiModFlags_XXX -> ImGuiMod_XXX. (, )
Changed signature of GetKeyChordName() to use ImGuiKeyChord.
Additionally SetActiveIdUsingAllKeyboardKeys() doesn't set ImGuiKey_ModXXX but we never need/use those and the system will be changed in upcoming commits.
2022-09-26 10:43:26 +02:00
ocornut
e99c4fc668 Nav: fixes keyboard/gamepad nav actions running without the corresponding config flags (). Fixes 8b8a61b. , , , , )
NavUpdate() can now clears ImGuiInputSource_None.
2022-07-25 17:19:45 +02:00
ocornut
90ef327882 Reordered keys representing directions to follow a consistent L/R/U/D order everywhere. (, , )
Amended to avoid static analysis false positive.
2022-07-06 17:48:01 +02:00
Stephen H. Gerstacker
67410d53f7 Backends: Metal, OSX: Various fixes (ARC / Autorelease fixes with metal-cpp and extensions). () 2022-06-30 20:16:45 +02:00
rokups
d768b8c812 Backends: Metal: Align code more closely with other backends. OSX: Add missing return for mouse pos events.
'#if __has_feature(objc_arc)' was removed as callback gets required reference via ImGui_ImplMetal_GetBackendData() so that weakref is not really needed.
2022-05-04 16:40:35 +02:00
stuartcarnie
e66fc22057 Backends: OSX: Removed ImGui_ImplOSX_HandleEvent() from backend API. Move event tracking (desktop only) to OSX backend. ()
Fix using NSKeyUp ().
2022-05-03 14:35:08 +02:00
stuartcarnie
d58b8414b9 Backends: OSX, Metal: Tweaks. Use preferred method of obtaining a timestamp. ()
+ Rename ImGuiFocusObserver. Docking branch will use it for more than focus.
2022-05-03 12:12:03 +02:00
noisewuwei
e54db4ee70 Backends: OSX, Metal: Store backend data in a per-context struct, allowing to use these backends with multiple contexts. (, , )
# Conflicts:
#	docs/CHANGELOG.txt
2022-04-27 15:17:32 +02:00
thedmd
3c07879504 Backends: OSX: Inputs: Monitor NSKeyUp events to catch missing keyUp for key when user press Cmd + key () 2022-03-22 18:48:52 +01:00
Jan Sikorski
a61ca097a7
Backends: OSX: Fix typo in scrolling event handler. () 2022-02-19 18:57:41 +01:00
ocornut
2554b512c0 Backends: OSX: Forward keyDown/keyUp events to OS when unused by Dear ImGui. 2022-02-07 11:55:24 +01:00
rokups
551ab84c2d Backends: OSX: Fix building with old Xcode versions.
Builds have failed on Xcode versions that do not yet support `@available` or do not have new APIs (that are unavailable on target OS version) defined at all. Using true build time version checks fixes these issues.
2022-01-31 14:41:56 +01:00
thedmd
5429f0f6b5 Backends: OSX, Android: Replaced AddKeyModsEvent() added by 790132a in favor of unified key enum system. (, ) 2022-01-27 17:46:48 +01:00
ocornut
62d6be3747 IO: Removed ImGuiInputSource from public api for now, unnecessary. (, ) 2022-01-20 17:39:25 +01:00
thedmd
5ea47d9560 Backends: OSX: Add full gamepad support using io.AddKeyEvent(), io.AddKeyAnalogEvent(), stopped writing to io.NavInputs[]. (, ) 2022-01-20 17:25:49 +01:00
thedmd
b8e56dce83 IO: Added AddMousePosEvent(), AddMouseButtonEvent(), AddMouseWheelEvent() api + updated all Backends. () (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). (, , , , )
2022-01-17 17:35:37 +01:00
ocornut
b6582a471a Backends: OSX: Fix Game Controller nav mapping to use shoulder for both focusing and tweak speed. () 2022-01-17 16:22:32 +01:00
ocornut
92c4ff1c2f Rename ImGuiKey_LeftControl to ImGuiKey_LeftCtrl, ImGuiKey_RightControl to ImGuiKey_RightCtrl + made key order match mods order. () 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. () + fix again broken by 746c9f7
Amended to submit modifiers before.
2022-01-17 15:21:17 +01:00
Liu Liu
457d4b7b72 Backends: OSX: Adedd basic IME support for macOS. (, ) 2022-01-12 14:37:05 +01:00
ocornut
956e03009a Backends: OSX: Build fIx. Made GetKeyName() input tolerant. Internals: added GetNavInputName(). 2022-01-11 18:48:16 +01:00
ocornut
e8172fdfbc Rename io.AddKeyModEvent() -> io.AddKeyModsEvent() and updated backends accordingly. (, )
Amend 790132a (breaking)
2022-01-10 17:00:32 +01:00
ocornut
b2e2cc44c2 Backends: OSX: Fixed typo. 2022-01-10 15:47:37 +01:00
ocornut
790132a672 Added io.AddKeyModEvent() and updated backends accordingly. (, ) 2022-01-10 15:17:00 +01:00
thedmd
ee436aa803 Backends: OSX: Update to use io.AddEventKey() will full key map (, , ) 2022-01-10 15:14:52 +01:00
ocornut
afffcd5810 Inputs: rename ImGuiKey_KeyPadEnter > ImGuiKey_KeypadEnter () 2022-01-06 14:25:56 +01:00
Stuart Carnie
1b6b8602c1 Backends: OSX: Fix keyboard support. Handle scroll cancel. Don't set mouse cursor shape unconditionally. (, , )
Note the original FIXME: refered to GLFWs Cocoa implementation, which is largely what this commit provides.
2021-12-13 11:56:43 +01:00
Stuart Carnie
b720f1f03c Backends: OSX: Add Game Controller support. () 2021-12-13 11:25:59 +01:00
James McCartney
bc3d267c51 Backends: OSX: Use mach_absolute_time as CFAbsoluteTimeGetCurrent can jump backwards. (, ) 2021-09-21 12:36:37 +02:00
thedmd
2f40be638f IO, Backends: add io.AddFocusEvent(). Clear pressed keys after loosing input focus ()
Amend/fix , , , 
2021-08-17 20:10:45 +02:00
Rokas Kupstys
0b8a247074 Backends: OSX: Added a fix for shortcuts using CTRL key instead of CMD key. () 2021-06-23 15:25:10 +02:00
ocornut
838c16533d Backends: Comments. 2021-05-27 13:59:35 +02:00
rokups
6d53884487 Backends: OSX: Fix keys remaining stuck in pressed state when CMD-tabbing to a different application. () 2021-04-19 15:15:23 +02:00
Rokas Kupstys
066406b9be Backends: OSX: Fix mouse position not being reported when mouse buttons other than left one are down. ()
# Conflicts:
#	docs/CHANGELOG.txt
2021-01-27 12:44:42 +01:00
Albin Odervall
b934b9bb86 Backends: OSX, Metal: Fix -Wshadow, -Wimplicit-float-conversion, and -Wsign-conversion warnings. () 2020-11-03 15:38:59 +01:00
Rokas Kupstys
6f57d58e82 Backends: OSX: Fix KeyPadEnter on MacOS. () 2020-10-28 12:31:10 +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