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

Method CreateWeaponsPoolPage

engine/Poseidon/UI/Map/UIMapDisplay.cpp:1756–1916  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1754 }
1755}
1756
1757void DisplayMap::CreateWeaponsPoolPage(int slot)
1758{
1759 // create section "Pool"
1760 int section = _briefing->FindSection("Pool");
1761 if (section < 0)
1762 {
1763 section = _briefing->AddSection();
1764 }
1765 else
1766 {
1767 _briefing->InitSection(section);
1768 int s;
1769 while ((s = _briefing->FindSection("Pool")) >= 0)
1770 {
1771 _briefing->RemoveSection(s);
1772 }
1773 }
1774 _briefing->AddName(section, "Pool");
1775
1776 RString title;
1777 RString empty;
1778 int mask, maskExclude = 0;
1779
1780 switch (slot)
1781 {
1782 case 0:
1783 title = LocalizeString(IDS_BRIEF_PRIMARY_WEAPONS);
1784 empty = "Weapon:";
1785 mask = MaskSlotPrimary;
1786 break;
1787 case 1:
1788 title = LocalizeString(IDS_BRIEF_SECONDARY_WEAPONS);
1789 empty = "Weapon:";
1790 mask = MaskSlotSecondary;
1791 maskExclude = MaskSlotPrimary;
1792 break;
1793 case 2:
1794 case 3:
1795 title = LocalizeString(IDS_BRIEF_SPECIAL_ITEMS);
1796 empty = "Weapon:";
1797 mask = MaskSlotBinocular;
1798 break;
1799 case 4:
1800 title = LocalizeString(IDS_BRIEF_SPECIAL_HANDGUN);
1801 empty = "Weapon:";
1802 mask = MaskSlotHandGun;
1803 break;
1804 case 15:
1805 case 16:
1806 case 17:
1807 case 18:
1808 title = LocalizeString(IDS_BRIEF_SPECIAL_HANDGUN_MAGAZINES);
1809 empty = "Magazine:";
1810 mask = MaskSlotHandGunItem;
1811 break;
1812 default:
1813 title = LocalizeString(IDS_BRIEF_SPECIAL_MAGAZINES);

Callers

nothing calls this directly

Calls 13

LocalizeStringFunction · 0.85
InitSectionMethod · 0.80
RemoveSectionMethod · 0.80
AddNameMethod · 0.80
AddTextMethod · 0.80
AddBreakMethod · 0.80
FormatSectionMethod · 0.80
RStringClass · 0.50
FindSectionMethod · 0.45
AddSectionMethod · 0.45
SizeMethod · 0.45
GetDisplayNameMethod · 0.45

Tested by

no test coverage detected