-
Notifications
You must be signed in to change notification settings - Fork 7
Buttonsets hook
The available functions should already provide good help.
updateButtonSetEx() handle the group selections and individual selections.
updateButtonSet_Sub458D50() would allow, with changes, to get the light on a button that doesn't correspond to the order it gives, while performing this order.
updateButtonSet() handle special buttonsets, and will call updateButtonSetEx() when facing a selection of several units out of a replay.
updateCurrentButtonset() was the main function, not the most readable, but may still be useful.
getButtonSet() replace the use of the buttonSetTable wherever it appear in StarCraft code to allow to use a custom buttonSet (just use conditions and a different index, or go for a more custom approach returning the result of a modded getCustomButtonSet() function (provided for the example)
Issues remaining:
-functions involved in display of icons and text are not planned anytime soon (they get their data and coordinates from weird places making the assembly hard to understand).
-it would be more convenient if a buttonset could be created directly from the 2nd tab of Firegraft without being assigned to an unit in the 1st tab, but it's not that simple (dynamic array of array of buttons, cause the stuff to not be accessible in a reliable way).
-Unlike Firegraft, the Requirements and Actions for a button are directly linked to a function. I plan to study CMDACT functions eventually. Maybe having at least enough to know how to create original functions would be good, but the problem is to know if it would indeed work (I can't test my mods in online play, should work until now if everybody got the same version, but some yet untouched stuffs may need to transmit specific data to not cause desync, and this could be something like that)
-my wiki writing skill suck.