@MCR: Actually this is the very text I copy pasted from, and replaced with my own variable names.
So, I slowed down a bit, and tried the exact example with the insides of listener confunc replaced with echo, no error message but nothing was echoed.
The game says the update is from Dec 30 and the cvarlistener should be earlier, so I don't have many ideas at the moment.
BTW in the wiki there is such thing as spec about unimplemented but planned cvarfunc that should have done the same thing.
You were right about this thing taking more time than it looked like, I guess I'll get to the cvarlistener thing (or else a workaround) after some time.
At the moment I am doing weapon hands for the n-th time.
With moving panel visual that indicates scroll position: cannot set 'left' as float.
With double bar: the bars updating asynchronously looks wobbly.
With scrollable viewpos like in phone HUD: wheel-scrolling does not update mouse-over unless the mouse is moved (common case is the opposite), and the click seems to happen at the item that had the last mouse-over.
With one node that gets updated from invisible firemode data nodes with one bar as the visual: the scrolling seemed hard to control and the bar hard to read behind the text.
And even a little bit with vscrollbar: such a short scrollbar has the minimum bar size too long to be of any use.
(lots of drama)
And now I finally think I have a good version (people like images, i guess, so i'll post a little image).
A panel with firemodes is shown when the mouse enters the weapon area, and disappears when the mouse leaves the (weapon area + the panel with firemodes).
Could also be used to trigger the classic firemode selection without the extra click, I guess.
I wonder if I should make the firemode selection wheel-scrollable at all, because move-and-click seems more comfy than scroll-and-click.