Skip to content

Commit

Permalink
Optional icon support for server-side RUI announcements.
Browse files Browse the repository at this point in the history
  • Loading branch information
Gazyi committed Sep 14, 2024
1 parent fd16d8c commit df7ac20
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion Northstar.Custom/mod/scripts/vscripts/sh_message_utils.gnut
Original file line number Diff line number Diff line change
Expand Up @@ -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 )
}
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit df7ac20

Please sign in to comment.