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