Skip to content
View in the app

A better way to browse. Learn more.

LCPDFR.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Help with Graphics/Texture

Featured Replies

Hello.. I'm hoping that someone will be able to help me.. I am creating a radar plugin, and would like to know how to display the actual radar graphics. I am able to display text in a little debug window that I have, but would like to make it fancier... Just wondering if anyone knows how to produce something like the radar graphic from this FiveM plugin: https://forum.fivem.net/t/release-wraithrs-advanced-radar-system-1-0-2/48543

 

I know that it's a FiveM plugin, but I am making an LSPDFR plugin to look like something similar.. Like I said, I have everything working so far, I just need help on creating a fancy display. Does anyone have any examples of how to create something like this? I have the menu already created with RageNativeUI, I'm looking for help on the radar display in the lower right in those pictures of the FiveM plugin. Would it be possible to create something like this with the RageNativeUI?

 

Thanks for any help!

Edited by Syzygy94

  • Author

Hey.. Thanks for the reply.. Do you know of any examples of the drawing of a texture and then drawing text on top of it? I can get the texture to show up, but I am having issues with getting the text to display properly... 

 

Also, what about a custom font that would be included with the plugin itself? Do you have any examples of using that? It seems the Graphics.DrawText would just use the fonts installed on the user's computer. But, this font that would be with the plugin probably wouldn't be installed on a computer by default.

Edited by Syzygy94

As an example this would work:

Game.RawFrameRender += (o, g) =>
                    {
                        g.Graphics.DrawRectangle(
                            new RectangleF(Game.Resolution.Width / 2, Game.Resolution.Height / 2, 200, 100), Color.Red);
                        g.Graphics.DrawText("SOME TEXT", "Arial", 20f,
                            new PointF(Game.Resolution.Width / 2 + 50, Game.Resolution.Height / 2 + 50), Color.White);
                    };

leading to: 

Capture.PNG.3972821c06dc2769247a3561bd6ca3c4.PNG

As NoNameSet said, when you draw somthing last it will come on top.

On the second part of the question, i would suggest make textures for every number, there are most likley better options.

 

In the picture below i used textures for the numbers.

screen.thumb.png.fe82114d1b4c39472fab92921edf8269.png

Also note that this is usings wraithRS textures, so these can not be used ofcourse!

Edited by epicmrjuan

Thank you

  • Author

Hey.. Thanks to both of you for the replies.. One last question.. To get the text to line up in the speed boxes of the radar, is it just a matter of trying different points for the text/textures to make it look good? Or is there a better way? What happens if I get it all lined up, with my resolution, but someone else has a different resolution? Wouldn't the coordinates change then? Would you be able to provide your example of how you lined up the textures to fit in the green box @epicmrjuan?

 

I haven't tried to replicate the examples that @NoNameSet provided yet.. So, apologies if it's really that simple...

9 minutes ago, Syzygy94 said:

Hey.. Thanks to both of you for the replies.. One last question.. To get the text to line up in the speed boxes of the radar, is it just a matter of trying different points for the text/textures to make it look good? Or is there a better way? What happens if I get it all lined up, with my resolution, but someone else has a different resolution? Wouldn't the coordinates change then? Would you be able to provide your example of how you lined up the textures to fit in the green box @epicmrjuan?

 

I haven't tried to replicate the examples that @NoNameSet provided yet.. So, apologies if it's really that simple...

Well you could just make the size of the main texture the same, then get the size of that rectangle and it's position. With those values you can calculate about where it should be.

Edited by NoNameSet

6 hours ago, Syzygy94 said:

Hey.. Thanks to both of you for the replies.. One last question.. To get the text to line up in the speed boxes of the radar, is it just a matter of trying different points for the text/textures to make it look good? Or is there a better way? What happens if I get it all lined up, with my resolution, but someone else has a different resolution? Wouldn't the coordinates change then? Would you be able to provide your example of how you lined up the textures to fit in the green box @epicmrjuan?

 

I haven't tried to replicate the examples that @NoNameSet provided yet.. So, apologies if it's really that simple...

Hey,

 

I just jused photoshop to get coords, then just added the values that i used for posistioning the background, however this method wil not scale well. So use what nonameset said!

Thank you

  • 2 weeks later...

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...

Recently Browsing 0

  • No registered users viewing this page.

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.