[SBARINFO] Inventory spacing

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 a reply

Smilies
:D :) :( :o :shock: :? 8-) :lol: :x :P :oops: :cry: :evil: :twisted: :roll: :wink: :geek: :ugeek: :!: :?: :idea: :arrow: :| :mrgreen: :3: :wub: >:( :blergh:
View more smilies

BBCode is OFF
Smilies are ON

Topic review
   

Expand view Topic review: [SBARINFO] Inventory spacing

Re: [SBARINFO] Inventory spacing

by AFADoomer » Sat Aug 09, 2008 9:58 am

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

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

Re: [SBARINFO] Inventory spacing

by Nash » Sat Aug 09, 2008 1:55 am

Thanks for your help. Wow that screenshot is very helpful. Thanks...

Re: [SBARINFO] Inventory spacing

by Blzut3 » Thu Aug 07, 2008 2:13 pm

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).

Re: [SBARINFO] Inventory spacing

by Nash » Thu Aug 07, 2008 2:02 pm

How do I use the new fullscreen offsets feature? I don't get it at all.

Re: [SBARINFO] Inventory spacing

by Setzer » Thu Aug 07, 2008 12:15 am

Ah, much obliged, good sir! A speedy response and a wondrous result. My status bar runs like clockwork now.

Re: [SBARINFO] Inventory spacing

by Blzut3 » Tue Aug 05, 2008 9:26 pm

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.

Re: [SBARINFO] Inventory spacing

by Nash » Tue Aug 05, 2008 9:03 pm

Wow, that's awesome! Good job!

Re: [SBARINFO] Inventory spacing

by Blzut3 » Tue Aug 05, 2008 8:52 pm

Not only that but you can force scaling on them too.

Re: [SBARINFO] Inventory spacing

by Nash » Tue Aug 05, 2008 8:42 pm

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

Re: [SBARINFO] Inventory spacing

by Blzut3 » Tue Aug 05, 2008 6:50 pm

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.

Re: [SBARINFO] Inventory spacing

by Blzut3 » Tue Aug 05, 2008 1:19 pm

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.

Re: [SBARINFO] Inventory spacing

by Setzer » Tue Aug 05, 2008 6:56 am

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.

Re: [SBARINFO] Inventory spacing

by Blzut3 » Tue Aug 05, 2008 1:58 am

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.

[SBARINFO] Inventory spacing

by Setzer » Tue Aug 05, 2008 12:42 am

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!

Top