DrawInventoryBar flags not working

Bugs that have been investigated and resolved somehow.

Moderator: GZDoom Developers

Forum rules
Please don't bump threads here if you have a problem - it will often be forgotten about if you do. Instead, make a new thread here.
Post Reply
Blue Shadow
Posts: 4949
Joined: Sun Nov 14, 2010 12:59 am

DrawInventoryBar flags not working

Post by Blue Shadow »

Tested with: 3.1.0 64-bit

Both of the DI_ALWAYSSHOWCOUNTERS and DI_DRAWCURSORFIRST flags, when passed to DrawInventoryBar, have no effect. The reason they don't work is because the flags variable that is being checked in the function is the incorrect variable.

Line 1061:

Code: Select all

if (j ^ !!(parms.flags & DI_DRAWCURSORFIRST)) 
Line 1076:

Code: Select all

if (parms.amountfont != null && (item.Amount > 1 || (parms.flags & DI_ALWAYSSHOWCOUNTERS))) 
The param.flags there should just be flags.

Here is a test file:
ditest.pk3
Load it up with Heretic (switch to the fullscreen HUD) and give yourself an artifact. You'll notice, even though the flags are being passed, the select box is drawn over the item, and the counter is not shown.

Image
Last edited by Blue Shadow on Thu Jun 08, 2017 8:55 am, edited 1 time in total.
Reason: Added a demo file and a screenshot.
_mental_
 
 
Posts: 3812
Joined: Sun Aug 07, 2011 4:32 am

Re: DrawInventoryBar flags not working

Post by _mental_ »

Fixed in 9b446e4.
Post Reply

Return to “Closed Bugs [GZDoom]”