Jump to content
alt:V Multiplayer Forum
Sign in to follow this  
Sokrates

NativeUI Wrapper for C#

Recommended Posts

Hi guys!

I wanted to share our port of a server side MenuManager based on LeShred's MenuManager for GT-MP,

using the NativeUI of Weazel.

Since I'm often using menus to test things and mostly work on server side, I thought maybe someone else would also like

to just grab the needed files and write menus on server side.

 

You find all linkings and the files in the link below.

https://github.com/SokratesMir/C-MenuManager-altv

 

Note: You have to link the events in MenuManager.cs and import the Client-folder to your needs. This is rather a resource then a stand-alone project. Feel free to edit everything to your needs and preferences.

  • Like 4

Share this post


Link to post
Share on other sites

If you upload your Script, please check it. 🙂

 

Main*.cs -> Replace "Client" with "IPlayer".

Clientside:

If anyone change the folder "Client" to a better name like "nativeui" or something -> he need to change the ts (MenuManger.ts) -> webview item

resource.cfg -> client.ts not client.js, and add webview/* to the files...

client.ts -> Change "import menuManager from 'scripts/MenuManager';" to "import menuManager from 'scripts/MenuManager.ts';"

Now it works. 🙂

Edited by Max Jackson

Share this post


Link to post
Share on other sites
Quote

Menu.cs -> Replace "Client" with "IPlayer".

It was in 'Main.cs' not in 'Menu.cs', fixed that one

 

Quote

If anyone change the folder "Client" to a better name like "nativeui" or something -> he need to change the ts (MenuManger.ts) -> webview item

If someone changes structure one has to emend the files properly for it to work.

 

Quote

resource.cfg -> client.ts not client.js, and add webview/* to the files...

Since I don't import the typings with 'webview/* ' to the client I'm using client.js. It's working fine for me, so it probably is a minor error.

 

On 9/1/2019 at 4:52 PM, Max Jackson said:

Change "import menuManager from 'scripts/MenuManager';" to "import menuManager from 'scripts/MenuManager.ts';"

I won't change this in my git since I took the script out of a running system and my structure needs this way of definition - but your answer is right beneath my post so I think poeple will find it and change it their way if needed.

 

Thanks for your answer

Share this post


Link to post
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.

Sign in to follow this  

×
×
  • Create New...