Mugshot on fullscreen hud: SBARINFO?

Archive of the old editing forum
Forum rules
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. This forum is archived - please use this set of forums to ask new questions.

Mugshot on fullscreen hud: SBARINFO?

Postby phi108 » Thu Jan 17, 2008 11:21 pm

So the wiki SBARINFO page has code that recreates the original statusbar, but this feature can be used on the fullscreen hud, too, so what is the code that recreates the current classic style HUD? And what line can be put in the code to draw the doomguy's face?

In short, can someone post SBARINFO code that recreates the current hud with the face on it?
User avatar
phi108
Magical Error?
 
Joined: 01 Dec 2007

Re: Mugshot on fullscreen hud: SBARINFO?

Postby eliw00d » Fri Jan 18, 2008 5:29 am

User avatar
eliw00d
What is derp? KV don't hurt me. Don't hurt me no more.
 
Joined: 17 Oct 2004
Location: Duluth, MN

Re: Mugshot on fullscreen hud: SBARINFO?

Postby Blzut3 » Fri Jan 18, 2008 11:04 am

Its not perfect but here's what I have. It still needs tweaking on the drawselectedinventory command I'm sure.
Code: Select allExpand view
height 32;

statusbar fullscreen
{
   drawimage "MEDIA0", 20, 196;
   drawnumber 3, HUDFONT_DOOM, red, health, 80, 180;
   drawimage armoricon, 20, 172;
   drawnumber 3, HUDFONT_DOOM, red, armor, 80, 156;
   drawimage ammoicon1, 306, 196;
   drawnumber 3, HUDFONT_DOOM, red, ammo1, 295, 180;
   drawimage ammoicon2, 306, 172;
   drawnumber 3, HUDFONT_DOOM, red, ammo2, 295, 156;
   gamemode deathmatch, teamgame
   {
      drawnumber 2, HUDFONT_DOOM, red, frags, 276, 1;
   }
   gamemode cooperative, singleplayer
   {
      drawswitchableimage BlueCard, "nullimage", "STKEYS0", 308, 2;
      drawswitchableimage YellowCard, "nullimage", "STKEYS1", 308, 12;
      drawswitchableimage RedCard, "nullimage", "STKEYS2", 308, 22;
      drawswitchableimage BlueSkull, "nullimage", "STKEYS3", 298, 2;
      drawswitchableimage YellowSkull, "nullimage", "STKEYS4", 298, 12;
      drawswitchableimage RedSkull, "nullimage", "STKEYS5", 298, 22;
   }
   drawselectedinventory INDEXFON, 306, 148;
}

statusbar normal
{
   drawimage "STBAR", 0, 168;
   drawimage "STTPRCNT", 90, 171;
   drawimage "STTPRCNT", 221, 171;
   drawnumber 3, HUDFONT_DOOM, red, ammo1, 44, 171;
   drawnumber 3, HUDFONT_DOOM, red, health, 90, 171;
   drawnumber 3, HUDFONT_DOOM, red, armor, 221, 171;

   //keys
   drawswitchableimage BlueCard && BlueSkull, "nullimage", "STKEYS0", "STKEYS3", "STKEYS6", 239, 171;
   drawswitchableimage YellowCard && YellowSkull, "nullimage", "STKEYS1", "STKEYS4", "STKEYS7", 239, 181;
   drawswitchableimage RedCard && RedSkull, "nullimage", "STKEYS2", "STKEYS5", "STKEYS8", 239, 191;

   drawnumber 3, INDEXFON, gold, ammo Clip, 288, 173;
   drawnumber 3, INDEXFON, gold, ammo Shell, 288, 179;
   drawnumber 3, INDEXFON, gold, ammo RocketAmmo, 288, 185;
   drawnumber 3, INDEXFON, gold, ammo Cell, 288, 191;

   drawnumber 3, INDEXFON, gold, ammocapacity Clip, 314, 173;
   drawnumber 3, INDEXFON, gold, ammocapacity Shell, 314, 179;
   drawnumber 3, INDEXFON, gold, ammocapacity RocketAmmo, 314, 185;
   drawnumber 3, INDEXFON, gold, ammocapacity Cell, 314, 191;
   gamemode deathmatch, teamgame
   {
      drawnumber 2, HUDFONT_DOOM, red, frags, 138, 171;
   }
   gamemode cooperative, singleplayer
   {
      drawimage "STARMS", 104, 168;
      drawswitchableimage weaponslot 2, "STGNUM2", "STYSNUM2", 111, 172;
      drawswitchableimage weaponslot 3, "STGNUM3", "STYSNUM3", 123, 172;
      drawswitchableimage weaponslot 4, "STGNUM4", "STYSNUM4", 135, 172;
      drawswitchableimage weaponslot 5, "STGNUM5", "STYSNUM5", 111, 182;
      drawswitchableimage weaponslot 6, "STGNUM6", "STYSNUM6", 123, 182;
      drawswitchableimage weaponslot 7, "STGNUM7", "STYSNUM7", 135, 182;
   }
   gamemode cooperative, deathmatch, teamgame
   {
      drawimage translatable "STFBANY", 144, 169;
   }
   drawselectedinventory alternateonempty, INDEXFON, 143, 168
   {
      drawmugshot "STF", 5, 143, 168;
   }
}

statusbar inventory
{
   drawinventorybar Doom, 7, INDEXFON, 50, 170;
}

statusbar fullscreeninventory
{
   drawinventorybar Doom, 7, INDEXFON, 50, 170;
}
Blzut3
Pronounced: B-l-zut
 
 
 
Joined: 24 Nov 2004
Github ID: Blzut3
Operating System: Debian-like Linux (Debian, Ubuntu, Mint, etc) 64-bit
Graphics Processor: ATI/AMD with Vulkan Support

Re: Mugshot on fullscreen hud: SBARINFO?

Postby phi108 » Sat Jan 19, 2008 9:32 pm

Thanks, but in I can't see any face.
In r709 I have to remove the line:

statusbar inventory
{
drawinventorybar Doom, 7, INDEXFON, 50, 170;
}

To get it to start, and then the hud displays, but there isn't any mugshot, though the code looks like it should work. Are the offsets wrong?

And another thing about the hud: in widescreen it displays correctly with "vid_nowidescreen 1", but without this, the hud elements are moved inwards, and it would be nice if stuff stayed at the edges. Can the location of stuff be placed into the widescreen areas?

And is there a way to show a grid of the screen showing offset locations, or should I use trial-and-error to place stuff?
User avatar
phi108
Magical Error?
 
Joined: 01 Dec 2007

Re: Mugshot on fullscreen hud: SBARINFO?

Postby phi108 » Sat Jan 19, 2008 9:43 pm

OH, nevermind, your code drew the normal statusbar and the normal fullscreen hud. I just copied "drawmugshot "STF", 5, 143, 168;" into the fullscreen area of code, and now his mugshot is on the fullscreen hud!

Thanks for providing code! The fullscreen code wasn't on the wiki page. Now if I change coordinates, can I put the stuff at the edges of the widescreen image? It would be nice if SBARINFO could move stuff into the 4:3 image if it's drawn outside of that area.

Edit: or if you could make it move stuff to the edges automatically. But it's awesome anyway.

Edit 2: OK, I read the Wiki more, and now I'm not dumb. Coordinates reference the top-left corner of the 4:3 screen.
User avatar
phi108
Magical Error?
 
Joined: 01 Dec 2007

Re: Mugshot on fullscreen hud: SBARINFO?

Postby Blzut3 » Sat Jan 19, 2008 10:08 pm

The fullscreen code was not in the wiki because it is not close enough. (As you have noticed because it doesn't look right in widescreen among other things.)
Blzut3
Pronounced: B-l-zut
 
 
 
Joined: 24 Nov 2004
Github ID: Blzut3
Operating System: Debian-like Linux (Debian, Ubuntu, Mint, etc) 64-bit
Graphics Processor: ATI/AMD with Vulkan Support

Re: Mugshot on fullscreen hud: SBARINFO?

Postby phi108 » Sat Jan 19, 2008 10:18 pm

Well, making the coordinates of MEDIA0 "20, 196" moves it almost close enough to the edge, but it would be nice if negative values were supported.

and here's the code I used for fullscreen mugshot:

height 32;

statusbar fullscreen
{
drawimage "MEDIA0", 20, 196;
drawnumber 3, HUDFONT_DOOM, red, health, 80, 180;
drawimage armoricon, 20, 172;
drawnumber 3, HUDFONT_DOOM, red, armor, 80, 156;
drawimage ammoicon1, 306, 196;
drawnumber 3, HUDFONT_DOOM, red, ammo1, 295, 180;
drawimage ammoicon2, 306, 172;
drawnumber 3, HUDFONT_DOOM, red, ammo2, 295, 156;
drawmugshot "STF", 5, 143, 168;
gamemode deathmatch, teamgame
{
drawnumber 2, HUDFONT_DOOM, red, frags, 276, 1;
}
gamemode cooperative, singleplayer
{
drawswitchableimage BlueCard, "nullimage", "STKEYS0", 308, 2;
drawswitchableimage YellowCard, "nullimage", "STKEYS1", 308, 12;
drawswitchableimage RedCard, "nullimage", "STKEYS2", 308, 22;
drawswitchableimage BlueSkull, "nullimage", "STKEYS3", 298, 2;
drawswitchableimage YellowSkull, "nullimage", "STKEYS4", 298, 12;
drawswitchableimage RedSkull, "nullimage", "STKEYS5", 298, 22;
}
drawselectedinventory INDEXFON, 306, 148;
}


Now, where should I put the guy's face? How about: EVERYWHERE!!
User avatar
phi108
Magical Error?
 
Joined: 01 Dec 2007


Return to Editing (Archive)

Who is online

Users browsing this forum: No registered users and 1 guest