menu.conf: hide the Pause menu item while the player is paused#18153
menu.conf: hide the Pause menu item while the player is paused#18153go4399 wants to merge 1 commit into
Conversation
According to the hidden logic of the Play and Pause menu items, these two items should never appear at the same time. But, while the player was paused, the context menu showed both Play and Pause items. The correct behavior is to hide the Pause item while the player is paused.
|
Could you briefly explain how the changes in this PR, changes the conditions and fixes the bug? |
|
I see. However, I think better fix would be in select.lua to make those comparisons consistent, instead of changing the order in menu.conf. Maybe @guidocella can help here. |
This bug might be related to Lua's short-circuit evaluation of the Lua's short-circuit evaluation for When
When
To verify this, I added several verbose statements to Run When The simplest way to fix this bug is to modify Maybe @guidocella can help confirm. |
|
I don't see how to force it to evaluate all properties the first time. auto_profiles.lua has the same issue, it works in most cases just because most properties are initially unavailable. I guess we can just swap the order. |
|
Write a helper function to convert For this particular one, you can just write |




According to the
hiddenlogic of the Play and Pause menu items defined inmenu.conf, these two items should never appear at the same time.But, while the player was paused, the context menu showed both Play and Pause items.
The correct behavior is to hide the Pause item while the player is paused.