|
static void | InitInstance () |
|
static void | CleanupInstance () |
|
static NotificationSystem | GetInstance () |
|
static void | SendNotificationToPlayerExtended (Man player, float show_time, string title_text, string detail_text="", string icon="") |
| Send custom notification to player from server.
|
|
static void | SendNotificationToPlayerIdentityExtended (PlayerIdentity player, float show_time, string title_text, string detail_text="", string icon="") |
| Send custom notification to player identity from server.
|
|
static void | SendNotificationToPlayer (Man player, NotificationType type, float show_time, string detail_text="") |
| Send notification from default types to player from server.
|
|
static void | SendNotificationToPlayerIdentity (PlayerIdentity player, NotificationType type, float show_time, string detail_text="") |
| Send notification from default types to player identity from server.
|
|
static void | AddNotification (NotificationType type, float show_time, string detail_text="") |
| Send notification from default types to local player.
|
|
static void | AddNotificationExtended (float show_time, string title_text, string detail_text="", string icon="") |
| Send custom notification from to local player.
|
|
static void | Update (float timeslice) |
|
static void | LoadNotificationData () |
|
◆ NotificationSystem()
◆ AddNotification()
Send notification from default types to local player.
- Parameters
-
type | the type of notification to send - these can be viewed in /Scripts/Data/Notifications.json |
show_time | amount of time this notification is displayed |
detail_text | additional text that can be added to the notification under the title - will not display additional text if not set |
References GetNotificationData(), ScriptInvoker::Invoke(), m_DeferredArray, m_Instance, m_OnNotificationAdded, m_TimeArray, MAX_NOTIFICATIONS, and NotificationRuntimeData().
Referenced by CGame::DisconnectSessionEx(), OnlineServices::OnFriendsAsync(), BiosSessionService::OnGetGameplaySession(), CGame::OnRPC(), and BiosUserManager::SelectUserEx().
◆ AddNotificationExtended()
static void AddNotificationExtended |
( |
float |
show_time, |
|
|
string |
title_text, |
|
|
string |
detail_text = "" , |
|
|
string |
icon = "" |
|
) |
| |
|
inlinestaticprivate |
◆ CleanupInstance()
static void CleanupInstance |
( |
| ) |
|
|
inlinestaticprivate |
◆ GetInstance()
◆ GetNotificationData()
◆ InitInstance()
static void InitInstance |
( |
| ) |
|
|
inlinestaticprivate |
◆ LoadNotificationData()
static void LoadNotificationData |
( |
| ) |
|
|
inlinestaticprivate |
◆ SendNotificationToPlayer()
Send notification from default types to player from server.
- Parameters
-
player | the target player to send notification to |
type | the type of notification to send - these can be viewed in /Scripts/Data/Notifications.json |
show_time | amount of time this notification is displayed |
detail_text | additional text that can be added to the notification under the title - will not display additional text if not set |
References SendNotificationToPlayerIdentity().
◆ SendNotificationToPlayerExtended()
static void SendNotificationToPlayerExtended |
( |
Man |
player, |
|
|
float |
show_time, |
|
|
string |
title_text, |
|
|
string |
detail_text = "" , |
|
|
string |
icon = "" |
|
) |
| |
|
inlinestaticprivate |
Send custom notification to player from server.
- Parameters
-
player | the target player to send notification to |
show_time | amount of time this notification is displayed |
title_text | the title text that is displayed in the notification |
detail_text | additional text that can be added to the notification under the title - will not display additional text if not set |
icon | the icon that is displayed in the notification - will use default icon if not set |
References SendNotificationToPlayerIdentityExtended().
◆ SendNotificationToPlayerIdentity()
Send notification from default types to player identity from server.
- Parameters
-
player | the target player to send notification to - if null, will send to all players |
type | the type of notification to send - these can be viewed in /Scripts/Data/Notifications.json |
show_time | amount of time this notification is displayed |
detail_text | additional text that can be added to the notification under the title - will not display additional text if not set |
References ScriptRPC::Send(), and Serializer::Write().
Referenced by SendNotificationToPlayer().
◆ SendNotificationToPlayerIdentityExtended()
Send custom notification to player identity from server.
- Parameters
-
player | the target player to send notification to - if null, will send to all players |
show_time | amount of time this notification is displayed |
title_text | the title text that is displayed in the notification |
detail_text | additional text that can be added to the notification under the title - will not display additional text if not set |
icon | the icon that is displayed in the notification - will use default icon if not set |
References ScriptRPC::Send(), and Serializer::Write().
Referenced by SendNotificationToPlayerExtended().
◆ Update()
static void Update |
( |
float |
timeslice | ) |
|
|
inlinestaticprivate |
◆ DEFAULT_TIME_DISPLAYED
const int DEFAULT_TIME_DISPLAYED = 10 |
|
private |
◆ JSON_FILE_PATH
protected const string JSON_FILE_PATH = "scripts/data/notifications.json" |
|
staticprivate |
◆ m_DataArray
◆ m_DeferredArray
◆ m_Instance
◆ m_OnNotificationAdded
◆ m_OnNotificationRemoved
◆ m_TimeArray
◆ m_TimeElapsed
protected float m_TimeElapsed |
|
private |
◆ MAX_NOTIFICATIONS
protected const int MAX_NOTIFICATIONS = 5 |
|
staticprivate |
◆ NOTIFICATION_FADE_TIME
const float NOTIFICATION_FADE_TIME = 3.0 |
|
private |
◆ UPDATE_INTERVAL_THRESHOLD
private const float UPDATE_INTERVAL_THRESHOLD = 1.0 |
|
staticprivate |
The documentation for this class was generated from the following file: