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

◆ AddNotification()

void NotificationUI::AddNotification ( NotificationRuntimeData data)
inlineprotected

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

49 {
50 Widget notification = GetGame().GetWorkspace().CreateWidgets("gui/layouts/new_ui/notifications/notification_element.layout", m_NotificationContent);
51
52 ImageWidget icon = ImageWidget.Cast( notification.FindAnyWidget( "Image" ) );
53 RichTextWidget title = RichTextWidget.Cast( notification.FindAnyWidget( "Title" ) );
54
55 if ( data.GetIcon() != "" )
56 icon.LoadImageFile( 0, data.GetIcon() );
57 title.SetText( data.GetTitleText() );
58
59 if ( data.GetDetailText() != "" )
60 {
61 Widget bottom_spacer = notification.FindAnyWidget( "BottomSpacer" );
62 RichTextWidget detail = RichTextWidget.Cast( notification.FindAnyWidget( "Detail" ) );
63 bottom_spacer.Show(true);
64 detail.SetText( data.GetDetailText() );
65 detail.Update();
66 bottom_spacer.Update();
67 notification.Update();
68 }
69
70 m_Notifications.Insert( data, notification );
72 }
proto native WorkspaceWidget GetWorkspace()
ref map< NotificationRuntimeData, Widget > m_Notifications
Определения NotificationUI.c:8
void UpdateTargetHeight()
Определения NotificationUI.c:135
ref Widget m_NotificationContent
Определения NotificationUI.c:6
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.
proto native bool LoadImageFile(int num, string name, bool noCache=false)

Перекрестные ссылки WorkspaceWidget::CreateWidgets(), GetGame(), CGame::GetWorkspace(), m_NotificationContent, m_Notifications, NotificationRuntimeData() и UpdateTargetHeight().

Используется в NotificationUI() и ~NotificationUI().