messages in sbarinfo

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: messages in sbarinfo

Re: messages in sbarinfo

by Blzut3 » Tue Aug 09, 2011 5:19 pm

If fullscreenoffsets is used then hud_scale must be taken into account. All of the scaling and coordinate adjustments are done in DSBarInfo::DrawGraphic() or DSBarInfo::DrawString() so all you're doing is feeding the absolute coordinates to the console system.

Re: messages in sbarinfo

by kgsws-CZ » Tue Aug 09, 2011 4:47 pm

Blzut3 wrote:This code makes no attempt to work with hud_scale, st_scale, or even resolutions. Start the example in 320x200 and notice the complete lack of a console read out.
Isn't this because of 'FullScreenOffsets'?

Re: messages in sbarinfo

by Blzut3 » Mon Aug 08, 2011 5:06 pm

While I still don't like the idea since it promotes tangling of the SBarInfo code with other parts of the engine (the lack of which is one of the main reasons we even have SBARINFO in the first place). Here are some things I noticed with the patch:
  • This code makes no attempt to work with hud_scale, st_scale, or even resolutions. Start the example in 320x200 and notice the complete lack of a console read out.
  • Get rid of the magic numbers: hudMessagesFlags should have an enum somewhere I think.
  • Change the name of the command to something along the lines of SetConsoleLocation. The command doesn't draw anything and as such acts completely differently from any of the other drawing functions (you can only effectively use it once per tic and it is always on top).
Otherwise I'm leaving it up to Graf or Randy to decide if this feature gets accepted.

Re: messages in sbarinfo

by wildweasel » Mon Aug 08, 2011 4:13 pm

I'd appreciate support for different fonts, so that I can use a BMF font to display messages. Also, this might be kind of hard, but perhaps a flag to make it type-on in a similar manner to HUDMSG_TYPEON?

Re: messages in sbarinfo

by Jimmy » Mon Aug 08, 2011 2:41 pm

Other thoughts:

- A flag for allowing the user to customize whether messages appear on the left or center (as they do now).
- Number of pixels before the lines wrap (as opposed to them only wrapping when reaching the edge of the screen).
- Number of pixels between lines.
- Number of pixels between messages (in case the lines wrap).
- Option for messages to use the same scale/resolution as the status bar, as well as allowing them to be 2x or 4x scaled.
- Fade time.

Re: messages in sbarinfo

by Nash » Mon Aug 08, 2011 2:09 pm

OMG about time!!! :D

Re: messages in sbarinfo

by NeuralStunner » Mon Aug 08, 2011 12:43 pm

Sharp! This would be great for HUD readouts.

Re: messages in sbarinfo

by Jimmy » Mon Aug 08, 2011 11:24 am

Heck yes! :D

messages in sbarinfo

by kgsws-CZ » Mon Aug 08, 2011 11:16 am

Requested here: http://skulltag.net/tracker/view.php?id=358
Simple to make.

Code: Select all

DrawMessages <x>, <y> [, <scale> [, center]]
Scale defaults to 0. Using this will ignore con_centernotify and con_scaletext.
It might be even more enhanced to support different font, show time, number of lines ... etc.
Attachments
sbmsg.zip
(2.54 KiB) Downloaded 55 times
Screenshot_Doom_20110808_190903.png
Screenshot_Doom_20110808_190903.png (148.44 KiB) Viewed 976 times

Top