Drawing text at top left corner of screen and making it stay in the same place across resolutions

Quick question, I’m trying to draw the version number of the gamemode I’m working on, in the top left corner of the screen.

Obviously the problem is that if I set a Y value to something such as 50 then it is going to move from the edge of screen depending on the resolution.

What would be the best to do this?

Code I have:

draw.DrawText( "Version 0.1", "TargetIDSmall", 50, 4, Color( 255, 255, 255, 255 ), 1 );





I’ve tried doing things such as ScrW() - (ScrW()*0.98), but that obviously doesn’t work either since the screen width has a large difference.

My aim is to have both resolutions looking similar to the 1920x1080 picture.

Any help would be appreciated, thanks.

I am not 100% sure but you could try this ScrW()/20,ScrH()/20

The top left is going to be the same due to drawing using the top left as the origin. What you want is to scale the font based on resolution.

Use CreateFont with ScreenScale as the size argument.