How can I make the text in a RichText have an outline? draw.SimpleTextOutlined will no do for obvious reasons.
For what obvious reasons?
RichText draws itself just fine and the entire RichText system would probably have to be recreated in a paint hook to work exactly the same (as far as I know)
[QUOTE=RonanZer0;50193306]RichText draws itself just fine and the entire RichText system would probably have to be recreated in a paint hook to work exactly the same (as far as I know)[/QUOTE]
You can add outline to a font.
[QUOTE=Netheous;50193426]You can add outline to a font.[/QUOTE]
Yes.
And it's quite ugly compared to SimpleTextOutlined.
Github: [url]https://github.com/garrynewman/garrysmod/blob/master/garrysmod/lua/includes/modules/draw.lua[/url]
[code]
function SimpleTextOutlined(text, font, x, y, colour, xalign, yalign, outlinewidth, outlinecolour)
local steps = ( outlinewidth * 2 ) / 3
if ( steps < 1 ) then steps = 1 end
for _x = -outlinewidth, outlinewidth, steps do
for _y = -outlinewidth, outlinewidth, steps do
SimpleText( text, font, x + _x, y + _y, outlinecolour, xalign, yalign )
end
end
return SimpleText( text, font, x, y, colour, xalign, yalign )
end
[/code]
I guess doing something like that would do.
What?
My point was that the font outline property is ugly compared to SimpleTextOutlined, not the other way around.
[QUOTE=RonanZer0;50202453]What?
My point was that the font outline property is ugly compared to SimpleTextOutlined, not the other way around.[/QUOTE]
I posted how draw.SimpleTextOutline works .. so you could make a draw function to replace RichText :v
RichText is an engine panel, so you kinda have to recreate it to make your own paint function.
Sorry, you need to Log In to post a reply to this thread.