[SBARINFO] Inventory spacing
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.
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.
[SBARINFO] Inventory spacing
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!
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!
-
-
- Posts: 3211
- Joined: Wed Nov 24, 2004 12:59 pm
- Graphics Processor: ATI/AMD with Vulkan/Metal Support
- Contact:
Re: [SBARINFO] Inventory spacing
I think I can make it scale to the width of ARTIBOX/SELECTBO without any problems.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.
This is a known bug. It will get fixed at some point since one of my own mods has this problem.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.
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).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?
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);
}
Re: [SBARINFO] Inventory spacing
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.
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.
-
-
- Posts: 3211
- Joined: Wed Nov 24, 2004 12:59 pm
- Graphics Processor: ATI/AMD with Vulkan/Metal Support
- Contact:
Re: [SBARINFO] Inventory spacing
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.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.
-
-
- Posts: 3211
- Joined: Wed Nov 24, 2004 12:59 pm
- Graphics Processor: ATI/AMD with Vulkan/Metal Support
- Contact:
Re: [SBARINFO] Inventory spacing
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.
Edit: Apothem gave me the required information. I have fixed everything in this thread.
Re: [SBARINFO] Inventory spacing
So height 0 is possible now?Blzut3 wrote:Edit: Apothem gave me the required information. I have fixed everything in this thread.
<3<3<3
-
-
- Posts: 3211
- Joined: Wed Nov 24, 2004 12:59 pm
- Graphics Processor: ATI/AMD with Vulkan/Metal Support
- Contact:
Re: [SBARINFO] Inventory spacing
Not only that but you can force scaling on them too.
Re: [SBARINFO] Inventory spacing
Wow, that's awesome! Good job!
-
-
- Posts: 3211
- Joined: Wed Nov 24, 2004 12:59 pm
- Graphics Processor: ATI/AMD with Vulkan/Metal Support
- Contact:
Re: [SBARINFO] Inventory spacing
I suppose I should make an updated patch.
In addition the patch also contains changes from the previously un-applied 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.
Code: Select all
- Added: keyslot to drawswitchableimage.
- Fixed: The transition effects for the log and keys popups were switched.
Re: [SBARINFO] Inventory spacing
Ah, much obliged, good sir! A speedy response and a wondrous result. My status bar runs like clockwork now.
Re: [SBARINFO] Inventory spacing
How do I use the new fullscreen offsets feature? I don't get it at all.
-
-
- Posts: 3211
- Joined: Wed Nov 24, 2004 12:59 pm
- Graphics Processor: ATI/AMD with Vulkan/Metal Support
- Contact:
Re: [SBARINFO] Inventory spacing
Code: Select all
statusbar normal, fullscreenoffsets
{
//code
}
Note: In low resolutions those boxes can overlap or even become one box (320x200).
Re: [SBARINFO] Inventory spacing
Thanks for your help. Wow that screenshot is very helpful. Thanks...
Re: [SBARINFO] Inventory spacing
I updated the wiki with some further clarification and an example bar using the coordinate system...
http://zdoom.org/wiki/SBARINFO#Examples
http://zdoom.org/wiki/SBARINFO#Examples