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

Method InGameUI

engine/Poseidon/UI/InGame/InGameUI.cpp:852–1126  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

850 if (subItem->_enable)
851 {
852 okEnable = true;
853 }
854 }
855 }
856 item->_visible = okShow;
857 item->_enable = okEnable;
858 item->_submenu->_visible = okShow;
859 item->_submenu->_enable = okEnable;
860 ret = true;
861 break;
862 }
863 }
864 }
865 return ret;
866}
867
868Menu* Menu::FindMenu(int cmd, bool alsoInAtomic)
869{
870 if (!alsoInAtomic)
871 {
872 if (!CanBeInMenu(cmd))
873 {
874 return nullptr;
875 }
876 if (_atomic)
877 {
878 return nullptr;
879 }
880 }
881 for (int i = 0; i < _items.Size(); i++)
882 {
883 MenuItem* item = _items[i];
884 if (item->_submenu)
885 {
886 Menu* found = item->_submenu->FindMenu(cmd, alsoInAtomic);
887 if (found != nullptr)
888 {
889 return found;
890 }
891 }
892 else
893 {
894 if (item->_cmd == cmd)
895 {
896 return this;
897 }
898 }
899 }
900 return nullptr;
901}
902
903MenuItem* Menu::Find(int cmd, bool alsoInAtomic)
904{
905 if (!alsoInAtomic)
906 {
907 if (!CanBeInMenu(cmd))
908 {
909 return nullptr;

Callers

nothing calls this directly

Calls 14

GetFontIDFunction · 0.85
GetPackedColorFunction · 0.85
GetPictureNameFunction · 0.85
GlobLoadTextureFunction · 0.85
ColorClass · 0.85
GetValueFunction · 0.85
PlusMinusMethod · 0.80
SetHintMethod · 0.80
UITimeClass · 0.50
InitFunction · 0.50
PackedColorClass · 0.50
LoadFontMethod · 0.45

Tested by

no test coverage detected