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

◆ AddVoiceNotification()

void NotificationUI::AddVoiceNotification ( string player,
string name )
inlineprotected

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

86 {
87 if (!m_VoiceNotifications.Contains(player))
88 {
89 Widget notification;
90 if (!m_WidgetTimers.Contains(player))
91 {
92 notification = GetGame().GetWorkspace().CreateWidgets("gui/layouts/new_ui/notifications/notification_voice_element.layout", m_VoiceContent);
93 }
94 else
95 {
96 notification = m_WidgetTimers.Get(player);
97 m_WidgetTimers.Remove(player);
98 notification.SetAlpha( 120 / 255 );
99 Widget w_c = notification.FindAnyWidget( "Name" );
100 if ( w_c )
101 {
102 w_c.SetAlpha( 1 );
103 }
104 }
105
106 RichTextWidget title = RichTextWidget.Cast(notification.FindAnyWidget("Name"));
107 m_VoiceNotifications.Insert(player, notification);
108 title.SetText(name);
110 }
111 }
PlayerSpawnPresetDiscreteItemSetSlotData name
one set for cargo
proto native WorkspaceWidget GetWorkspace()
ref Widget m_VoiceContent
Определения NotificationUI.c:5
ref map< string, Widget > m_VoiceNotifications
Определения NotificationUI.c:9
void UpdateTargetHeight()
Определения NotificationUI.c:135
ref map< string, Widget > m_WidgetTimers
Определения NotificationUI.c:16
proto native CGame GetGame()
proto native external Widget CreateWidgets(string layout, Widget parentWidget=NULL, bool immedUpdate=true)
Create widgets from *.layout file.
WorkspaceWidget Widget
Defined in code.

Перекрестные ссылки WorkspaceWidget::CreateWidgets(), GetGame(), CGame::GetWorkspace(), m_VoiceContent, m_VoiceNotifications, m_WidgetTimers, name и UpdateTargetHeight().