Commit graph

6 commits

Author SHA1 Message Date
phosit
2415b41438
Remove Engine.SwitchGuiPage from session 2026-04-26 12:44:41 +02:00
phosit
df5fee6103 Rename PushGuiPage to OpenChildPage
There is no `PopGuiPage` anymore. For symmetry there should also be no
`PushGuiPage`.
2025-03-09 10:39:20 +01:00
phosit
f9114a87f2 Get a promise when starting a GUIpage
When calling `Engine.PushGuiPage` a promise is returned. The promise is
settled when the "child" page is closed. That allows to `await` it
inside `async` functions.
Previously the callback was run right inside the call to
`Engine.PopGuiPage`. Now the continuation of the promise is called at
the end of the "tick".

This won't help performance. It will more likely make things worse.
Since gui pages aren't opened or closed that frequently, it doesn't
matter that much.

Refs: 86c151ebaa

For the engine side:
The promise is stored in the `CGUIManager::SGUIPage` (like previously
the callback). When the promise is fulfilled it enqueues a callback in
the `JobQueue` of the `JSContext`.

Original patch by: @wraitii
Comments by: @wraitii, @Stan, @Polakrity, @lyv, @elexis, @vladislavbelov
Differential Revision: https://code.wildfiregames.com/D3807
This was SVN commit r28145.
2024-07-08 19:07:04 +00:00
phosit
29b57026a6 Remove Engine.IsGameStarted completely
Revert 89e511def9

refs: #4211, bc6da5e3f2

Accepted By: elexis
Differential Revision: https://code.wildfiregames.com/D5152
This was SVN commit r27883.
2023-10-12 19:20:56 +00:00
Gallaecio
3968760129 Single Player → single-player
Summary:
Single-player is proper English, single player and singleplayer are less
correct.
(Contrary to multiplayer, which doesn't have a hyphen or space.)

Test Plan: Check for mistakes and omissions.

Reviewers: Gallaecio

Reviewed By: Gallaecio
Subscribers: Freagarach, elexis, O8 JS GUI

Differential Revision: https://code.wildfiregames.com/D2312
This was SVN commit r23176.
2019-11-23 08:10:36 +00:00
elexis
bc6da5e3f2 SessionMessageBox class, refs #5387.
Decouples events from event handling, removes implicit-pause duplication
per messagebox and allows mods to modify message box values.

Differential Revision: https://code.wildfiregames.com/D2398
Comments By: Stan, Freagarach
This was SVN commit r23114.
2019-10-30 11:14:55 +00:00