[Update] So i found a method called
StationGui_SetActiveApp(YOUR ENUMERATED PAGE);
and you can call it from anywhere in the file instead of the
lActiveApp = eComputerTerminalApp_Airlock
nonsense.
Hey, so i'm trying to get the terminal to progress to the next screen when the loading bar is complete but the codes not running as I expect. I think it might be because of my approach but I don't know a different way to complete this, If anyone could help me that would be great, Thanks!.
Heres the full method
bool airlockButtonPressable = true;
void diveroom_terminal_OnGui(const tString&in asEntityName, float afTimeStep)
{
//ImGui_SetTransCategory("Terminal_Airlock");
StationGuiBG_Scanlines();
cImGuiLabelData Title;
cImGuiLabelData Content;
Title.mFont.mvSize = cVector2f(65, 65);
Content.mFont.mvSize = cVector2f(40, 40);
int lActiveApp = StationGui_GetActiveApp(eComputerTerminalApp_MainMenu);
bool bBackButton = true;
if (StationGui_DrawAndCheckErrors()) return;
if(airlockIsOpen == true){
lActiveApp = eComputerTerminalApp_Airlock;
}
switch(lActiveApp)
{
case eComputerTerminalApp_MainMenu:
ImGui_DoLabelExt("SYSTEM BOOT SEQUENCE V1.2", Title, cVector3f(20, 0, 0));
ImGui_DoLabelExt("> SYSYEM BOOT START", Content, cVector3f(20, 100, 0));
ImGui_DoLabelExt("> RAM O.K.", Content, cVector3f(20, 100+(35*1), 0));
ImGui_DoLabelExt("> CPU CLOCK SET", Content, cVector3f(20, 100+(35*2), 0));
ImGui_DoLabelExt("> MEMORY INIT", Content, cVector3f(20, 100+(35*3), 0));
ImGui_DoLabelExt("> BANK F.1.1 OK", Content, cVector3f(20, 100+(35*4), 0));
ImGui_DoLabelExt("> BANK F.2.2 BAD", Content, cVector3f(20, 100+(35*5), 0));
ImGui_DoLabelExt("> ERROR MEMORY INIT AT 2", Content, cVector3f(20, 100+(35*6), 0));
ImGui_DoLabelExt("> CHIP NOT FOUND", Content, cVector3f(20, 100+(35*7), 0));
ImGui_DoLabelExt("> ECX:0023121A", Content, cVector3f(20, 100+(35*18), 0));
bBackButton = false;
break;
//, false, cVector2f(0.75, 0.25), 1.5f "ComputerApp_Airlock_Title",
///////////////////////// Right here////////////////////////////////////////////////////////////
///////////////////////// Right here////////////////////////////////////////////////////////////
///////////////////////// Right here////////////////////////////////////////////////////////////
case eComputerTerminalApp_Airlock:
if(StationGui_LoadingWindow("loadingwindow", "Reboot", "Rebooting...", 5.0f, false))
{
lActiveApp = eComputerTerminalApp_Airlock_Proceed;
}
bBackButton = false;
break;
case eComputerTerminalApp_Airlock_Proceed:
StationGui_AddApp("Activate Airlock",airlockButtonPressable,eComputerTerminalApp_Airlock_Opened);
StationGui_AddApp("Check Airlock Status",false,eComputerTerminalApp_MainMenu);
StationGui_AddApp("Lock Workbench",false,eComputerTerminalApp_MainMenu);
bBackButton = false;
break;
case eComputerTerminalApp_Airlock_Opened:
airlockButtonPressable=false;
lActiveApp = eComputerTerminalApp_Airlock_Proceed;
bBackButton = true;
break;
}
}
Heres the specific case:
case eComputerTerminalApp_Airlock:
if(StationGui_LoadingWindow("loadingwindow", "Reboot", "Rebooting...", 5.0f, false))
{
lActiveApp = eComputerTerminalApp_Airlock_Proceed;
}
bBackButton = false;
break;