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

Method InitUI

engine/Poseidon/UI/DisplayUIMenus.cpp:840–874  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

838void DisplayMission::InitUI()
839{
840 // main map
841 GWorld->CreateMainMap();
842 DisplayMap* map = dynamic_cast<DisplayMap*>(GWorld->Map());
843 if (map)
844 {
845 const ParamEntry* cls = ExtParsMission.FindEntry("showMap");
846 map->ShowMap(!cls ? true : (*cls));
847 cls = ExtParsMission.FindEntry("showWatch");
848 map->ShowWatch(!cls ? true : (*cls));
849 cls = ExtParsMission.FindEntry("showCompass");
850 map->ShowCompass(!cls ? true : (*cls));
851 cls = ExtParsMission.FindEntry("showNotepad");
852 map->ShowNotepad(!cls ? true : (*cls));
853 cls = ExtParsMission.FindEntry("showGPS");
854 map->ShowGPS(!cls ? false : (*cls));
855 }
856
857 // in game UI
858 AbstractUI* ui = GWorld->UI();
859 if (ui)
860 {
861 const ParamEntry* cls = ExtParsMission.FindEntry("showHUD");
862 bool show = !cls ? true : (*cls);
863 ui->ShowAll(show);
864 }
865
866 // chat
867 // Do NOT clear here: a JIP client may have received in-mission chat while
868 // loading, and those messages should be visible when the mission starts.
869 // The destructor clears on exit, so a fresh mission always begins empty.
870 GChatList.SetRect(0.05, 0.68, 0.7, 0.02);
871 GChatList.SetRows(6);
872}
873
874static void SaveContinue()
875{
876 if (!ContinueSaved && GWorld->GetRealPlayer() && !GWorld->GetRealPlayer()->IsDammageDestroyed())
877 {

Callers

nothing calls this directly

Calls 12

CreateMainMapMethod · 0.80
ShowMapMethod · 0.80
ShowWatchMethod · 0.80
ShowNotepadMethod · 0.80
ShowGPSMethod · 0.80
UIMethod · 0.80
ShowAllMethod · 0.80
SetRectMethod · 0.80
MapMethod · 0.45
FindEntryMethod · 0.45
ShowCompassMethod · 0.45
SetRowsMethod · 0.45

Tested by

no test coverage detected