Comments (10)
I opened a PR that should at least fix the backward compatibility. Let me know if that works for you or doesn't (ideally on the PR page).
from magnum-integration.
This is now fixed with #93, merged as c60149c.
from magnum-integration.
I'm gonna leave this here, some useful info on the why's and how's: ocornut/imgui#4858. Also note this little comment from the same link:
I think we will try to make some more use of it before declaring the change valid.
Might be worth waiting until this hits a tagged release to actually add support for this, in case they pull or rework this.
from magnum-integration.
Fair enough. The "backwards compatibility" doesn't currently work for us though.
from magnum-integration.
Okay, I understand the immediate issue now. Regardless of the AddKeyEvent
changes, we should have been doing something like:
// at startup
io.KeyMap[ImGuiKey_Tab] = KeyEvent::Key::Tab;
// in the switch
io.KeysDown[KeyEvent::Key::Tab];
This fixes the issue of out-of-bounds indexing io.KeysDown
with the new remapped ImGuiKey
enum, and as a nice side-effect we can save ourselves the switch altogether + users get a full key map in io.KeysDown
with platform-specific keys.
The AddKeyEvent
changes need a bit more thought, since we need backwards-compatibility with older imgui versions.
from magnum-integration.
Actually it's not as simple: ocornut/imgui#2269 (comment)
Maybe for now we have to hack around this by ifdefing around ImGuiKey_Tab
being >= 512 and then subtracting ImGuiKey_NamedKey_BEGIN
. Sigh 😵
from magnum-integration.
Indeed this is one (unusual but technically valid) use case we didn't think about when designing the backward compatibility....
Unfortunately I'm not sure how we can fix it.
We will be adding new asserts to detect it + mark this specific use case as a breaking change.
from magnum-integration.
Might be worth waiting until this hits a tagged release to actually add support for this, in case they pull or rework this.
FYI the Key aspect of this change IHMO at this point is a settled API.
Bug/tweaks may arise before we tag 1.87 but your feedback here would be super helpful.
What will not yet committed and will come before we tag 1.87 is transitioning other inputs into event calls (e.g io.AddMouseButtonEvent()
standardizing the new IO API and allowing trickling input queue (to handle very slow framerate better). That may be pushed next week.
from magnum-integration.
Sure I'll keep an eye out for issues that may emerge due to these changes. My "Rat" GUI code requires docking branch, so normally I find out when you merge the master into that.
from magnum-integration.
Many thanks. (=
from magnum-integration.
Related Issues (20)
- Add Support for Dear ImGui extensions HOT 1
- i get an error when i am trying running a robotic simulation with robot_dart and magnum HOT 1
- Crash in magnum-imgui Example Program HOT 1
- Consider switching from the legacy Find*.cmake modules to install(TARGETS ... EXPORT ...) HOT 10
- Could NOT find MagnumIntegration (missing: Dart) HOT 1
- [arch] build fails - lwop_ivec3 not defined HOT 2
- Magnum::ImGuiIntegration missing from debian package HOT 5
- How to use ImGui integration as subdirectory HOT 6
- Custom flags for Dear ImGui integration HOT 4
- Fail to build target iOS HOT 5
- ArchLinux PKGBUILD needs fixes HOT 1
- Linking failure with ImGui HEAD HOT 2
- ImGui integration does not support drawing lots of elements (ImGuiBackendFlags_RendererHasVtxOffset) HOT 7
- ImGui integration does not support adding UserCallback to DrawList HOT 1
- ImGui IdxOffset not honored correctly during frame drawing HOT 4
- ImGUI IO assertion failure HOT 3
- Imgui_internal.h IMGUI_API inclusion HOT 16
- MSYS .gitattributes typo: Wrong line ending normalization under Windows HOT 2
- ImGuiIO modifier key states incorrect under Linux/X11 (glfw) HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from magnum-integration.