[SBARINFO] Inventory spacing

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
User avatar
Setzer
Posts: 124
Joined: Mon Mar 13, 2006 11:12 pm
Location: nowhereville

[SBARINFO] Inventory spacing

Post by Setzer »

I'm loving this whole custom status bar concept. It's fun as Hades to fill the screen with enough data to make even Microsoft have a heart attack. Even thus, I see the system's not perfect just yet for my own nefarious tastes.

I am currently busying myself with adding an inventory bar to the main status bar itself. The problem is, there is no way at all to change the size of the boxes themselves, which could easily spell doom for this little project.

Horrible pun aside, could a quick addition to DrawInventoryBar, something like "boxlength", be doable? Or at the very least, could it base its measurements on the size of the ARTIBOX graphic? Changing the graphic's size doesn't do much of anything and it only makes sense to widen or shorten the bar if the graphic's dimensions are wildly different from the default.


A 2nd request:

The default method of using an inventory item is ideal under normal circumstances: the first click of the INVUSE button dismisses the overlay inventory bar and the second INVUSE actually activates the item. The problem is, if the inventory bar is part of the main status bar itself (ie always shown), this behavior makes no sense, as the player must click the INVUSE button twice to achieve any result. In these circumstances, it would make much more sense if the user only has to hit INVUSE once.

In remedy, a "singleclick" top-level SBARINFO command would do the trick. ...Please?


And one final thing:

It seems that setting "Height 0" does not work at all, and with "Height 1" I have a neat row of HOM on the bottom of my screen. Any chance this could be fixed?


I apologize for the mass requests on my part. Blzut3, you're doing a fine job and I appreciate your donation and maintenance of this engine aspect. Keep it up!
Blzut3
 
 
Posts: 3211
Joined: Wed Nov 24, 2004 12:59 pm
Graphics Processor: ATI/AMD with Vulkan/Metal Support
Contact:

Re: [SBARINFO] Inventory spacing

Post by Blzut3 »

Setzer wrote:Horrible pun aside, could a quick addition to DrawInventoryBar, something like "boxlength", be doable? Or at the very least, could it base its measurements on the size of the ARTIBOX graphic? Changing the graphic's size doesn't do much of anything and it only makes sense to widen or shorten the bar if the graphic's dimensions are wildly different from the default.
I think I can make it scale to the width of ARTIBOX/SELECTBO without any problems.
Setzer wrote:The default method of using an inventory item is ideal under normal circumstances: the first click of the INVUSE button dismisses the overlay inventory bar and the second INVUSE actually activates the item. The problem is, if the inventory bar is part of the main status bar itself (ie always shown), this behavior makes no sense, as the player must click the INVUSE button twice to achieve any result. In these circumstances, it would make much more sense if the user only has to hit INVUSE once.
This is a known bug. It will get fixed at some point since one of my own mods has this problem.
Setzer wrote:It seems that setting "Height 0" does not work at all, and with "Height 1" I have a neat row of HOM on the bottom of my screen. Any chance this could be fixed?
Again known bug. And since this is about the 100th time its been pointed out I decided to take a look and find the problem. The bug has nothing to do with SBarInfo. ZDoom just makes the assumption that if the viewable region of the screen is the same as your screen height it will only show the full screen hud or nothing at all. Here's an except that seems to be the problem (d_main.cpp).

Code: Select all

			if (automapactive)
			{
				int saved_ST_Y=ST_Y;
				if (hud_althud && realviewheight == SCREENHEIGHT) ST_Y=realviewheight;
				AM_Drawer ();
				ST_Y = saved_ST_Y;
			}
			if (!automapactive || viewactive)
			{
				R_RefreshViewBorder ();
			}

			if (hud_althud && realviewheight == SCREENHEIGHT)
			{
				if (DrawFSHUD || automapactive) DrawHUD();
				StatusBar->DrawTopStuff (HUD_None);
			}
			else 
			if (realviewheight == SCREENHEIGHT && viewactive)
			{
				StatusBar->Draw (DrawFSHUD ? HUD_Fullscreen : HUD_None);
				StatusBar->DrawTopStuff (DrawFSHUD ? HUD_Fullscreen : HUD_None);
			}
			else
			{
				StatusBar->Draw (HUD_StatusBar);
				StatusBar->DrawTopStuff (HUD_StatusBar);
			}
"realviewheight == SCREENHEIGHT" is not a reliable way of determining if the full screen hud is active.
User avatar
Setzer
Posts: 124
Joined: Mon Mar 13, 2006 11:12 pm
Location: nowhereville

Re: [SBARINFO] Inventory spacing

Post by Setzer »

Ah, thank you for the speedy reply. If only all companies cared as much for their customers. (*tech support grumble*)

Though first off, this was meant to be posted under suggestions, not bugs. I'm terribly sorry for that, though I guess it works regardless.


#1 - Ah, nice. Though, I must ask: which one are you going to scale it to? I currently have SELECTBO one pixel wider than ARTIBOX, which is the only desired method of achieving a slight 'overlap' effect I need. Since SELECTBO is just an overlay anyhow, should it go by just ARTIBOX's width? Eh, I ramble now.

#2 - Good to hear, too. I was wondering if I was alone on this issue.

#3 - Ah, I'm sorry. I didn't realize this has been pointed out so many times before. I guess that's what I get for disappearing for months + years at a time. Strange about the assumption though, and thanks for the look.
Blzut3
 
 
Posts: 3211
Joined: Wed Nov 24, 2004 12:59 pm
Graphics Processor: ATI/AMD with Vulkan/Metal Support
Contact:

Re: [SBARINFO] Inventory spacing

Post by Blzut3 »

Setzer wrote:#1 - Ah, nice. Though, I must ask: which one are you going to scale it to? I currently have SELECTBO one pixel wider than ARTIBOX, which is the only desired method of achieving a slight 'overlap' effect I need. Since SELECTBO is just an overlay anyhow, should it go by just ARTIBOX's width? Eh, I ramble now.
Whoops, I meant SELECTBO and INVCURS. ARTIBOX is not a good image to use as a reference as I know at least one mod removes it. Though it wouldn't be a problem to have an empty graphic for spacing reasons.
Blzut3
 
 
Posts: 3211
Joined: Wed Nov 24, 2004 12:59 pm
Graphics Processor: ATI/AMD with Vulkan/Metal Support
Contact:

Re: [SBARINFO] Inventory spacing

Post by Blzut3 »

Could someone go through the strife iwad and tell me if there is an ARTIBOX graphic (and what its dimensions are)? If not can I have the dimensions of the cursor?

Edit: Apothem gave me the required information. I have fixed everything in this thread.
User avatar
Nash
 
 
Posts: 17501
Joined: Mon Oct 27, 2003 12:07 am
Location: Kuala Lumpur, Malaysia
Contact:

Re: [SBARINFO] Inventory spacing

Post by Nash »

Blzut3 wrote:Edit: Apothem gave me the required information. I have fixed everything in this thread.
So height 0 is possible now?

<3<3<3
Blzut3
 
 
Posts: 3211
Joined: Wed Nov 24, 2004 12:59 pm
Graphics Processor: ATI/AMD with Vulkan/Metal Support
Contact:

Re: [SBARINFO] Inventory spacing

Post by Blzut3 »

Not only that but you can force scaling on them too.
User avatar
Nash
 
 
Posts: 17501
Joined: Mon Oct 27, 2003 12:07 am
Location: Kuala Lumpur, Malaysia
Contact:

Re: [SBARINFO] Inventory spacing

Post by Nash »

Wow, that's awesome! Good job!
Blzut3
 
 
Posts: 3211
Joined: Wed Nov 24, 2004 12:59 pm
Graphics Processor: ATI/AMD with Vulkan/Metal Support
Contact:

Re: [SBARINFO] Inventory spacing

Post by Blzut3 »

I suppose I should make an updated patch.

Code: Select all

- Added: fullscreenoffsets flag for status bars.  This changes the coordinate
  system to be relative to the top left corner of the screen.  This is useful 
  for full screen status bars.
- Changed: drawinventorybar will use the width of artibox or invcurs (strife)
  to determine the spacing.  Let me know if this breaks any released mods.
- Fixed: If a status bar height of 0 was specified in SBarInfo the wrong bar 
  would be shown.
- Fixed: If a static inventory bar was used the user still had to press invuse 
  in order to get rid of the "overlay".
- Fixed: forcescaled would not work if the height of the bar was 0.
In addition the patch also contains changes from the previously un-applied patch.

Code: Select all

- Added: keyslot to drawswitchableimage.
- Fixed: The transition effects for the log and keys popups were switched.
User avatar
Setzer
Posts: 124
Joined: Mon Mar 13, 2006 11:12 pm
Location: nowhereville

Re: [SBARINFO] Inventory spacing

Post by Setzer »

Ah, much obliged, good sir! A speedy response and a wondrous result. My status bar runs like clockwork now.
User avatar
Nash
 
 
Posts: 17501
Joined: Mon Oct 27, 2003 12:07 am
Location: Kuala Lumpur, Malaysia
Contact:

Re: [SBARINFO] Inventory spacing

Post by Nash »

How do I use the new fullscreen offsets feature? I don't get it at all.
Blzut3
 
 
Posts: 3211
Joined: Wed Nov 24, 2004 12:59 pm
Graphics Processor: ATI/AMD with Vulkan/Metal Support
Contact:

Re: [SBARINFO] Inventory spacing

Post by Blzut3 »

Code: Select all

statusbar normal, fullscreenoffsets
{
    //code
}
If you don't understand the coordinate system then here is a visual representation: http://blzut3.maniacsvault.net/sbarinfo_sheet.png
Note: In low resolutions those boxes can overlap or even become one box (320x200).
User avatar
Nash
 
 
Posts: 17501
Joined: Mon Oct 27, 2003 12:07 am
Location: Kuala Lumpur, Malaysia
Contact:

Re: [SBARINFO] Inventory spacing

Post by Nash »

Thanks for your help. Wow that screenshot is very helpful. Thanks...
User avatar
AFADoomer
Posts: 1344
Joined: Tue Jul 15, 2003 4:18 pm
Contact:

Re: [SBARINFO] Inventory spacing

Post by AFADoomer »

I updated the wiki with some further clarification and an example bar using the coordinate system...

http://zdoom.org/wiki/SBARINFO#Examples
Post Reply

Return to “Closed Bugs [GZDoom]”