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

◆ SetItemHealth()

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

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

1007 {
1008 Widget widget = m_Root.FindAnyWidget(itemWidget);
1009
1010 if (enabled)
1011 {
1012 ImageWidget healthMark;
1013 Class.CastTo(healthMark, widget.FindAnyWidget(healthWidget));
1014
1015 if (health == -1)
1016 {
1017 healthMark.GetParent().Show(false);
1018 widget.Show(enabled);
1019 return;
1020 }
1021
1022 int color = 0x00FFFFFF;
1023 if (m_TargetItemFrozen && (health != GameConstants.STATE_RUINED || health == -2))
1024 color = Colors.COLOR_FROZEN;
1025 else
1026 color = ItemManager.GetItemHealthColor(health);
1027
1028 healthMark.SetColor(color);
1029 healthMark.SetAlpha(0.5);
1030 healthMark.GetParent().Show(true);
1031 }
1032
1033 widget.Show(enabled);
1034 }
Widget m_Root
Определения ActionTargetsCursor.c:90
bool m_TargetItemFrozen
Определения ActionTargetsCursor.c:88
@ Colors
Определения EnWorld.c:88
WorkspaceWidget Widget
Defined in code.

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

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