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

Method Preinit

engine/Poseidon/UI/DisplayUISetupMP.cpp:162–265  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

160 sprintf(buffer, "%d: %s%s%s", role->unit + 1, (const char*)vehicle, (const char*)position, (const char*)leader);
161 return (const char*)buffer;
162}
163
164void DisplayMultiplayerSetup::Preinit()
165{
166 // hide params
167 if (GetCtrl(IDC_MPSETUP_PARAM1_TITLE))
168 {
169 GetCtrl(IDC_MPSETUP_PARAM1_TITLE)->ShowCtrl(false);
170 }
171 if (GetCtrl(IDC_MPSETUP_PARAM1))
172 {
173 GetCtrl(IDC_MPSETUP_PARAM1)->ShowCtrl(false);
174 }
175 if (GetCtrl(IDC_MPSETUP_PARAM2_TITLE))
176 {
177 GetCtrl(IDC_MPSETUP_PARAM2_TITLE)->ShowCtrl(false);
178 }
179 if (GetCtrl(IDC_MPSETUP_PARAM2))
180 {
181 GetCtrl(IDC_MPSETUP_PARAM2)->ShowCtrl(false);
182 }
183
184 // hide roles
185 if (GetCtrl(IDC_MPSETUP_ROLES_TITLE))
186 {
187 GetCtrl(IDC_MPSETUP_ROLES_TITLE)->ShowCtrl(false);
188 }
189 if (GetCtrl(IDC_MPSETUP_ROLES))
190 {
191 GetCtrl(IDC_MPSETUP_ROLES)->ShowCtrl(false);
192 }
193
194 // empty mission info
195 C3DStatic* text = dynamic_cast<C3DStatic*>(GetCtrl(IDC_MPSETUP_ISLAND));
196 if (text)
197 {
198 text->SetText("");
199 }
200 text = dynamic_cast<C3DStatic*>(GetCtrl(IDC_MPSETUP_NAME));
201 if (text)
202 {
203 text->SetText("");
204 }
205 text = dynamic_cast<C3DStatic*>(GetCtrl(IDC_MPSETUP_DESC));
206 if (text)
207 {
208 text->SetText("");
209 }
210
211 // side buttons
212 C3DActiveText* button = dynamic_cast<C3DActiveText*>(GetCtrl(IDC_MPSETUP_WEST));
213 if (button)
214 {
215 button->EnableCtrl(false);
216 }
217 button = dynamic_cast<C3DActiveText*>(GetCtrl(IDC_MPSETUP_EAST));
218 if (button)
219 {

Callers

nothing calls this directly

Calls 6

GetCtrlFunction · 0.85
LocalizeStringFunction · 0.85
ShowCtrlMethod · 0.80
EnableCtrlMethod · 0.80
SetTextMethod · 0.45
IsServerMethod · 0.45

Tested by

no test coverage detected