ID:1016747
 
Keywords: hud, mouse_opacity

Poll: What kind of HUD should I use?

Solid: Hovering displays numbers, can't be clicked on to attack 37% (3)
Non-solid: Ignores mouse completely, numbers can be toggled 62% (5)

Login to vote.

So I was recently reminded of the handy mouse_opacity var which can be used to make things like overlays or screen images 'invisible' to the mouse pointer.

Now I have a decision to make. I have a HUD with graphical representations for things like health/armor and such. There are no numbers on screen, but I made it so that hovering the mouse over the HUD elements will display their exact value/max value.

Unfortunately, this also gets in the way of other mouse operations. While you click on the map to attack, clicking on the HUD does nothing.

I could write code to allow the hovering-numbers as well as clicking to attack, but I really don't want to have all these different mouse procs flying around :D

So I'm polling you guys to see which you would prefer. I could turn it into a "solid" hud bar, by giving it a background, so that it's obvious to the player that clicking on it does not mean clicking on the map. I would then keep the hovering numbers thing. Alternatively, I could keep it as it is now, just the elements with no background. I would set mouse_opacity = 0 for all HUD elements, and allow the player to toggle between different displays (probably graphics, graphics+text, or just text)

What say you?

Assuming the bars don't take up a whole tile, if their mouse_opacity is set to 1 then they should be able to click on a mob that is partially covered by the bars without any problems.

If the bars do take up a whole tile you could consider moving them off screen a tile, still allowing mouseover functionality without interfering with combat.

Additionally, you could add an alternate means of toggling the text display, and put the bars anywhere.


Anyway, for me personally: I avoid the use of any nonstandard mouse procs, i.e: anything that warns of increased network usage. This is just a personal design choice because I feel that any interaction I could accomplish with a mouseover event I could handle another way as well, and I always try to program with as little overhead as reasonably possible.
Hm...thanks for the input.

The hud elements are actually 64x64, while the icon size is 16. The player icon is 32x32. I may have to show some screenshots but that will have to wait as I'm not going to be on my own computer for a while.

I am using MouseDown, MouseUp, and MouseDrag. This is so the player can click and hold to fire their weapon, and drag it around to change the aim. I know that just using Click() would be the least resource intensive but it just wouldn't work for the type of game I'm trying to create.
In response to Magicsofa
Magicsofa wrote:
I am using MouseDown, MouseUp, and MouseDrag. This is so the player can click and hold to fire their weapon, and drag it around to change the aim. I know that just using Click() would be the least resource intensive but it just wouldn't work for the type of game I'm trying to create.

Right, but that is different than the discussion about displaying text on mouseover.

For me the bar text wouldn't be worthwhile enough to go against my "I avoid this type of programming behavior" rule. But programming a necessary core game mechanic, that would slide by.
Ah yes, I misunderstood :D