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

◆ SetWeaponModeAndZeroing()

void ScriptedWidgetEventHandler::SetWeaponModeAndZeroing ( string itemWidget,
string upWidget,
string downWidget,
bool enabled )
inlineprotected

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

566 {
567 Widget widget;
568
569 widget = m_Root.FindAnyWidget(itemWidget);
570
571 if (enabled && m_Player)
572 {
573 TextWidget txtModeWidget;
574 TextWidget txtZeroingWidget;
575
576 Class.CastTo(txtModeWidget, widget.FindAnyWidget(upWidget));
577 Class.CastTo(txtZeroingWidget, widget.FindAnyWidget(downWidget));
578
579 Weapon w = Weapon.Cast(m_Player.GetHumanInventory().GetEntityInHands());
580 string zeroing = string.Empty;
581 if (w)
582 zeroing = string.Format("%1 m", w.GetCurrentZeroing(w.GetCurrentMuzzle()));
583
584 txtModeWidget.SetText(m_Player.GetWeaponManager().GetCurrentModeName());
585 txtZeroingWidget.SetText(zeroing);
586 widget.Show(true);
587 }
588 else
589 widget.Show(false);
590 }
Widget m_Root
Определения SizeToChild.c:9
static proto string Format(string fmt, void param1=NULL, void param2=NULL, void param3=NULL, void param4=NULL, void param5=NULL, void param6=NULL, void param7=NULL, void param8=NULL, void param9=NULL)
Gets n-th character from string.
WorkspaceWidget Widget
Defined in code.

Перекрестные ссылки Class::CastTo(), string::Format(), m_Player и m_Root.

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