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

Add button to temporary hide all game dialogs #12670

Closed
2 tasks
JayDi85 opened this issue Aug 17, 2024 · 2 comments
Closed
2 tasks

Add button to temporary hide all game dialogs #12670

JayDi85 opened this issue Aug 17, 2024 · 2 comments
Assignees

Comments

@JayDi85
Copy link
Member

JayDi85 commented Aug 17, 2024

Problem: many choose dialogs use a modal state, so users can't close/hide it or click on another button until making a choice. It's a problem cause users want to see a battlefield, chatting or card researching before making a choice.

MTGA solve it as special eye button to show battlefield without any dialogs.

XMage can use same feature, but it can be hard to implement (xmage/swing uses shared layer for all modal dialogs). So must be researched (is it possible or not).

TODO:

  • move game modal dialogs from global to to game panels (make it not really modal);
  • add button to temporary hide/show all dialogs on battlefield.
@JayDi85
Copy link
Member Author

JayDi85 commented Sep 4, 2024

Alternative solution: disable modal mode at all (e.g. use callbacks instead blocking UI — any windows and dialogs can be switches at any time).

It works fine but introduce a buggy (important fox xmage) and a limited UX logic with max dialogs depth (non important to xmage — there are 1-2 max dialog chain like “main -> connect dialog -> search flag dialog”).

Bonus features:

TODO:

  • add modal and non-modal support to current dialogs (add callback usage instead modal result);
  • add app param to switch between modal and non-modal GUI (for dev tests);
  • migrate all JDialog to MageDialog;
  • research and add wrong data send protection for game panels (client must send only last modal data to the server, not any other clicks and choices — so all client side dialogs in the game must be limited to 1 depth -- it's server side feature to process wrong requests, not GUI)

JayDi85 added a commit that referenced this issue Sep 7, 2024
- GUI: added non-blocking UI to almost all app and game dialogs;
- GUI: it allows to switch between UI dialogs and use any UI elements at any moment;
- GUI: it allows to use chat, card popup, battlefield, concede and other features while choosing (related to #12670);
- GUI: it allows to download images while playing (related to #4160, not fully tested);
- GUI: enabled by default, can be disabled by java option: -Dxmage.guiModalMode=true
- connection: auto-connect will be visible in main menu on startup;
- connection: removed some unused features (auto-connect by command line);
- connection: added <ESC> button to close connection dialog;
- download: added background images download (see non-blocking UI);
- download: improved cancel stability and fixes that it can't stop preparing/downloading process in some use cases;
- app: fixed freezes on macOS systems in some use cases (related to #12431, #11292, #9300, #4920);
@JayDi85
Copy link
Member Author

JayDi85 commented Sep 9, 2024

Not actual anymore with non-blocking UI in last release #12825

@JayDi85 JayDi85 closed this as completed Sep 9, 2024
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

1 participant