Currently dialogs obtain the information if the game is running from the menu structure, passing that info as an argument.
But the less the GUI page that opens the dialog needs to know about the opened GUI page, the easier to maintain and write.
Details
- Reviewers
- None
- Commits
- rP22900: Allow JS GUI pages to find out if the game is running.
Notice that there is IsVisualReplay, SetPaused, IsPaused, GetSimRate, GetPlayerID, StartGame, Script_EndGame providing other getters for that global.
Notice the lobby dialog might be able to use it.
I can look into that after finishing the other patch that I wrote this patch for (joining save & load dialog).
Diff Detail
- Repository
- rP 0 A.D. Public Repository
- Lint
Automatic diff as part of commit; lint not applicable. - Unit
Automatic diff as part of commit; unit tests not applicable.
Event Timeline
Build failure - The Moirai have given mortals hearts that can endure.
Link to build: https://jenkins.wildfiregames.com/job/docker-differential/683/display/redirect
Successful build - Chance fights ever on the side of the prudent.
Link to build: https://jenkins.wildfiregames.com/job/vs2015-differential/169/display/redirect
Build failure - The Moirai have given mortals hearts that can endure.
Link to build: https://jenkins.wildfiregames.com/job/docker-differential/684/display/redirect