Skip to content

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

Open
TwinFan wants to merge 11 commits intoxsquawkbox:masterfrom
TwinFan:master
Open

Dragging of window, new hooks for derived classes, XP wnd access functions#6
TwinFan wants to merge 11 commits intoxsquawkbox:masterfrom
TwinFan:master

Conversation

@TwinFan
Copy link
Copy Markdown

@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.

1 participant