MCPcopy Create free account
hub / github.com/BohemiaInteractive/CWR / OnComboSelChanged

Method OnComboSelChanged

engine/Poseidon/UI/Map/UIMapExtDisplay.cpp:674–709  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

672 }
673}
674
675void DisplayArcadeMap::OnComboSelChanged(int idc, int curSel)
676{
677 switch (idc)
678 {
679 case IDC_ARCMAP_SECTION:
680 if (curSel == 0)
681 {
682 _currentTemplate = &_templateMission;
683 }
684 else if (curSel == 1)
685 {
686 _currentTemplate = &_templateIntro;
687 }
688 else if (curSel == 2)
689 {
690 _currentTemplate = &_templateOutroWin;
691 }
692 else if (curSel == 3)
693 {
694 _currentTemplate = &_templateOutroLoose;
695 }
696 _map->_infoClick._type = signNone;
697 _map->_infoClickCandidate._type = signNone;
698 _map->_infoMove._type = signNone;
699 _map->SetTemplate(_currentTemplate);
700 // Intel does not change
701 ArcadeUnitInfo* uInfo = _currentTemplate->FindPlayer();
702 if (uInfo)
703 {
704 Glob.header.playerSide = (TargetSide)uInfo->side;
705 }
706 ShowButtons();
707 break;
708 }
709 Display::OnComboSelChanged(idc, curSel);
710}
711
712void DisplayArcadeMap::OnToolBoxSelChanged(int idc, int curSel)

Callers

nothing calls this directly

Calls 2

FindPlayerMethod · 0.80
SetTemplateMethod · 0.45

Tested by

no test coverage detected