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

PST floating window should close on right click #2024

Open
2 of 7 tasks
burner1024 opened this issue Feb 24, 2024 · 2 comments
Open
2 of 7 tasks

PST floating window should close on right click #2024

burner1024 opened this issue Feb 24, 2024 · 2 comments

Comments

@burner1024
Copy link
Contributor

Bug description

Floating menu doesn't close on right click.

Steps to reproduce

  1. Load game.
  2. Right click once.
  3. Right click again.

Expected behavior

Second right click should close the menu and unpause game.

Screenshots

If applicable, add screenshots to help explain your problem.

GemRB version (check as many as you know apply)

  • master as of this issue
  • 0.9.2
  • 0.9.1
  • 0.9.0

Video Driver (check as many as you know apply)

  • SDL1.2
  • SDL2 built with OPENGL_BACKEND enabled
  • SDL2 without OPENGL_BACKEND enabled
@lynxlynxlynx
Copy link
Member

Windows aren't clickable, so I guess the easiest way is to add extra callbacks to all the buttons, which will cover the vast majority of cases.

@bradallred
Copy link
Member

bradallred commented Feb 25, 2024

Looking at the original, right clicks anywhere toggle it. So it's not a window event. I think what you want to do is add another event monitor in GameControl to listen to right clicks and move the logic out of OnMouseDown.

the other half is adding a function to actually toggle the window like we do with CreateTopWinLoader and invoke that instead.

@bradallred bradallred self-assigned this Mar 3, 2024
lynxlynxlynx added a commit that referenced this issue May 1, 2024
- properly close
- delay closing until subselection, so choice remains
  (suboptimal until #2024, since now one either needs to reselect or manually close)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants