52 ImageWidget icon = ImageWidget.Cast( notification.FindAnyWidget(
"Image" ) );
55 if ( data.GetIcon() !=
"" )
56 icon.LoadImageFile( 0, data.GetIcon() );
57 title.SetText( data.GetTitleText() );
59 if ( data.GetDetailText() !=
"" )
61 Widget bottom_spacer = notification.FindAnyWidget(
"BottomSpacer" );
63 bottom_spacer.Show(
true);
64 detail.SetText( data.GetDetailText() );
66 bottom_spacer.Update();
67 notification.Update();
98 notification.SetAlpha( 120 / 255 );
99 Widget w_c = notification.FindAnyWidget(
"Name" );
153 Widget expNotification = menu.GetLayoutRoot().FindAnyWidget(
"notification_root");
154 if (expNotification && expNotification.IsVisible())
162 expNotification.GetScreenSize(w, h);
202 w.SetAlpha( new_alpha );
203 Widget w_c = w.FindAnyWidget(
"TopSpacer" );
204 Widget w_c2 = w.FindAnyWidget(
"BottomSpacer" );
205 Widget w_c3 = w.FindAnyWidget(
"Title" );
206 Widget w_c4 = w.FindAnyWidget(
"Detail" );
207 Widget w_c5 = w.FindAnyWidget(
"Name" );
211 w_c.SetAlpha( new_alpha_cont );
212 w_c2.SetAlpha( new_alpha_cont );
213 w_c3.SetAlpha( new_alpha_cont );
214 w_c4.SetAlpha( new_alpha_cont );
219 w_c5.SetAlpha(new_alpha_voice);
static const float NOTIFICATION_FADE_TIME
void NotificationRuntimeData(float time, NotificationData data, string detail_text)
proto native WorkspaceWidget GetWorkspace()
ref ScriptInvoker m_OnNotificationAdded
static NotificationSystem GetInstance()
ref ScriptInvoker m_OnNotificationRemoved
protected ref map< NotificationRuntimeData, Widget > m_Notifications
void Update(float timeslice)
void AddVoiceNotification(string player, string name)
protected float m_TargetHeight
protected float m_CurrentHeight
void RemoveVoiceNotification(string player)
void UpdateTargetHeight()
protected float m_BackupPosX
protected ref Widget m_Root
protected ref Widget m_NotificationContent
protected bool m_OffsetEnabled
void RemoveNotification(NotificationRuntimeData data)
protected ref Widget m_VoiceContent
protected ref map< string, Widget > m_VoiceNotifications
void AddNotification(NotificationRuntimeData data)
protected ref Widget m_Spacer
protected float m_BackupPosY
void ClearVoiceNotifications()
protected ref map< string, Widget > m_WidgetTimers
proto bool Remove(func fn, int flags=EScriptInvokerRemoveFlags.ALL)
remove specific call from list
proto bool Insert(func fn, int flags=EScriptInvokerInsertFlags.IMMEDIATE)
insert method to list
proto native CGame GetGame()
static proto float Clamp(float value, float min, float max)
Clamps 'value' to 'min' if it is lower than 'min', or to 'max' if it is higher than 'max'.
static proto float SmoothCD(float val, float target, inout float velocity[], float smoothTime, float maxVelocity, float dt)
Does the CD smoothing function - easy in | easy out / S shaped smoothing.