Skip to content
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

Dragging of window, new hooks for derived classes, XP wnd access functions #6

Open
wants to merge 11 commits into
base: master
Choose a base branch
from

Conversation

TwinFan
Copy link

@TwinFan TwinFan commented Jun 13, 2020

Hi Chris,

thank you for sharing this code!

I had seen your forum thread on ImGui integration, checked out sparker's imgui4xp project and had added to it until it had all functionality that I think I need for turning LiveTraffic's windows into ImGui windows.

Here I want to offer you the changes to ImgWindow. I believe they are backward compatible for any existing code.

In a nutshell this is:

  • Adding some public and protected function to allow working with the underlying XP window. That still doesn't allow changing the window handle, but allows using it.
  • Added Move/Resize support for self-decorated windows (I use this for HUD-like transparent non-intrusive information windows)
  • Added two more hooks before and after rendering, so derived classes can do stuff before (especially also add window flags) and afterwards
  • Some cleanup (include dependencies, compiler warnings, compiling without ImGui deprecatons)

I have added individual commits to my xsb_public repository, separating the functionality in the same order as it originally had been added to imgui4xp, so you should have an easier time following which change supports which functionality.

Hope you find this useful

  • Birger

TwinFan added 11 commits May 30, 2020 18:34
as underlying ImGui resources don't copy well. Done by deleting the implicitly declared copy constructor/assignment.
returning the currently valid geometry (OS, VR, or just standard)
Can now define a "drag area": Clicking into that area of a window and dragging moves the entire window. Useful especially for self-decorated windows.
Ie. by defining `IMGUI_DISABLE_OBSOLETE_FUNCTIONS` in `imconfig.h`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant