Jump to content

Creating a Menu


Stealth22

Recommended Posts

Does anyone know how to create a menu similar to LSPDFR's backup/interaction menus? And if so, could we put up an example for it on the GitHub repo?

Stealth22
LSPDFR Tester | Plugin Developer
My Plugins: Code 3 Callouts | Traffic Control | Keep Calm | ALPR+

Please do not PM me for any kind of technical support.
I unfortunately do not have enough free time to answer every PM that I get. For issues with my plugins, please post in the comments section of the file, or it's forum thread. You'll get a much quicker response from me there than if you send me a PM; I do my best to respond to every question in the comments sections. For API/programming questions, please post them in the API Development forum, so all developers can benefit from the answer as well. Thanks!

Link to comment
Share on other sites

I was about to ask @LukeD if he used a 3rd party library or created one himself. There's a great NativeUI for Community SH but I don't know if there's a version/plan to port it to RAGE.

I asked Guad for permission to port it to RAGE and I'm waiting the response. If he let the port be done, maybe someone can help me to port it, it will be much faster.

EDIT: Guad has given his permission, so I started to port it.

Edited by alexguirre
Link to comment
Share on other sites

I was about to ask @LukeD if he used a 3rd party library or created one himself. There's a great NativeUI for Community SH but I don't know if there's a version/plan to port it to RAGE.

Did @LukeD create a menu that looks like the LSPDFR ones? I believe @FinKone did something similar for Police Radio, although I have not tried it myself yet.

@LMS, do you think you could put an example on the GitHub repo?

Stealth22
LSPDFR Tester | Plugin Developer
My Plugins: Code 3 Callouts | Traffic Control | Keep Calm | ALPR+

Please do not PM me for any kind of technical support.
I unfortunately do not have enough free time to answer every PM that I get. For issues with my plugins, please post in the comments section of the file, or it's forum thread. You'll get a much quicker response from me there than if you send me a PM; I do my best to respond to every question in the comments sections. For API/programming questions, please post them in the API Development forum, so all developers can benefit from the answer as well. Thanks!

Link to comment
Share on other sites

I asked Guad for permission to port it to RAGE and I'm waiting the response. If he let the port be done, maybe someone can help me to port it, it will be much faster.

EDIT: Guad has given his permission, so I started to port it.

Could you upload it on GitHub or at least send me through PM? I'll take a look and try to help you if only my skills are good enough.

I found the source but still, it would be great to have it on our LSPDFR GitHub to synchronize the work, I guess we need Guad's permission. I don't have idea if we can fork it ourselves or need LMS to do it?

Edited by LtFlash
Link to comment
Share on other sites

Could you upload it on GitHub or at least send me through PM? I'll take a look and try to help you if only my skills are good enough.

I found the source but still, it would be great to have it on our LSPDFR GitHub to synchronize the work, I guess we need Guad's permission. I don't have idea if we can fork it ourselves or need LMS to do it?

I uploaded what I have done until now to a new repository: https://github.com/alexguirre/RAGENativeUI

It's quite tricky because it uses classes that aren't implement in RAGE for now, such as Scaleform. Guad give me permission and said that it should be open source.

 

Edited by alexguirre
Link to comment
Share on other sites

You may upload all files and add me as a contributor so we can have some communication (you'll find my account ID in LSPDFR github). I'm currently working on UIResText.cs, using Community SH code to re-create classes which are not implemented in RAGE. 

Link to comment
Share on other sites

  • Management Team

You should be able to merge it into the LSPDFR repo (if you want) yourselves. Just create a new folder. I will see if I can add something to it from our code when I get some time.

Please do not PM me unless really necessary (knowing you helps). If you think you need my attention in a topic, tag me.

Link to comment
Share on other sites

I uploaded what I have done until now to a new repository: https://github.com/alexguirre/RAGENativeUI

It's quite tricky because it uses classes that aren't implement in RAGE for now, such as Scaleform. Guad give me permission and said that it should be open source.

 

You may upload all files and add me as a contributor so we can have some communication (you'll find my account ID in LSPDFR github). I'm currently working on UIResText.cs, using Community SH code to re-create classes which are not implemented in RAGE. 

I just took a peek at NativeUI, as I had not seen it yet. It looks awesome, so it would be great to have that ported to RPH.

You can add me as a contributor too, I might work on it if I have time.

And I think @LMS is right, it should probably go into the LSPDFR API repo. I can probably do the merge if you want.

One thing I think we should do is have the various classes separated into appropriate namespaces. Having all the classes in the root like that isn't good for code organization. It's a bit OCD, I know, haha. But I can't help it, I code for a living, so I'm always using best practices in all the coding I do.

Stealth22
LSPDFR Tester | Plugin Developer
My Plugins: Code 3 Callouts | Traffic Control | Keep Calm | ALPR+

Please do not PM me for any kind of technical support.
I unfortunately do not have enough free time to answer every PM that I get. For issues with my plugins, please post in the comments section of the file, or it's forum thread. You'll get a much quicker response from me there than if you send me a PM; I do my best to respond to every question in the comments sections. For API/programming questions, please post them in the API Development forum, so all developers can benefit from the answer as well. Thanks!

Link to comment
Share on other sites

Alex, would you mind if we upload it on LSPDFR Git? I think it is better to keep all of things in one place. I can do in right now and you'll just replace the original files with your edits.

Yeah, no problem. I just decided to make it separated because it also can useful for people who doesn't use the API.

Edited by alexguirre
Link to comment
Share on other sites

We won't use LSPDFR API (I hope! xD), thanks to liberal politics by LMS we can upload there non-API projects too :thumbsup:

OK, we can roll guys. Everything is uploaded, including my changes.

Ok, but in UIText it should inherit( I think this is the correct terminology) from the interface UIElement so then we can add it to an UIContainer, as I did here: https://github.com/alexguirre/RAGENativeUI/blob/master/UIElement.cs

I will update it.

@LtFlash Added UIElement.cs, which includes the UIElement interface, UIText, UIRectangle and UIContainer and updated UIResRectangle. Also remember to change the namespace from NativeUI to RAGENativeUI.

Edited by alexguirre
Link to comment
Share on other sites

@alexguirre, can I be a little OCD about the organization and naming conventions? :whistling:

All of the UI classes (UIText, UIContainer, etc) should go into a UI namespace, and named Text, Container, etc. The element interface should be called IElement (the "i" in front denotes that its an interface), and then it would be implemented by the Text class. To keep things clean, each class/interface should be in it's own file as well, unless there's something that is explicitly a sub-class.

I can go through and take care of some of that later when I have time.

(FYI, "inherit" is for when you have one class being derived from another, i.e. a Dog class would inherit an Animal class, and it would implement an IAnimal interface, for example. In short, "inherit" is for classes, and "implement" is for interfaces.)

Edited by Stealth22

Stealth22
LSPDFR Tester | Plugin Developer
My Plugins: Code 3 Callouts | Traffic Control | Keep Calm | ALPR+

Please do not PM me for any kind of technical support.
I unfortunately do not have enough free time to answer every PM that I get. For issues with my plugins, please post in the comments section of the file, or it's forum thread. You'll get a much quicker response from me there than if you send me a PM; I do my best to respond to every question in the comments sections. For API/programming questions, please post them in the API Development forum, so all developers can benefit from the answer as well. Thanks!

Link to comment
Share on other sites

@alexguirre, can I be a little OCD about the organization and naming conventions? :whistling:

All of the UI classes (UIText, UIContainer, etc) should go into a UI namespace, and named Text, Container, etc. The element interface should be called IElement (the "i" in front denotes that its an interface), and then it would be implemented by the Text class.

I can go through and take care of some of that later when I have time.

(FYI, "inherit" is for when you have one class being derived from another, i.e. a Dog class would inherit an Animal class, and it would implement an IAnimal interface, for example)

Yeah, it will be really good to organize it, I just followed how NativeUI and Scripthook.NET was done 

Link to comment
Share on other sites

Yeah, it will be really good to organize it, I just followed how NativeUI and Scripthook.NET was done 

Ok, no problem.

I'll go in and re-organize the classes, maybe this weekend if I can.

Stealth22
LSPDFR Tester | Plugin Developer
My Plugins: Code 3 Callouts | Traffic Control | Keep Calm | ALPR+

Please do not PM me for any kind of technical support.
I unfortunately do not have enough free time to answer every PM that I get. For issues with my plugins, please post in the comments section of the file, or it's forum thread. You'll get a much quicker response from me there than if you send me a PM; I do my best to respond to every question in the comments sections. For API/programming questions, please post them in the API Development forum, so all developers can benefit from the answer as well. Thanks!

Link to comment
Share on other sites

My god, this code is a mess! :pinch:

I've got it mostly cleaned up. There are a lot of missing classes though, from Script Hook V.

I should be able to do some more between tonight and tomorrow. Everyone hold off on any commits until Monday, just to prevent any conflicts.

Edited by Stealth22

Stealth22
LSPDFR Tester | Plugin Developer
My Plugins: Code 3 Callouts | Traffic Control | Keep Calm | ALPR+

Please do not PM me for any kind of technical support.
I unfortunately do not have enough free time to answer every PM that I get. For issues with my plugins, please post in the comments section of the file, or it's forum thread. You'll get a much quicker response from me there than if you send me a PM; I do my best to respond to every question in the comments sections. For API/programming questions, please post them in the API Development forum, so all developers can benefit from the answer as well. Thanks!

Link to comment
Share on other sites

My god, this code is a mess! :pinch:

I've got it mostly cleaned up. There are a lot of missing classes though, from Script Hook V.

I should be able to do some more between tonight and tomorrow. Everyone hold off on any commits until Monday, just to prevent any conflicts.

Also we should add a txt or something similar to put what each one is working on. I'm working in the class Scaleform from Scripthook.NET

Link to comment
Share on other sites

Committed my changes to the repo. Still a ton of errors and missing classes, but its at least a little more organized than before.

You guys can feel free to work on stuff now. (I'm still trying to learn the structure of the project, lol)

Stealth22
LSPDFR Tester | Plugin Developer
My Plugins: Code 3 Callouts | Traffic Control | Keep Calm | ALPR+

Please do not PM me for any kind of technical support.
I unfortunately do not have enough free time to answer every PM that I get. For issues with my plugins, please post in the comments section of the file, or it's forum thread. You'll get a much quicker response from me there than if you send me a PM; I do my best to respond to every question in the comments sections. For API/programming questions, please post them in the API Development forum, so all developers can benefit from the answer as well. Thanks!

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