mirror of
https://gitea.wildfiregames.com/0ad/0ad.git
synced 2026-06-21 01:04:06 +00:00
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:
+3
-8
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user