362 {
364
365 widget =
m_Root.FindAnyWidget(itemWidget);
366
367 if (enabled)
368 {
369 ImageWidget healthMark;
370 Class.CastTo(healthMark, widget.FindAnyWidget(healthWidget));
371
372 if (
m_ItemFrozen && health != GameConstants.STATE_RUINED)
373 {
374 healthMark.SetColor(
Colors.COLOR_FROZEN);
375 healthMark.SetAlpha(0.5);
376 healthMark.GetParent().Show(true);
377 }
378 else
379 {
380 switch (health)
381 {
382 case -1 :
383 healthMark.GetParent().Show(false);
384 break;
385 case GameConstants.STATE_PRISTINE :
386 healthMark.SetColor(
Colors.COLOR_PRISTINE);
387 healthMark.SetAlpha(0.5);
388 healthMark.GetParent().Show(true);
389 break;
390 case GameConstants.STATE_WORN :
391 healthMark.SetColor(
Colors.COLOR_WORN);
392 healthMark.SetAlpha(0.5);
393 healthMark.GetParent().Show(true);
394 break;
395 case GameConstants.STATE_DAMAGED :
396 healthMark.SetColor(
Colors.COLOR_DAMAGED);
397 healthMark.SetAlpha(0.5);
398 healthMark.GetParent().Show(true);
399 break;
400 case GameConstants.STATE_BADLY_DAMAGED:
401 healthMark.SetColor(
Colors.COLOR_BADLY_DAMAGED);
402 healthMark.SetAlpha(0.5);
403 healthMark.GetParent().Show(true);
404 break;
405 case GameConstants.STATE_RUINED :
406 healthMark.SetColor(
Colors.COLOR_RUINED);
407 healthMark.SetAlpha(0.5);
408 healthMark.GetParent().Show(true);
409 break;
410 default :
411 healthMark.SetColor(0x00FFFFFF);
412 healthMark.SetAlpha(0.5);
413 healthMark.GetParent().Show(true);
414 break;
415 }
416 }
417
418 widget.Show(true);
419 }
420 else
421 widget.Show(false);
422 }