MrAlaux / Nugget-Doom

Nugget Doom is a fork of Woof! with additional features.
GNU General Public License v2.0
66 stars 3 forks source link

NUGHUD ArmorIcon drawn behind other patches #59

Closed liPillON closed 1 year ago

liPillON commented 1 year ago

The "nughud_armor" element is being drawn behind other "nughud_patchX" elements, regardless of the order in which they appear in the NUGHUD lump. This is inconsistent with how, let's say, the "nughud_armsX" works.

I'm attaching the current development version of my hud. Could you please have a look at it? Am I doing something wrong?

Thank you!

nughud_minimal-dev.zip

MrAlaux commented 1 year ago

NUGHUD elements are drawn in a fixed order, as determined by ST_drawWidgets(). Patches would always come first, followed by the rest of Status Bar elements, and finally HUD elements (think Time and Stats).

The new Armor icon is drawn before everything else simply because I didn't think much about it, but since Patches are static, I should definitely keep them first in line and draw the icon on top of them.

That said, does the icon need to have higher priority than any other element? Otherwise, I'll just make it be drawn right after Patches, meaning that every other element will be drawn on top of it.

liPillON commented 1 year ago

oh I didn't realize that there was an hardcoded arbitrary order

Maybe a general rule could be as follows (starting from background elements, ending with the foregeound ones)

  1. patches
  2. mugshot/frags/keys
  3. arms/armoricon/healthicon (wink)
  4. ammo/armor/health indicators
  5. ammo# and maxammo#
  6. text widgets

This of course is based purely on personal prefence.

We should probably bring this conversation to doomworld, to have more feedback from people interested in developinf custo huds.

MrAlaux commented 1 year ago

You see, that hardcoded widget order (except for the new Armor icon) isn't something I came up with; it's literally how the Status Bar is drawn.

Before NUGHUD was a thing, some people asked if I could make little tweaks to the Crispy HUD. I refused, and instead implemented NUGHUD so each user could do as they pleased, leaving a layout mostly identical to the Crispy HUD's as the default.

Same logic goes for this: I'm not going to force one specific drawing order for all users, I'd rather make it customizable. However, that's out of the question for now. I'm only going to change the Armor icon's priority.

liPillON commented 1 year ago

yeah sure that would do sorry I didn't mean to hijack this away from your design goals