-
Notifications
You must be signed in to change notification settings - Fork 18
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[VL.ImGui.Stride.Viewports] #673
base: main
Are you sure you want to change the base?
[VL.ImGui.Stride.Viewports] #673
Conversation
…Gui.Stride.InputSource
…Gui.Stride.InputSource
…Gui.Stride.Viewports
…Gui.Stride.Viewports
known issues: InputHandling need to be checked Didn't work after restart F9 some bugs need to be found
…Gui.Stride.Viewports
maybe fixed SkiaWidget
Remove unused RenderView from RenderWidget ... is now done in vl ClenUp
Some Comments
…Gui.Stride.Viewports
remove transformation workaround ... not longer needed ... fixed with 8e87a5a
the AddMousePosEvent is only set if ImGui is not in viewport mode. If ImGui is in viewport mode, the screen space mouse position is set every frame in ImGuiWindows.
So it should not break the current approach |
…eature/VL.ImGui.Stride.Viewports
SO I fixed most of it for now, merged main and the bugfix. The problem with pulling the window in and out still exists. I lose the input source or the appropriate viewport after dragging in and out a few times. Sometimes it goes faster ... but I don't have enough time right now to investigate it more closely. But I will keep at it. |
use VL.ImGui.Stride/src/ImGuiRenderer.cs from kopffarben
known issue ... remove IInputSource from normal Stride Windows
…r.cs Use this Option in WindowCore to has an UniqueName, so save WindowLayout now working remove temp loggiong ... was for debugging
…Gui.Stride.Viewports.WIP
…reen was wron ... width was 0 ... bug in Stride
…Gui.Stride.Viewports.WIP
Refactored `ImGuiWindow` and `ImGuiWindows` classes to use `IResourceHandle<InputManager>` and handle null `Window` objects gracefully. Updated `Dispose` methods across multiple classes to follow the standard dispose pattern, including adding `Dispose(bool disposing)` methods and finalizers. Removed `InputManagerExtension` class. Improved code readability with minor formatting changes.
Introduce UniqueId field to RenderWidget for unique naming. Add constructors to initialize UniqueId. Remove nodeContext property. Update ImGui.BeginChild to use UniqueId for unique names.
- Added new input pins ("Bounds," "Save Bounds," "Enable Camera," "EditMode") and removed some ("Edit Mode," "Node Context") in `VL.ImGui.Stride.vl` to improve functionality. - Modified `HowTo ImGui Windows Docking.vl` - Added `GameWindow` property and modified constructors in `ImGuiWindow.cs` and `ImGuiWindows.cs` to accept `RectangleF bounds`.
…Gui.Stride.Viewports
SO finally I have it ... Yeahhh I also had to use the SourceGenerator to get the layout saving of ImGui to work. Does nothing else than bringing the NodeContext in the Window Widget into the Constructor ... so I have a UniqueID for the names of the windows that I can add to the name name##uniqueID The InputHandling was a really difficult matter ... but now it works completely ... I always capture the correct InputSource ... and the mapping to the SubInputSources always works. Apart from that, I also handle the commands, perfmeters and so on ... Even the EditMode works, oh yes, I also save the bounds of the main window in the InputPin ... Copy from RenderWindow Just take a look at Helppatch ... it's almost a full-blown application ... Windows, save layout, edit layout ... , LightMode/DarkMode ... etc. |
Ahh, thought I'd found all the bugs. The keyboard input doesn't seem to work at all, doesn't work with the LogUI helppatch either. Short debugging shows that the events from Stride arrive but are somehow not passed on to ImGui. I have relatively little time at the moment, I'm at mBox. I'll be able to take a closer look on Friday. I can't understand the second bug at all, I haven't seen it like this before and unfortunately I can't reproduce it. |
mhh don't fix it in Viewport/Docking mode, but fix it in VL.ImGui.Stride Helppatch LogView |
PR Details
Viewports support for VL.Imgui.Stride
Description
This is an attempt to support ImGui viewports in VL.
It already works quite well, there are a few small things that do not work satisfactorily yet.
IssueTracker: https://github.com/kopffarben/VL.StandardLibs/issues
The previous features should all still work. Not 100 percent sure.
The problem with the Skia input should also be fixed.
I think Kairos is still working, but I'm not quite sure as I don't know exactly how it should behave.
In general, it could be cleaned up again, I'm also not completely satisfied with the naming of some classes ... but in principle it's good for now.
I'm also not quite sure if this is the best solution for some things.
I would be very happy about a code review.
Types of changes