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

◆ SetItemHealth()

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

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

1043 {
1044 Widget widget = m_Root.FindAnyWidget(itemWidget);
1045
1046 if (enabled)
1047 {
1048 ImageWidget healthMark;
1049 Class.CastTo(healthMark, widget.FindAnyWidget(healthWidget));
1050
1051 if (health == -1)
1052 {
1053 healthMark.GetParent().Show(false);
1054 widget.Show(enabled);
1055 return;
1056 }
1057
1058 int color = 0x00FFFFFF;
1059 if (m_TargetItemFrozen && (health != GameConstants.STATE_RUINED || health == -2))
1060 color = Colors.COLOR_FROZEN;
1061 else
1062 color = ItemManager.GetItemHealthColor(health);
1063
1064 healthMark.SetColor(color);
1065 healthMark.SetAlpha(0.5);
1066 healthMark.GetParent().Show(true);
1067 }
1068
1069 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().