OSD Graphics types not working

Forum Archive - from http://theuniversal.net
Locked
Haxina
VIP
VIP
Posts: 63
Joined: Thu Oct 17, 2013 4:25 pm

OSD Graphics types not working

Post by Haxina »

Software:Registered Server
Version Number:
________________________________________________________________________
Location

________________________________________________________________________
Description:
Assuming the parameters X & Y is the "start coordinates" and the W & H is the "end coordinates",
OSDAddAt( RECT, 0, 0, 10, 10, "", "FF0000" )
should create a red rectangle, but isn't showing on my screen..
Same goes for BOX and LINE, not showing anything.
________________________________________________________________________
Steps to Replicate:
^
Haxina
VIP
VIP
Posts: 63
Joined: Thu Oct 17, 2013 4:25 pm

Post by Haxina »

Forgot to add it's v0.69.9, and doing it on Call of Doody :)
User avatar
zaroba
World Owner
World Owner
Posts: 7257
Joined: Fri Oct 10, 2003 11:06 pm
Location: Hereford, PA
Contact:

Post by zaroba »

values might be too small.
If it is a building OSD, it is around 500 wide and 400 tall
a 10x10 square would be half the side of a text character in the very top left corner.
Haxina
VIP
VIP
Posts: 63
Joined: Thu Oct 17, 2013 4:25 pm

Post by Haxina »

I did try higher values (up to a thousand+) too. but nothing there either.
User avatar
morbydvisns
Posts: 1889
Joined: Sun Jan 30, 2005 12:51 am

Post by morbydvisns »

you gotta put a # before the color code info

OSDAddAt( RECT, 0, 0, 10, 10, "", "#FF0000" )
User avatar
Mit
Staff
Staff
Posts: 3551
Joined: Sun Sep 21, 2003 10:14 pm
Location: Unknown

Post by Mit »

mm.. thats interesting that that works :)

i was just about to answer and say (unlike HTML/web colours) you needed to include an alpha value too.. its AARRGGBB
e.g 80FF0000
gives you a 50% semi-transparent red. (FF0000 - is red with 0% alpha). I guess the # gets picked up as something..

I guess theres no valid cases where you'll want to be rendering graphics with 100% transparency so i'll change it so FF0000 becomes FFFF0000 by default, rather than 00FF0000.
Haxina
VIP
VIP
Posts: 63
Joined: Thu Oct 17, 2013 4:25 pm

Post by Haxina »

Ah okay, cool.
Thanks :)
Got a second bug incoming d:
Locked