Jump to content

[.NET] NativeUI


Guad

Recommended Posts

 

 

 

 

 

Post your ScriptHookVDotNet-[date].log

http://pastebin.com/sEZjMzg7<- there it is for you, that's the last tiem I tried starting GTAV with the menu in \scripts

 

it looks like your dll file wasnt placed inside the scripts folder, thats why nothing is happening

 

Except... I know I did it. I separately put every single "MenuExample".dll I could find in the scripts folder.... none worked

 

Then the issue is your MenuExample, can you post the code(preferbly on a site like pastebin) to see why it thinks there are no scripts inside

 

I made the menu from the example script that was on Guad's github (just to test what it would be like) and since there it said menuexample.cs I made it cs, you can find the code for it on the github

 

 

Did you modify the code in any way? The example works fine.

Link to comment
Share on other sites

  • 4 weeks later...
  • 2 weeks later...
  • 2 weeks later...
GeorgeZhang

Is there a way to increase the maximum menuitems on screen? I mean I don't want the scrolling, I wish that my "launch" button to be visible all the time.

 

Edit: also, how do I customize the menu subtitile's box color? Like the menu of gta online missions?

Edited by GeorgeZhang
Link to comment
Share on other sites

  • 4 months later...

Is there any news on when this will be updated? SHVDN has just been updated (2.9.4) and it breaks things in this.

 

Edit: Ignore that, another version of SHVDN has been released that fixes the problem.

Edited by Guest
Link to comment
Share on other sites

NativeUI 1.7 is causing the game to crash as soon as settings is opened. *With the latest 944 update*

Link to comment
Share on other sites

  • 2 weeks later...
  • 2 weeks later...

Hi, is there any way to increase the scrolling speed of the list? like pressing and holding down the Down key and the menu traverses faster than usual. Please help, I have big lists.

Edited by Ssshhh
Link to comment
Share on other sites

  • 1 month later...

I'm having some trouble with accessing the website at github, so i cant download version 1.7. if any of you could send me the file on curse or something that would be awesome. any help on this would be greatly appreciated. my curse username is TheSlaughter01

Edited by needhelp123
Link to comment
Share on other sites

Hi, is there any way to increase the scrolling speed of the list? like pressing and holding down the Down key and the menu traverses faster than usual. Please help, I have big lists.

That is one feature this needs, along with better optimization.

 

I think Menyoo is the only one where the scrolling speeds up when you hold down the button.

Link to comment
Share on other sites

  • 1 month later...

Hey, i have a problem with a submenu, when i'm entering submenu, it moves to left corner, but my main menu position is middleright, what i need to do, to keep my submenu at middle right?

Link to comment
Share on other sites

  • 2 months later...
  • 1 month later...
  • 1 month later...
  • 1 month later...

Is this ever going to get an updated release with the useful stuff that has been added? Like access to a UIMenuListItem.List property?

 

I am trying to demonstrate the use of dynamic UIMenuListItems to someone but it's a guaranteed crash except in one situation. If you have the UIMenuListItem at the bottom of the menu, then you can simply remove it and add it back. But if any other items are below it, RemoveAt() works fine but Insert(index, UIMenuItem) causes an instant crash, even if you do a RefreshIndex after the Insert.

 

This is the error:

 

System.NullReferenceException: Object reference not set to an instance of an object.
at NativeUI.UIMenuListItem.Position(Int32 y)
at NativeUI.UIMenu.Draw()
at NativeUI.MenuPool.Draw()

 

I have my own build of NativeUI with that UIMenuListItem.List property accessible but it's a waste of time giving that to the person I am working with, because they can't release any mods with it. I know kagikn very kindly did a pull request to add this but that was months ago.

 

I know there is already one other version of NativeUI out there but I would think the last thing we need, is everyone to need numerous versions of NativeUI to cater for any features that have been added by individuals in their own version.

Link to comment
Share on other sites

  • 2 months later...
top gear2134124

when i try to open the mod menu it does not show here is the code i have put in

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using System.Drawing;
using GTA;
using GTA.Native;
using GTA.Math;
using NativeUI;
namespace Final_Destination
{
public class Class1 : Script
{
//Final Destintion
MenuPool modMenuPool;
UIMenu mainMenu;
UIMenuItem resetWantedLevel;
public Class1()
{
setup();
Tick += onTick;
KeyDown += onKeyDown;
}
private void onKeyDown(object sender, KeyEventArgs e)
{
if (e.KeyCode == Keys.F10) //&& !modMenuPool.IsAnyMenuOpen())
{
mainMenu.Visible = !mainMenu.Visible;
}
else
{
mainMenu.Visible = mainMenu.Visible;
}
}
private void onTick(object sender, EventArgs e)
{
if (modMenuPool != null)
modMenuPool.ProcessMenus();
}
void setup()
{
modMenuPool = new MenuPool();
mainMenu = new UIMenu("Mod Menu", "Select An Option!");
modMenuPool.Add(mainMenu);
resetWantedLevel = new UIMenuItem("Reset Wanted Level");
mainMenu.AddItem(resetWantedLevel);
mainMenu.OnItemSelect += onMainMenItemSelect;
}
private void onMainMenItemSelect(UIMenu sender, UIMenuItem item, int index)
{
if(item == resetWantedLevel)
{
if(Game.Player.WantedLevel == 0)
{
UI.ShowSubtitle("~g~You Heve No Wanted Level!");
}
else
{
Game.Player.WantedLevel = 0;
}
}
}
}
}
how do i fix this or do i have to put in a different file?
Link to comment
Share on other sites

  • 3 weeks later...
  • 2 weeks later...
failedguitarist

Hi Guad !

So my gta v run flawlessly with hundreds of addons,Visual V and native ui based script mod,but nowadays it has a noticeable lag and fps drop into 5-10 when activing the menu
ie : press E to show the menu on street race script

Press H to player selector

etc etc the point is its lagging horrendously in my sistem when using the Native UI Related Mod,but when i rename the nativeUI.dll into dlla (attempting to make native ui inactive without deleting it)
it run flawlessly,and no script mod as expected :(

i tried to delete all mods and veryfiying files again (im on steam version) and ran the script mod on vanilla mode and it still extremelly lagging whenever the native ui menu showing up on screen
any idea why?

any help appreciated thanks !
(sorry for my ugly grammar,what did you expect)

In short :

 

native ui script mods killing my fps,is there any solution?

 

my laptop specs are:

 

MSI GE72MVR

Updated WIndows 10
i7 7700HQ @2.80ghz
16GB ram

GTX 1070

Edited by failedguitarist
Link to comment
Share on other sites

  • 9 months later...
Superretro2010

There are older mods that dont work with the later versions of native ui like for example heist project which in my opinion is the closest mod we have to gta 5 online bank heists and cannot be used with any version after 1.0 i believe is it possible backwards compatibility could be implemented for older mods? since this mod uses the scripthook.net framework and not.net 2 framework https://www.gta5-mods.com/scripts/heist-project

Link to comment
Share on other sites

Superretro2010

[22:41:33] [ERROR] Caught fatal unhandled exception:
System.MissingMethodException: Method not found: 'System.Drawing.SizeF NativeUI.UIMenu.GetScreenResolutionMantainRatio()'.
   at HeistProject.BackgroundThread.<.ctor>b__2_0(Object sender, EventArgs args)
   at GTA.Script.raise_Tick(Object value0, EventArgs value1)
   at GTA.Script.MainLoop()
[22:41:33] [ERROR] Caught fatal unhandled exception:
System.MissingMethodException: Method not found: 'System.Drawing.SizeF NativeUI.UIMenu.GetScreenResolutionMantainRatio()'.
   at HeistProject.GUI.MainMenu.TabView.Update()
   at HeistProject.EntryPoint.OnTick(Object sender, EventArgs eventArgs)
   at GTA.Script.raise_Tick(Object value0, EventArgs value1)
   at GTA.Script.MainLoop()
[22:41:38] [ERROR] Script 'HeistProject.EntryPoint' is not responding! Aborting ...
[22:41:38] [DEBUG] Aborted script 'HeistProject.EntryPoint'.

 

i get this error is there a fix?

Link to comment
Share on other sites

  • 2 weeks later...

I want to ask, is there any way to change the hotkeys to showing the NativeUI except "L" ? its disturbing me.. I want change it into "f4" key or another function key. thank you

Link to comment
Share on other sites

On 11/18/2018 at 6:51 AM, Superretro2010 said:

i get this error is there a fix?

@Superretro2010I filed an issue about that a couple of weeks back on Github. I know Guad has fixed it but I don't think he has released a new version yet.

 

If you know how to build the project, you can download the project source and build it to create the fixed version.

 

On 11/29/2018 at 3:26 PM, Verra said:

I want to ask, is there any way to change the hotkeys to showing the NativeUI except "L" ? its disturbing me.. I want change it into "f4" key or another function key. thank you

@VerraNativeUI is just the menu system, it is the mod that uses it that controls which key is used.

 

If you find which mod uses 'L', see if there is an ini file for it. If there is, there should be an option in the ini file to change the key used to open the menu.

Edited by Guest
Link to comment
Share on other sites

  • 6 months later...
  • 3 months later...
davidintel1965

What do I do with the NativeUI.xml that comes with this, it is not mentioned anywhere in the readme?

Link to comment
Share on other sites

  • 2 months later...
  • 2 weeks later...

I post this for the conflict between NativeUI (1.8/1.9/1.9.1) and Map Editor:

 

I've tried to run "map editor" without any mods, with NativeUI 1.7, and another time with the NativeUI included in the mod: always the same error message in the "SHVDN" logs.
I've also tried it without shvdn3, and another time too, without shvdn3&2 and always the same error: 

https://pastebin.com/en0rb1kS (both EN & FR logs versions)

 

@Guad I hope your next NativeUI version will fix this issue, because the "map editor" mod is conflicting with nativeUI since 1.8, and we have to do a choice between map editor and some other recent mods that can't handle old versions of nativeUI (betterChases+ is the best example).
The map editor is one of the most useful mods in GTAV, and it deserves to be compatible with last nativeUI.

So, if you don't planned to update nativeUI for a while, can you consider to update the mod (fast fix only) to give it back compatible with nativeUI 1.9.1?

Edited by KerozeN
corrections
Link to comment
Share on other sites

  • 3 months later...

TabView does not work. Please tell me how to properly display TabView.

public class MenuScript : Script
{
    private TabView _tabView = new TabView("Test TabView  title");
    private bool _showMenu = false;
    public MenuScript()
    {
        _tabView.Tabs.Add(new TabTextItem("TestTabTextItemName", "TestTabTextItemTest"));

        Tick += (sender, args) =>
        {
            if (_showMenu)
                _tabView.Update();
        };

        KeyDown += (sender, args) =>
        {
            if (args.KeyCode == Keys.Add)
            {
                _showMenu = !_showMenu;
                _tabView.Visible = _showMenu;
                UI.ShowSubtitle(_showMenu ? "Activated" : "Deactivated");
            }
        };
    }
}

Help me

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • 7 Users Currently Viewing
    0 members, 0 Anonymous, 7 Guests

×
×
  • Create New...

Important Information

By using GTAForums.com, you agree to our Terms of Use and Privacy Policy.