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

Method UpdatePicture

engine/Poseidon/UI/Map/UIMapDialogs.cpp:252–283  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

250}
251
252void DisplayInsertMarker::UpdatePicture()
253{
254 CStatic* ctrl = dynamic_cast<CStatic*>(GetCtrl(IDC_INSERT_MARKER_PICTURE));
255 if (ctrl)
256 {
257 const ParamEntry& markers = Pars >> "CfgMarkers";
258 if (_picture < 0 || _picture >= markers.GetEntryCount())
259 {
260 return;
261 }
262 const ParamEntry& colors = Pars >> "CfgMarkerColors";
263 if (_color < 0 || _color >= colors.GetEntryCount())
264 {
265 return;
266 }
267
268 const ParamEntry& markerCfg = markers.GetEntry(_picture);
269 RString picture = markerCfg >> "icon";
270 const ParamEntry& colorCfg = colors.GetEntry(_color);
271 PackedColor color;
272 if (stricmp(colorCfg.GetName(), "default") == 0)
273 {
274 color = GetPackedColor(markerCfg >> "color");
275 }
276 else
277 {
278 color = GetPackedColor(colorCfg >> "color");
279 }
280 ctrl->SetText(picture);
281 ctrl->SetFtColor(color);
282 }
283}
284
285void DisplayInsertMarker::PrevPicture()
286{

Callers

nothing calls this directly

Calls 7

GetCtrlFunction · 0.85
GetPackedColorFunction · 0.85
stricmpFunction · 0.50
GetEntryCountMethod · 0.45
GetNameMethod · 0.45
SetTextMethod · 0.45
SetFtColorMethod · 0.45

Tested by

no test coverage detected