DayZ 1.29
DayZ Explorer by KGB
 
Загрузка...
Поиск...
Не найдено

◆ SetItemHealth()

void ActionTargetsCursor::SetItemHealth ( int health,
string itemWidget,
string healthWidget,
bool enabled )
inlineprotected

См. определение в файле ActionTargetsCursor.c строка 1044

1046 {
1047 Widget widget = m_Root.FindAnyWidget(itemWidget);
1048
1049 if (enabled)
1050 {
1051 ImageWidget healthMark;
1052 Class.CastTo(healthMark, widget.FindAnyWidget(healthWidget));
1053
1054 if (health == -1)
1055 {
1056 healthMark.GetParent().Show(false);
1057 widget.Show(enabled);
1058 return;
1059 }
1060
1061 int color = 0x00FFFFFF;
1062 if (m_TargetItemFrozen && (health != GameConstants.STATE_RUINED || health == -2))
1063 color = Colors.COLOR_FROZEN;
1064 else
1065 color = ItemManager.GetItemHealthColor(health);
1066
1067 healthMark.SetColor(color);
1068 healthMark.SetAlpha(0.5);
1069 healthMark.GetParent().Show(true);
1070 }
1071
1072 widget.Show(enabled);
Widget m_Root
Определения ActionTargetsCursor.c:85
bool m_TargetItemFrozen
Определения ActionTargetsCursor.c:83
@ Colors
Определения EnWorld.c:88
WorkspaceWidget Widget
Defined in code.

Перекрестные ссылки Class::CastTo(), Colors::COLOR_FROZEN, ItemManager::GetItemHealthColor(), m_Root, m_TargetItemFrozen и GameConstants::STATE_RUINED.

Используется в PrepareCursorContent().