Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

FiveM menu library for creating menu's with NUI

License

NotificationsYou must be signed in to change notification settings

ThymonA/menuv

Repository files navigation

N|CoreV

IssuesLicenseForksStars


MenuV is a library written forFiveM and only uses NUI functionalities. This library allows you to create menus inFiveM. This project is open-source and you must respect thelicense and the hard work.

Features

  • Support for simple buttons, sliders, checkboxes, lists and confirms
  • Support for emojis on items
  • Support for custom colors (RGB)
  • Support for all screen resolutions.
  • Item descriptions
  • Rebindable keys
  • Event-based callbacks
  • Uses2 msec while menu open and idle.
  • Documentation onmenuv.fivem.io/api/
  • Themes:default ornative

Compile files

MenuV usesVueJS 2.6.11 or newer andTypeScript 3.8.3 or newer withNodeJS Package Manager. You need to haveNPM a.k.a NodeJS Package Manager installed on your system in order to compileMenuV files.

First download all dependencies by doing

npm install

After you have downloaded/loaded all dependencies, you can compileMenuV files by doeing.

npx webpack

After the command is executed you will see adist folder containing all theNUI files needed forMenuV.

When downloading arelease, this step is not necessary. Files are already compiled.

How to use?

  1. Addstart menuv to yourserver.cfg before the resources that's usesmenuv

  2. To useMenuV you must add@menuv/menuv.lua in yourfxmanifest.lua file.

    client_scripts {'@menuv/menuv.lua','example.lua'}

Create a menu

Create a menu by calling theMenuV:CreateMenu function.

MenuV:CreateMenu(title:string,subtitle: string,position: string,red:number,green:number,blue:number,texture: string,disctionary: string,namespace: string,theme:string)

Example:

localmenu=MenuV:CreateMenu('MenuV','Welcome to MenuV','topleft',255,0,0,'size-125','default','menuv','example_namespace','native')

Create menu items

Create a item by callingAddButton,AddConfirm,AddRange,AddCheckbox orAddSlider in the created menu

/** CREATE A BUTTON */menu:AddButton({icon:string,label:string,description:string,value:any,disabled:boolean});/** CREATE A CONFIRM */menu:AddConfirm({icon:string,label:string,description:string,value:boolean,disabled:boolean});/** CREATE A RANGE */menu:AddRange({icon:string,label:string,description:string,value:number,min:number,max:number,disabled:boolean});/** CREATE A CHECKBOX */menu:AddCheckbox({icon:string,label:string,description:string,value:boolean,disabled:boolean});/** CREATE A SLIDER */menu:AddSlider({icon:string,label:string,description:string,value:number,values:[]{label:string,value:any,description:string},disabled:boolean});

To see example in practice, seeexample.lua

Events

InMenuV you can register event-based callbacks on menu and/or items.

/** REGISTER A EVENT ON MENU */menu:On(event:string,callback:function);/** REGISTER A EVENT ON ANY ITEM */item:On(event:string,callback:function);

Documentation

ReadMenuV documentation

License

Project is written byThymonA and published underGNU General Public License v3.0Read License

Screenshot

How is this menu made? seeexample.lua

DefaultNative
MenuV DefaultMenuV Native
Default ThemeNative Theme

[8]ページ先頭

©2009-2025 Movatter.jp