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

Keybind doesn't close ClickGUI when in-game

Closed
ghost opened this issue Jun 6, 2019 · 7 comments
Closed

Keybind doesn't close ClickGUI when in-game #1258

ghost opened this issue Jun 6, 2019 · 7 comments
Labels
Bug

Comments

@ghost
Copy link

ghost commented Jun 6, 2019

open and close the ClickGui with the same button.
(works in Main Menu)

@ghost ghost added the Suggestion label Jun 6, 2019
@LeafHacker
Copy link
Contributor

LeafHacker commented Jun 6, 2019

This is already a thing.

@SpicyBigGithub
Copy link

SpicyBigGithub commented Jun 6, 2019

Lol

@LeafHacker
Copy link
Contributor

LeafHacker commented Jun 8, 2019

Ok, it turns out this is broken when ingame. It works when opening clickgui from the Main Menu however.

@LeafHacker LeafHacker reopened this Jun 8, 2019
@LeafHacker LeafHacker added Bug and removed Suggestion labels Jun 8, 2019
@LeafHacker LeafHacker changed the title Close ClickGui by pressing the same button again Keybind doesn't close ClickGUI when in-game Jun 8, 2019
@LeafHacker
Copy link
Contributor

LeafHacker commented Jun 8, 2019

Interesting... If you set ClickGUI to visible (and have the hud enabled) you can see that it closes fine, but it instantly re-opens.

@Cerbiac
Copy link

Cerbiac commented Jun 8, 2019

To answer the question in the other post. I was using Impact 4.6 on Minecraft 1.13.2, thanks for reopening this one.

@LeafHacker
Copy link
Contributor

LeafHacker commented Jun 8, 2019

Minecraft's keypress handler first runs key event listeners for any open GUI, and then after that it checks runs key binding listeners for the ingame stuff (but only if there's no GUI open).

What was happening was we would handle they key even once (and toggle off clickgui) but then no GUI was open so it would immediately handle the key event again (for ingame stuff) and toggle clickgui back on!

This should be fixed in the next version.

@Cerbiac
Copy link

Cerbiac commented Jun 8, 2019

Nice explanation.
EDIT: Woah I look r00d looking back. Trying to look for one of my other posts. I mean "Thanks for the explanation."

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug
Projects
None yet
Development

No branches or pull requests

3 participants