Looks and sounds good so far.
A couple of thoughts.
If you are appropriating code from UI-Party, make sure that the cycle bug isn't present. This bug caused hotkeys which cycled through selections (e.g. factories or templates) to reset periodically (on some tick count) to the first in the selection. One example that happened frequently was cycling through intel structures (from radar to select sonar), only for UI-Party to reset me back to T3 radar when I was trying to build sonar.
Instead of left clicking to unpause, can you change it to right click? My logic is that right clicking can toggle paused/unpaused, while left click selects all things in that expenditure category (useful for manually implementing a partial reduction of expenditures).
Also, why did you decide on green/pink bars for eco, not the traditional green/yellow? You could also use the colour wheel to invert colours for paused vs unpaused eco representation. E.g. Green (mass) and yellow (energy) for current expenditure, then red (mass) and blue (energy) for paused expenditure. You could honestly just make colour customisation another setting (so many settings :/) by taking some code from 4z0t's ScoreBoard. Their UI mod probably has all the code you'd need for that.
Your idea of integrating eco managing via thresholds and profiles is inspired! Usually eco UI programs are full automation, or full manual. The hybrid approach should really help with getting a balance between the two while maintaining user control and preference.
In a similar vein, could you add a feature (e.g. clicking mouse scroll wheel) to set a category (or any project really) as maximum priority. The mod will then pause everything else (with some selective logic of what to pause first) so that you don't stall on what you must complete ASAP.
The auto activate function seems amazing! I understand why cybran ASF's have it off by default, but it makes no sense if you are overflowing. Same for seraphim selens.
As for how to represent all this functionality on the UI, you seem to be on a good path. The idea to keep a display of how much a paused category would consume if turned back on is a really nice touch.
For things like profiles and settings you can shove most of them under the hood into the wrench icon (top left of your image). Stuff I'd put here include:
- TML missile storage limit.
- Specific threshold for each category to control which units gets autopaused first.
- Profiles.
- Autopause mass thresholds.
- Ordering of prioritisation order. This can be it's own sub-menu where you click and drag icons into an order you like. Similar to kiddy coding programs with visual code blocks.
- Set autopause/prioritize only, or ignore some, specific units. Can be integrated into the above UI sub-menu as I binary "include/ignore" tickbox.
- Auto activate unit abilities. On/off setting. A more advanced version might have aa on/off setting for each unit.
For many things in the above list, you can use a similar UI layout to the Eco display itself. Or just appropriate code from 4z0t's mods as they have implemented submenus, sliders, drop down menus and tick boxes.
For things which will potentially need to be adjusted in-game on the fly, they need to have a designated keypress and/or UI element. An example of this already implemented would be the left/right click of the eco display to pause/unpause stuff.
These include:
- Expandable subcategories. This can be represented as a dropdown menu which automatically opens up when the mouse is hovered over the main category.
Those are my quick initial thoughts. Shove most out of sight, and only worry about what the player is likely to want to use differently every game.