Skip to content

Commit

Permalink
xrGame/ui/UIGameTutorialSimpleItem.cpp: removed code and function cal…
Browse files Browse the repository at this point in the history
…ls duplication
  • Loading branch information
Xottab-DUTY committed Mar 10, 2020
1 parent 0a4739e commit 91002c0
Showing 1 changed file with 9 additions and 8 deletions.
17 changes: 9 additions & 8 deletions src/xrGame/ui/UIGameTutorialSimpleItem.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -256,39 +256,40 @@ void CUISequenceSimpleItem::Start()
return;
}

CUIPdaWnd& pda = ui_game_sp->GetPdaMenu();
if (!xr_stricmp(m_pda_section, "pda_map"))
{
ui_game_sp->GetPdaMenu().SetActiveSubdialog("eptMap");
pda.SetActiveSubdialog("eptMap");
bShowPda = true;
}
else if (!xr_stricmp(m_pda_section, "pda_tasks"))
{
ui_game_sp->GetPdaMenu().SetActiveSubdialog("eptTasks");
pda.SetActiveSubdialog("eptTasks");
bShowPda = true;
}
else if (!xr_stricmp(m_pda_section, "pda_statistics"))
{
ui_game_sp->GetPdaMenu().SetActiveSubdialog("eptStatistics");
pda.SetActiveSubdialog("eptStatistics");
bShowPda = true;
}
else if (!xr_stricmp(m_pda_section, "pda_ranking"))
{
ui_game_sp->GetPdaMenu().SetActiveSubdialog("eptRanking");
pda.SetActiveSubdialog("eptRanking");
bShowPda = true;
}
else if (!xr_stricmp(m_pda_section, "pda_logs"))
{
ui_game_sp->GetPdaMenu().SetActiveSubdialog("eptLogs");
pda.SetActiveSubdialog("eptLogs");
bShowPda = true;
}
else if (!xr_stricmp(m_pda_section, "pda_show_second_task_wnd"))
{
ui_game_sp->GetPdaMenu().Show_SecondTaskWnd(true);
pda.Show_SecondTaskWnd(true);
bShowPda = true;
}

if ((!ui_game_sp->GetPdaMenu().IsShown() && bShowPda) || (ui_game_sp->GetPdaMenu().IsShown() && !bShowPda))
ui_game_sp->GetPdaMenu().HideDialog();
if ((!pda.IsShown() && bShowPda) || (pda.IsShown() && !bShowPda))
pda.HideDialog();
}
}

Expand Down

0 comments on commit 91002c0

Please sign in to comment.