@@ -103,7 +103,6 @@ CUIMainIngameWnd::CUIMainIngameWnd()
103
103
m_pItem = NULL ;
104
104
UIZoneMap = xr_new<CUIZoneMap>();
105
105
m_pPickUpItem = NULL ;
106
- m_artefactPanel = xr_new<CUIArtefactPanel>();
107
106
108
107
warn_icon_list[ewiWeaponJammed] = &UIWeaponJammedIcon;
109
108
warn_icon_list[ewiRadiation] = &UIRadiaitionIcon;
@@ -121,7 +120,8 @@ CUIMainIngameWnd::~CUIMainIngameWnd()
121
120
{
122
121
DestroyFlashingIcons ();
123
122
xr_delete (UIZoneMap);
124
- xr_delete (m_artefactPanel);
123
+ if (m_artefactPanel)
124
+ xr_delete (m_artefactPanel);
125
125
HUD_SOUND::DestroySound (m_contactSnd);
126
126
xr_delete (g_MissileForceShape);
127
127
}
@@ -264,15 +264,12 @@ void CUIMainIngameWnd::Init()
264
264
AttachChild (&UIMotionIcon);
265
265
UIMotionIcon.Init ();
266
266
267
- m_artefactPanel->InitFromXML (uiXml, " artefact_panel" , 0 );
268
- this ->AttachChild (m_artefactPanel);
269
-
270
- // AttachChild(&UIStaticDiskIO);
271
- // UIStaticDiskIO.SetWndRect(1000, 750, 16, 16);
272
- // UIStaticDiskIO.GetUIStaticItem().SetRect(0, 0, 16, 16);
273
- // UIStaticDiskIO.InitTexture("ui\\ui_disk_io");
274
- // UIStaticDiskIO.SetOriginalRect(0, 0, 32, 32);
275
- // UIStaticDiskIO.SetStretchTexture(TRUE);
267
+ if (uiXml.NavigateToNode (" artefact_panel" ))
268
+ {
269
+ m_artefactPanel = xr_new<CUIArtefactPanel>();
270
+ m_artefactPanel->InitFromXML (uiXml, " artefact_panel" , 0 );
271
+ this ->AttachChild (m_artefactPanel);
272
+ }
276
273
277
274
HUD_SOUND::LoadSound (" maingame_ui" , " snd_new_contact" , m_contactSnd, SOUND_TYPE_IDLE);
278
275
}
@@ -281,21 +278,6 @@ float UIStaticDiskIO_start_time = 0.0f;
281
278
282
279
void CUIMainIngameWnd::Draw ()
283
280
{
284
- // show IO icon
285
- // bool IOActive = (FS.dwOpenCounter > 0);
286
- // if (IOActive)
287
- // UIStaticDiskIO_start_time = Device.fTimeGlobal;
288
-
289
- // if ((UIStaticDiskIO_start_time + 1.0f) < Device.fTimeGlobal)
290
- // UIStaticDiskIO.Show(false);
291
- // else
292
- // {
293
- // u32 alpha = clampr(iFloor(255.f * (1.f - (Device.fTimeGlobal - UIStaticDiskIO_start_time) / 1.f)), 0, 255);
294
- // UIStaticDiskIO.Show(true);
295
- // UIStaticDiskIO.SetColor(color_rgba(255, 255, 255, alpha));
296
- // }
297
- // FS.dwOpenCounter = 0;
298
-
299
281
if (!m_pActor)
300
282
return ;
301
283
0 commit comments