Add UIGlobals struct
This PR adds the UIGlobals struct, which serves as a central place for storing global static functions from the Client::UI namespace.
Some of these global functions were added to other structs in the past, which is why they have been moved to UIGlobals:
-
GameMain.IsInSanctuary, moved asCanApplyGlamourPlates(see also: #1123) -
UIModule.PlaySound, moved asPlaySoundEffect -
UIModule.IsPlayerCharacterName, moved asIsValidPlayerCharacterName -
UIModule.PlayChatSoundEffect
The entries in the data.yml have also been renamed accordingly, though I did not add the namespace prefix if it was missing.
I've also added the IsExportedGatheringPointTimed function (formerly named IsGatheringTypeRare by me in the data.yml) to this struct (because I need it myself), and tried to add some xmldocs to these functions.
While I did not dig into the PlaySoundEffect function, which is why I didn't add a comment there, I changed the unknown argument types from long to nint, because from what I could see both are pointers: a2 is an out parameter for a string and a3 is an out parameter for some kind of instance of a sound effect struct. 🤷♂️
Since this is a new struct and the old functions have been obsoleted, there are no breaking changes in this PR. Please let me know if I did something wrong.