Comments (3)
Hello,
I am not sure I understand your question, it's too ambiguous. What do you mean by callbacks?
If your item in the 3D scene are dear imgui widgets projected into 2D, they can register themselves using IMGUI_TEST_ENGINE_ITEM_ADD()
+ IMGUI_TEST_ENGINE_ITEM_INFO()
like other dear imgui widgets.
If your items in the 3D scene are well... 3D items.. this isn't something the test engine needs to know about.
But you can use queries from your 3D engine to retrieve relative coordinates in the 2D space and use e.g. ctx->MouseMove()
calls to hover them within your viewport, or use high-level queries in your 3D engine to rotate the camera so that some object become visible and unobstructed before you can click on it. There's no limitation to what you can do as long as you can interface with your 3D engine to make actions, but the ball is in your court, Test Engine isn't going to magically guess how your 3D engine and viewport works.
from imgui_test_engine.
Ocornut - no, thank you for your prompt reply. I wasn't aware of how to go about registering via imgui_test_engine_item_add + _info. It is not my expectation that Test Engine should know anything about the workings of my 3D engine ... I just need to know what I need to bubble up from it and into Test Engine.
from imgui_test_engine.
I just do fake mouse moves in my viewport widget to particular positions and then do the ctx->MouseClick()
calls.
e.g. the linked test is an easy way to move the cursor into the middle of the viewport and clicks the left mouse button to place a voxel
In this example I test the selection by spanning an aabb with the test engine:
from imgui_test_engine.
Related Issues (20)
- ImGuiTestOpFlags_NoFocusWindow flag ignored in function WindowBringToFront HOT 10
- Branch never executed HOT 12
- How to query value from ref? HOT 2
- ImGuiItemStatusFlags errors when building HOT 2
- Missing 1.89.7 tag HOT 1
- Race condition HOT 7
- Idea: testing language bindings by comparing "screen recordings" of imgui_demo
- Screen capture on macOS with HighDPI fails because of FrameBufferScale!=1 HOT 5
- CaptureScreenshotWindow("...", ImGuiCaptureFlags_StitchAll ) fails HOT 9
- CaptureScreenshotWindow on docked window leads to a black capture HOT 1
- Conan package HOT 4
- Is it possible to use this Test engine for integration tests? HOT 2
- Proposal: Simple MSVC build script (without MSBuild or Make) HOT 5
- Test suite can't find ImGui Git branch if it's not on HEAD HOT 1
- Segfault in ImGuiTestContext::ComboClick HOT 1
- clang asan runtime error (negative shift) HOT 1
- Can we get ImGuiTestEngine_UnregisterTest, too HOT 1
- Minor compiler warning HOT 1
- Unmangle child ids HOT 7
- TestEngine: heap use after free in ItemDragAndDrop 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 imgui_test_engine.