-
Notifications
You must be signed in to change notification settings - Fork 118
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Optional icons for server-side RUI announcements #883
Conversation
@@ -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 ) ) ) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems weird that they are stored in the struct as a string and converted to asset here but eh, probably still the best way to do it
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code looks good, and feature works in game.
I could display images with the updated command; not passing the last parameter to it simply doesn't display any image.
Testing
Using the following command:
script NSSendAnnouncementMessageToPlayer(GetPlayerArray()[0], "FIRE", "I’M A’ FIRIN’ MAH LAZER!!", <1,0,1>, 1, 1, "rui/hud/scoreboard/status_dead")
Will add this to the next feature release. Just need push out a patch release first. So consider this essentially merged. I'll hopefully have some time tomorrow or something to figure out the strategy for the next few releases. |
PR adds optional icon support for server-side RUI announcements.