diff options
author | Gazyi <Gazyi@users.noreply.github.com> | 2024-11-22 17:25:41 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-11-22 15:25:41 +0100 |
commit | c568cf23d590877f648d53297880060e6ca0f469 (patch) | |
tree | db04300db51136f1194ec418f649a47f44009dd2 /Northstar.Custom/mod/scripts | |
parent | 13211e9037d3c2d6bf5e0c1c2ff00fb9a7b3c36b (diff) | |
download | NorthstarMods-c568cf23d590877f648d53297880060e6ca0f469.tar.gz NorthstarMods-c568cf23d590877f648d53297880060e6ca0f469.zip |
Optional icons for server-side RUI announcements (#883)
Adds optional icon support for server-side RUI announcements.
Diffstat (limited to 'Northstar.Custom/mod/scripts')
-rw-r--r-- | Northstar.Custom/mod/scripts/vscripts/sh_message_utils.gnut | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/Northstar.Custom/mod/scripts/vscripts/sh_message_utils.gnut b/Northstar.Custom/mod/scripts/vscripts/sh_message_utils.gnut index 4cfdc6fb..6bc1718a 100644 --- a/Northstar.Custom/mod/scripts/vscripts/sh_message_utils.gnut +++ b/Northstar.Custom/mod/scripts/vscripts/sh_message_utils.gnut @@ -185,13 +185,14 @@ void function NSSendPopUpMessageToPlayer( entity player, string text ) ServerToClientStringCommand( player, "ServerHUDMessageShow " + eMessageType.POPUP ) } -void function NSSendAnnouncementMessageToPlayer( entity player, string title, string description, vector color, int priority, int style ) +void function NSSendAnnouncementMessageToPlayer( entity player, string title, string description, vector color, int priority, int style, string image = "" ) { ServerToClientStringCommand( player, "ServerHUDMessagePut " + eDataType.TITLE + " " + title ) ServerToClientStringCommand( player, "ServerHUDMessagePut " + eDataType.DESC + " " + description ) ServerToClientStringCommand( player, "ServerHUDMessagePut " + eDataType.COLOR + " " + color.x + " " + color.y + " " + color.z ) ServerToClientStringCommand( player, "ServerHUDMessagePut " + eDataType.PRIORITY + " " + priority ) ServerToClientStringCommand( player, "ServerHUDMessagePut " + eDataType.STYLE + " " + style ) + ServerToClientStringCommand( player, "ServerHUDMessagePut " + eDataType.ASSET + " " + image ) ServerToClientStringCommand( player, "ServerHUDMessageShow " + eMessageType.ANNOUNCEMENT ) } @@ -453,6 +454,7 @@ void function AnnouncementMessageHandler_Threaded() Announcement_SetPriority( announcement, client.announcementQueue[0].priority ) Announcement_SetSoundAlias( announcement, SFX_HUD_ANNOUNCE_QUICK ) Announcement_SetStyle( announcement, client.announcementQueue[0].style ) + Announcement_SetIcon( announcement, StringToAsset( strip( client.announcementQueue[0].image ) ) ) AnnouncementFromClass( GetLocalViewPlayer(), announcement ) wait 5 |