Closed Onidotmoe closed 5 years ago
Wouldn't a UIPersonnelSortFinished
event be simpler?
Wouldn't a
UIPersonnelSortFinished
event be simpler? I think the above fits better in with how the rest of the game is coded and doesn't add more to the listening system.
This has been done at #591 This pull request should just be deleted it adds too much confusion, sorry about that.
When the UIPersonnel is done sorting a delegate should be called, this is to allow easier access to disable rows that i don't want enabled, changing m_arrSoldiers does nothing as it gets ignored on the next sort.
Would do this myself but the game crashes when i try to do anything with my own modded Highlander.
Anyhow, there should be no issue with this once implement.
Here's the code that needs changing(in UIPersonnel.uc) :
To :
Do note that the new delegate has to be after all the "var" values
Change this :
To this :
Adding our callback last to notify any outside function when the player has sorted the list.
Adding this to the base UIPersonnel instead of making a new one would ensure players can still use their own modded UIPersonnel without any issues.