1
0
forked from mirrors/0ad

Start Atlas by closing the root page

Theere is now an  `Engine.startAtlas` property that will start Atlas
when it's returned from the root page. The `Engine.RestartInAtlas`
function is removed.
This commit is contained in:
phosit
2025-03-12 14:05:27 +01:00
committed by phosit
parent c2d3595777
commit 2d206708cd
9 changed files with 64 additions and 26 deletions
+3 -8
View File
@@ -172,11 +172,6 @@ void RestartEngine()
g_Shutdown = ShutdownType::Restart;
}
void StartAtlas()
{
g_Shutdown = ShutdownType::RestartAsAtlas;
}
// main app message handler
static InReaction MainInputHandler(const SDL_Event_* ev)
{
@@ -430,9 +425,9 @@ static void Frame(RL::Interface* rlInterface)
if (g_NetClient)
g_NetClient->Poll();
g_GUI->TickObjects();
if (g_GUI->GetPageCount() == 0)
QuitEngine();
std::optional<bool> completionCommand{g_GUI->TickObjects()};
if (completionCommand.has_value())
g_Shutdown = completionCommand.value() ? ShutdownType::RestartAsAtlas : ShutdownType::Quit;
if (rlInterface)
rlInterface->TryApplyMessage();