Thanks! It also supports turrets, paint sprayers, and rotating portalguns at the moment. The best part is that the icons are generated dynamically when the map loads: just drop the test element instances in and they'll be added to the UI.
CamBen wrote:
Agreed. I have a vague idea of how you did it, is this correct?
Close, but not quite. I'm using a script instead of a math_counter, and the rotation is managed by a func_rotating (which is carefully kept to the proper positions by the script). The icons are little brushes with a custom selfillum texture (I took a model-viewer screenshot, then used Photoshop: convert to black and white, glowing edges, minimize brightness, maximize contrast, then delete the red and blue channels and copy the green channel to alpha 1). When the script adds an icon it spins the ring to the proper position, spawns the template in front of the viewcontrol, parents it, then spins the ring back to 0.
Incidentially, in the course of making this I discovered that you can have multiple game_uis active at once. I built a mutex to prevent this, which is what causes the slight stutter when you "zoom out": one viewcontrol is deactivated before the other is activated, so you see out of the player's eyes for a moment.
EDIT2: That stutter is actually invisible in the video due to the heavy lag when recording. I hadn't noticed that.
EDIT: Also, the effect when you're looking through a camera is a carefully-placed func_brush in front of a viewcontrol with limited FOV. The texture uses the Modulate shader to change the colors the player sees rather than blocking their view. Bonus points if you can tell where I got the texture from.