Jump to content

Putting Text in a Specific Place?


Recommended Posts

If you want help, please post more information. Don't put the onus on other people to contact you to help you. Post a code snippet and explain what you've tried and how it hasn't worked, or has worked differently than expected. 

[REL] Coastal Callouts: An action-packed mod with new vehicles, maps, capabilities, and callouts in and around the waters of Los Santos

[REL] Police Tape: Make your scenes more realistic while stopping peds and traffic

[REL] Better EMS: Realistic and dynamic EMS response

Join the Parks Benefactor Program to support my work and get early beta access!

Link to comment
Share on other sites

6 minutes ago, PNWParksFan said:

If you want help, please post more information. Don't put the onus on other people to contact you to help you. Post a code snippet and explain what you've tried and how it hasn't worked, or has worked differently than expected. 

I have tried this:

  point.X = Rage.Game.Resolution.Width / 50;
  point.Y = Rage.Game.Resolution.Height / 50;

Which puts it around the top left corner. I want it right to the right of the minimap. I have tried making it 50 and -50, thinking of it as a graph, but when you put negative it disappears. Not really sure where to go from here.

Link to comment
Share on other sites

1 hour ago, ToastinYou said:

Which puts it around the top left corner. I want it right to the right of the minimap. I have tried making it 50 and -50, thinking of it as a graph, but when you put negative it disappears. Not really sure where to go from here.

but then it'll overlap with Player Location Display :(

 My Uploads | Current Lineup 

0.9.6 cover.png

Found my response useful? You can thank me buy Liking it :)

Link to comment
Share on other sites

In GTA V the screen coordinates are (0, 0) the top-left and (resolution.Width, resolution.Height) the bottom-right.

To draw on the screen you have two options use the DirectX wrapper from RPH or use the game natives.

For the DirectX option hook the Game.(Raw)FrameRender and use the passed GraphicsEventArgs to draw, e.j. eventArgs.Graphics.DrawText()

For the game natives option, I recommend using the RAGENativeUI Text and ResText classes. The ResText uses 1080 pixels height base system so you don't need to do extra calculation for different resolutions.

Link to comment
Share on other sites

25 minutes ago, alexguirre said:

In GTA V the screen coordinates are (0, 0) the top-left and (resolution.Width, resolution.Height) the bottom-right.

To draw on the screen you have two options use the DirectX wrapper from RPH or use the game natives.

For the DirectX option hook the Game.(Raw)FrameRender and use the passed GraphicsEventArgs to draw, e.j. eventArgs.Graphics.DrawText()

For the game natives option, I recommend using the RAGENativeUI Text and ResText classes. The ResText uses 1080 pixels height base system so you don't need to do extra calculation for different resolutions.

Thanks, got it working  :)

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



×
×
  • Create New...