-
Notifications
You must be signed in to change notification settings - Fork 22
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
Fix: Added a blocking layer to prevent interaction with the game while in the exit menu #2574
base: main
Are you sure you want to change the base?
Fix: Added a blocking layer to prevent interaction with the game while in the exit menu #2574
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is looks like the files have a number of unnecessary whitespace changes that make the diff very large.
What is the name of the element with 50% transparency?
This change is missing a yaml file in Patch104pZH\Design\Changes\v1.0
There is no name, this is the first WINDOW, (That's alpha 50, out of 255 that's 19.6 percent.)
Done. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Visually this does not look quite right.
The whole screen flashes white shortly, instead of just the menu window.
I recommend to make it flash on the window only.
After testing under different lighting conditions, I've noticed screen flickering. I have tried various methods to disable it, but I haven't been able to. I suspect it may be determined by the game itself. (That is, flash the first WINDOW, and since the layer I added is the first, it now flashes across the entire screen because that is the size of the layer. If we make it the second layer (and the dark background of the menu will be the first layer as it was originally) this will cause a bug where it (the added second layer) will remain on the screen and not disappear when exiting the menu) |
This flashing is some kind of feature that originally is located on the Exit Menu bounds. This now covers the whole screen. It would be ideal to leave the flashing where it was originally. The new visual is quite obvious and may be considered distracting. |
The flashing is indeed as you described, but it always occurs on the first layer. Originally, the first layer was the size of the menu, not covering the entire screen, which is why the screen didn’t flash. Now, the menu has been moved to the second layer, and the first layer has been resized to cover the whole screen. As a result, the flashing now covers the entire screen, since that's the current size of the first layer. I tried swapping the layers so that the menu would remain on the first layer (and the flashing would be limited to the size of the menu), with the blocking layer being the second. However, this causes a bug where, after exiting the menu, the blocking layer remains on the screen. I suggest leaving it as a draft for now until we can find another way to address the issue. |
Perhaps a solution is to make that Input Block layer with STATUS = SEE_THRU or HIDDEN |
I noticed the Window transitions file and was able to fix the flash using it. |
Window | ||
WinName = QuitNoSave.wnd:MenuBox | ||
Style = FLASH | ||
FrameDelay = 1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What does this frame delay do? Before it was 0.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The delay defines the order in which the elements appear, and I defined that the menu will appear one delay after the blocking screen. You can see in the buttons that the delay increases from button to button, and thus the buttons appear one after the other and not all at once.
Now that we have made the blocking element completely transparent, we can return it to 0.
Patch104pZH/Design/Changes/v1.0/2574_add_blocking_layer_exit_menu.yaml
Outdated
Show resolved
Hide resolved
Update blocking layer with 100% transparency. (You can see for example that opening the options menu from within the game or the exit dialog adds a partially transparent background to the game, just for context.) |
An additional layer was added to both types of exit menus that blocks the entire screen with100% transparency, preventing any interaction with the game behind it. The layer functions as expected, and the menu buttons are still working as intended. Upon returning to the game, the blocking layer is removed.
Layer Hierarchy
Before:
After: