// Game functions void VoxGame::QuitToFrontEnd() { m_pVoxWindow->TurnCursorOn(true); SetGameMode(GameMode_FrontEnd); m_pFrontEndOptionBox->SetToggled(true); m_pDebugCameraOptionBox->SetToggled(true); m_pVoxWindow->Update(m_deltaTime); GameModeChanged(); CameraModeChanged(); }
void VoxGame::SetupGUI() { m_pDeferredCheckBox->SetToggled(m_pVoxSettings->m_deferredRendering); m_pShadowsCheckBox->SetToggled(m_pVoxSettings->m_shadows); m_pSSAOCheckBox->SetToggled(m_pVoxSettings->m_ssao); m_pBlurCheckBox->SetToggled(m_pVoxSettings->m_blur); m_pDynamicLightingCheckBox->SetToggled(m_pVoxSettings->m_dynamicLighting); m_pMSAACheckBox->SetToggled(m_pVoxSettings->m_msaa); m_pInstanceRenderCheckBox->SetToggled(m_pVoxSettings->m_instancedParticles); m_pWireframeCheckBox->SetToggled(m_pVoxSettings->m_wireframeRendering); m_pDebugRenderCheckBox->SetToggled(m_pVoxSettings->m_debugRendering); m_pFaceMergingCheckbox->SetToggled(m_pVoxSettings->m_faceMerging); m_pStepUpdateCheckbox->SetToggled(m_pVoxSettings->m_stepUpdating); // Debug GUI if(m_pVoxSettings->m_showDebugGUI) { ShowGUI(); } else { HideGUI(); } // Game mode if (strcmp(m_pVoxSettings->m_gameMode.c_str(), "Debug") == 0) { m_pDebugOptionBox->SetToggled(true); } else if (strcmp(m_pVoxSettings->m_gameMode.c_str(), "Game") == 0) { m_previousCameraMode = CameraMode_MouseRotate; m_pGameOptionBox->SetToggled(true); m_pMouseRotateCameraOptionBox->SetToggled(true); // Supress exporting of files, since we are loading into a DEBUG configuration direct from bootstrap m_pInventoryManager->SetSupressExport(true); m_pActionBar->SetSupressExport(true); m_pPlayer->SetSupressStatsExport(true); // Load default inventory since we are loading directly into the game m_pInventoryManager->LoadInventory("", PlayerClass_Debug, false); } else if (strcmp(m_pVoxSettings->m_gameMode.c_str(), "FrontEnd") == 0) { m_pFrontEndOptionBox->SetToggled(true); m_pFrontendCameraOptionBox->SetToggled(true); } m_pVoxWindow->Update(m_deltaTime); GameModeChanged(); CameraModeChanged(); }