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

Added back ImGui MKB Input functions, and added new "Overlay Hotkey" category (Issue #957) #958

Conversation

justarandomguyintheinternet
Copy link
Contributor

  • Implemented and made the changes as described in Overlay mod bindings and access to mouse/keyboard #957
  • Reverted the changes from 4f23722, bringing back ImGui MKB Input functions
  • Made changes to allow for a sub-type of Hotkeys: Overlay Hotkeys
    • These only get activated while the CET overlay is active
  • They can be registered from LUA via registerOverlayHotkey(id, name, callback)

@WSSDude
Copy link
Collaborator

WSSDude commented Aug 4, 2024

Will need to have proper look tomorrow but I would want some changes definitely. Overall doesnt seem bad though and seems to cover #957 quite nicely 👍

@WSSDude WSSDude self-requested a review August 4, 2024 00:33
Copy link
Collaborator

@WSSDude WSSDude left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

just some quick review but i want a more proper look as said, this is really surface level

@WSSDude
Copy link
Collaborator

WSSDude commented Aug 4, 2024

Do overlay keys not block ImGui input? Was this tested fully? I have a feel it may forbid from typing some letters but yeah, that is one of the things I need to properly "review"...
Like if I set some hotkey like A+B, will I still be able to type A+B in ImGui input fields?

And another thing - did you verify that input functions of ImGui are not accessible outside of onDraw right? Think we move whole ImGui table outside of onDraw but better be sure...

Another thing I need to properly look at...

Guess other things will get resolved when you change it according to comments but will write them down tomorrow if they wont change in the meantime.

@WSSDude
Copy link
Collaborator

WSSDude commented Aug 4, 2024

One more note following Discord messages - ImGui keyboard functions may not work with other layout than QWERTY I realised, would need to be checked...

If it doesnt function with other layout, would mark it as limitation for now as Im unsure now if it works with other layouts without changes in imgui_impl/win32.cpp (which this shouldnt touch ideally... that should be left for some other PR if it is an issue...)

@justarandomguyintheinternet
Copy link
Contributor Author

Do overlay keys not block ImGui input? Was this tested fully? I have a feel it may forbid from typing some letters but yeah, that is one of the things I need to properly "review"... Like if I set some hotkey like A+B, will I still be able to type A+B in ImGui input fields?

And another thing - did you verify that input functions of ImGui are not accessible outside of onDraw right? Think we move whole ImGui table outside of onDraw but better be sure...

Another thing I need to properly look at...

Guess other things will get resolved when you change it according to comments but will write them down tomorrow if they wont change in the meantime.

  • Yes, I did test that. Keys that are used in an overlay hotkey still get through, unless the full hotkey is pressed, in which case the keys get intercepted (Should be expected)
  • Also tested that, calling any of the ImGui input functions outside onDraw throws the expected Tried to call ImGui from invalid event! error

Copy link

@manavortex manavortex left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

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.

3 participants