durtyfree / alt-v-nativeui Goto Github PK
View Code? Open in Web Editor NEWNativeUI for GTA V alt:V Multiplayer mod written in Javascript / TypeScript
Home Page: https://altv.mp/
License: Apache License 2.0
NativeUI for GTA V alt:V Multiplayer mod written in Javascript / TypeScript
Home Page: https://altv.mp/
License: Apache License 2.0
ItemSelect.on doesnt seem to recognize Checkbox Item
repro code:
JoueursMenu.AddItem(new NativeUI.UIMenuItem("Gestion des Joueurs"));
JoueursMenu.AddItem(new NativeUI.UIMenuItem("Admin Tools"));
JoueursMenu.AddItem(new NativeUI.UIMenuItem("Teleport Tools"));
JoueursMenu.AddItem(new NativeUI.UIMenuItem("Coords Tools"));
JoueursMenu.AddItem(new NativeUI.UIMenuCheckboxItem("Show Players Name & ID", false));
JoueursMenu.ItemSelect.on(item => {
alt.log(item.Text);
switch (item.Text) {
case "Show Players Name & ID":
showname = item.Checked;
alt.log(showname, item.Checked);
if (!showname)
API.ShowNotification('~r~ShowName désactivé');
else
API.ShowNotification('~g~ShowName activé, faites Echap pour l\'afficher');
break;
}
});
When i tried getting the package from npm its showing the error
npm ERR! code E401
npm ERR! Unable to authenticate, need: Basic realm="GitHub Package Registry"
Can you help me get this sorted?
0 info it worked if it ends with ok
1 verbose cli [
1 verbose cli 'C:\Program Files\nodejs\node.exe',
1 verbose cli 'C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js',
1 verbose cli 'install',
1 verbose cli '--save',
1 verbose cli '@durtyfree/altv-nativeui'
1 verbose cli ]
2 info using [email protected]
3 info using [email protected]
4 verbose npm-session a7e716d79c83a96c
5 silly install loadCurrentTree
6 silly install readLocalPackageData
7 http fetch GET 401 https://npm.pkg.github.com/@durtyfree%2faltv-nativeui 459ms
8 silly fetchPackageMetaData error for @durtyfree/altv-nativeui@latest Unable to authenticate, need: Basic realm="GitHub Package Registry"
9 timing stage:rollbackFailedOptional Completed in 4ms
10 timing stage:runTopLevelLifecycles Completed in 662ms
11 verbose stack Error: Unable to authenticate, need: Basic realm="GitHub Package Registry"
11 verbose stack at C:\Program Files\nodejs\node_modules\npm\node_modules\npm-registry-fetch\check-response.js:107:17
11 verbose stack at processTicksAndRejections (internal/process/task_queues.js:93:5)
12 verbose statusCode 401
13 verbose pkgid @durtyfree/altv-nativeui@latest
14 verbose cwd D:\Acer\Desktop\altv-server(1)
15 verbose Windows_NT 10.0.19041
16 verbose argv "C:\Program Files\nodejs\node.exe" "C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js" "install" "--save" "@durtyfree/altv-nativeui"
17 verbose node v14.13.0
18 verbose npm v6.14.8
19 error code E401
20 error Unable to authenticate, need: Basic realm="GitHub Package Registry"
21 verbose exit [ 1, true ]
When i tried accessing 'https://npm.pkg.github.com/@durtyfree%2faltv-nativeui', its asking for username and password, which causing it to get unauthorized.
Wenn ich dein NativeUI benutz + Example Menu = Game Crash beim Connecten vom Server.
Mit: https://github.com/datWeazel/alt-V-NativeUI dieser Version funktioniert das Example Menu einwandfrei = kein Crash.
I want to get the Index Value of an AutoListItem on Select but the Index is Everytime 0
Code:
PerformanceMenu.ItemSelect.on((item, index) => {
alt.log("[AutoListChange] " + index, item.Text);
});
Output:
[17:12:01] [AutoListChange] 0 Motor
Hey,
ich tried to exclude the NativeUI resource from some ressources in on my server.
Add it as dependency is working great.
But if im trying to build my menu with NativeUI an error occurs:
[19:47:58][Error] [V8] Exception at NativeUI:client.js:468 [19:47:58][Error] let point = new NativeUI.Point(50,50); [19:47:58][Error] TypeError: Class constructor Point cannot be invoked without 'new'
Do not know why.
I am using 'new'.
Please submit this in npm registry instead of github. and make name in package.json in lowercase
[14:26:26][Error] [V8] Exception at admin
[14:26:26][Error] ReferenceError: No such module: @durtyfree/altv-nativeui
[14:26:26][Error] Failed to load resource admin
is it possible to add two or more MenuItems in one row?
there is a little bug with submenu
as you can see my joueurs tab is staying here when i click on the next submenu
repro code : https://pastebin.com/FvQu9jVL
Hello, can you please add NativeUI panels?
There is a public FiveM resource that contains panels, maybe you can convert the panels to alt:V NativeUI, it would be very nice
Here is the FiveM resource: https://forum.cfx.re/t/official-nativeui-3-0-c
The Panels look like this:
hello duty, can you make input felds
Bug
When you don't chose any options on a UIMenuDynamicListItem, the arrows are misplaced. You should any items, and the arrows are placed well.
Step to reproduce
`
let array = ["0", "1"]
let menu = new NativeUI.Menu(
"Title",
"Subtitle",
new NativeUI.Point(50, 50)
)
let item = new NativeUI.UIMenuDynamicListItem(
"Item Name",
itemChangeHandle,
"Description",
() => array[0]
)
menu.AddItem(item)
`
It seems like as the Natives from NativeUI are Deprecated i updated it like this:
at line 701 replace
getScreenActiveResolution with getActualScreenResolution
at lines 1649, 2692, 2693 replace
getControlInstructionalButton with getControlInstructionalButtonsString
at lines 2125, 2415, 2419, 2422, 2434 replace
setMouseCursorSprite with setMouseCursorStyle
at line 810 add false as last Arguement like so:
game__default.drawSprite(textureDictionary, textureName, x, y, w, h, heading, color.R, color.G, color.B, color.A, true, false);
at line 735 replace
beginTextCommandLineCount with beginTextCommandGetNumberOfLinesForString
at line 747 replace
endTextCommandLineCount with endTextCommandGetNumberOfLinesForString
It works for me so if it does not for you find ur own Solution
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.