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

◆ SetWeaponModeAndZeroing()

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

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

567 {
568 Widget widget;
569
570 widget = m_Root.FindAnyWidget(itemWidget);
571
572 if (enabled && m_Player)
573 {
574 TextWidget txtModeWidget;
575 TextWidget txtZeroingWidget;
576
577 Class.CastTo(txtModeWidget, widget.FindAnyWidget(upWidget));
578 Class.CastTo(txtZeroingWidget, widget.FindAnyWidget(downWidget));
579
580 Weapon w = Weapon.Cast(m_Player.GetEntityInHands());
581 string zeroing = string.Empty;
582 if (w)
583 zeroing = string.Format("%1 m", w.GetCurrentZeroing(w.GetCurrentMuzzle()));
584
585 txtModeWidget.SetText(m_Player.GetWeaponManager().GetCurrentModeName());
586 txtZeroingWidget.SetText(zeroing);
587 widget.Show(true);
588 }
589 else
590 widget.Show(false);
591 }
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().