SaveTool: replace a chain of ifs with a switch.

This commit is contained in:
Guillaume Jacquemin 2021-06-20 23:49:30 +02:00
parent 057185cb65
commit 441e0c2d1a

View file

@ -353,17 +353,19 @@ void SaveTool::drawImGui() {
void SaveTool::drawGui() { void SaveTool::drawGui() {
drawMainMenu(); drawMainMenu();
if(_uiState == UiState::Disclaimer) { switch(_uiState) {
case UiState::Disclaimer:
drawDisclaimer(); drawDisclaimer();
} break;
else if(_uiState == UiState::Initialising) { case UiState::Initialising:
drawInitialisation(); drawInitialisation();
} break;
else if(_uiState == UiState::ProfileManager) { case UiState::ProfileManager:
drawProfileManager(); drawProfileManager();
} break;
else if(_uiState == UiState::MainManager) { case UiState::MainManager:
drawManager(); drawManager();
break;
} }
if(_aboutPopup) { if(_aboutPopup) {