ayylmao420 Posted February 1, 2016 Share Posted February 1, 2016 Hey Guad awesome work. I just downloaded and was trying out the menu and options. But when i open the menu my fps drops to 30 for like 1 second and if i hit F8 over and over the menu just keeps opening more menus.Also when i go into my submenu fps drops again and sometimes when i go past the 10th item in a submenu fps drops again or if i jump to the last item in the sub menu. Is there anyway to fix this? My code. public class Main : Script { private MenuPool _menuPool; private UIMenu mainMenu; private UIMenu SubMenuSM; private bool Godmode = false; public Main() { KeyUp += OnKeyUp; Tick += OnTick; _menuPool = new MenuPool(); } private void OnKeyUp(object sender, KeyEventArgs e) { if (e.KeyCode == Keys.F8) // Change keys here. { this.StartUpMenu(); } } private void OnTick(object sender, EventArgs e) { _menuPool.ProcessMenus(); } private UIMenu StartUpMenu() { mainMenu = new UIMenu("TEST", "~b~Main Menu"); _menuPool.Add(mainMenu); //SubMenu UIMenuItem MenuuiMenuItem = new UIMenuItem("Menu 1"); mainMenu.AddItem(MenuuiMenuItem); mainMenu.BindMenuToItem(SubMenu(), MenuuiMenuItem); mainMenu.Visible = !mainMenu.Visible; return mainMenu; } private UIMenu SubMenu() { SubMenuSM = new UIMenu("Sub Menu", "~b~TEST: Sub Menu"); _menuPool.Add(SubMenuSM); //CheckBox var godmode = new UIMenuCheckboxItem("Godmode", Godmode, "Toggle Godmode On/Off."); SubMenuSM.AddItem(godmode); SubMenuSM.OnCheckboxChange += (sender, item, checked_) => { if (item == godmode) { switch (checked_) { case true: Godmode = true; Game.Player.Character.IsInvincible = true; break; case false: Godmode = false; Game.Player.Character.IsInvincible = false; break; } Godmode = checked_; UI.Notify("~r~Godmode status: ~b~" + Godmode); } }; //Button var FixPlayer = new UIMenuItem("Fix Player", "Fix's Player."); SubMenuSM.AddItem(FixPlayer); SubMenuSM.OnItemSelect += (sender, item, index) => { if (item == FixPlayer) { UI.Notify("~g~Player Fixed!"); } }; //List View var WantedLevels = new List<dynamic> { 0, 1, 2, 3, 4, 5, }; var wantedLevel = new UIMenuListItem("Wanted Level", WantedLevels, 0); SubMenuSM.AddItem(wantedLevel); SubMenuSM.OnListChange += (sender, item, index) => { if (item == wantedLevel) { switch (index) { case 1: Game.Player.WantedLevel = 1; break; case 2: Game.Player.WantedLevel = 2; break; case 3: Game.Player.WantedLevel = 3; break; case 4: Game.Player.WantedLevel = 4; break; case 5: Game.Player.WantedLevel = 5; break; default: Game.Player.WantedLevel = 0; break; } } }; //Filler var lulz = new UIMenuItem("lulz", "lulz Player."); for (int i = 0; i < 10; i++) SubMenuSM.AddItem(new UIMenuItem("PageFiller", "Sample description that takes more than one line. Moreso, it takes way more than two lines since it's so long. Wow, check out this length!")); SubMenuSM.RefreshIndex(); return SubMenuSM; } You are creating a new menu every time you press F8, don't do that. Create the menu on start and flip the Visible property on your existing menu when you press F8. Got it! Thanks for the help. Is your a way i can PM you? Yeah, go to my profile and press Send me a message. hi man, how to create pause menu? can you please give example on how to use new tabview? Link to comment https://gtaforums.com/topic/809284-net-nativeui/page/6/#findComment-1068454000 Share on other sites More sharing options...
Guad Posted February 1, 2016 Author Share Posted February 1, 2016 Hey Guad awesome work. I just downloaded and was trying out the menu and options. But when i open the menu my fps drops to 30 for like 1 second and if i hit F8 over and over the menu just keeps opening more menus.Also when i go into my submenu fps drops again and sometimes when i go past the 10th item in a submenu fps drops again or if i jump to the last item in the sub menu. Is there anyway to fix this? My code. public class Main : Script { private MenuPool _menuPool; private UIMenu mainMenu; private UIMenu SubMenuSM; private bool Godmode = false; public Main() { KeyUp += OnKeyUp; Tick += OnTick; _menuPool = new MenuPool(); } private void OnKeyUp(object sender, KeyEventArgs e) { if (e.KeyCode == Keys.F8) // Change keys here. { this.StartUpMenu(); } } private void OnTick(object sender, EventArgs e) { _menuPool.ProcessMenus(); } private UIMenu StartUpMenu() { mainMenu = new UIMenu("TEST", "~b~Main Menu"); _menuPool.Add(mainMenu); //SubMenu UIMenuItem MenuuiMenuItem = new UIMenuItem("Menu 1"); mainMenu.AddItem(MenuuiMenuItem); mainMenu.BindMenuToItem(SubMenu(), MenuuiMenuItem); mainMenu.Visible = !mainMenu.Visible; return mainMenu; } private UIMenu SubMenu() { SubMenuSM = new UIMenu("Sub Menu", "~b~TEST: Sub Menu"); _menuPool.Add(SubMenuSM); //CheckBox var godmode = new UIMenuCheckboxItem("Godmode", Godmode, "Toggle Godmode On/Off."); SubMenuSM.AddItem(godmode); SubMenuSM.OnCheckboxChange += (sender, item, checked_) => { if (item == godmode) { switch (checked_) { case true: Godmode = true; Game.Player.Character.IsInvincible = true; break; case false: Godmode = false; Game.Player.Character.IsInvincible = false; break; } Godmode = checked_; UI.Notify("~r~Godmode status: ~b~" + Godmode); } }; //Button var FixPlayer = new UIMenuItem("Fix Player", "Fix's Player."); SubMenuSM.AddItem(FixPlayer); SubMenuSM.OnItemSelect += (sender, item, index) => { if (item == FixPlayer) { UI.Notify("~g~Player Fixed!"); } }; //List View var WantedLevels = new List<dynamic> { 0, 1, 2, 3, 4, 5, }; var wantedLevel = new UIMenuListItem("Wanted Level", WantedLevels, 0); SubMenuSM.AddItem(wantedLevel); SubMenuSM.OnListChange += (sender, item, index) => { if (item == wantedLevel) { switch (index) { case 1: Game.Player.WantedLevel = 1; break; case 2: Game.Player.WantedLevel = 2; break; case 3: Game.Player.WantedLevel = 3; break; case 4: Game.Player.WantedLevel = 4; break; case 5: Game.Player.WantedLevel = 5; break; default: Game.Player.WantedLevel = 0; break; } } }; //Filler var lulz = new UIMenuItem("lulz", "lulz Player."); for (int i = 0; i < 10; i++) SubMenuSM.AddItem(new UIMenuItem("PageFiller", "Sample description that takes more than one line. Moreso, it takes way more than two lines since it's so long. Wow, check out this length!")); SubMenuSM.RefreshIndex(); return SubMenuSM; } You are creating a new menu every time you press F8, don't do that. Create the menu on start and flip the Visible property on your existing menu when you press F8. Got it! Thanks for the help. Is your a way i can PM you? Yeah, go to my profile and press Send me a message. hi man, how to create pause menu? can you please give example on how to use new tabview? Create your tabview. Then start adding your tabs with myTabView.Tabs.Add(). Then call .Update() on tick to draw the menu. e.g. var tabView = new TabView("Grand Theft Auto V");tabView.Tabs.Add(new TabTextItem("Test", "test")); // OnTicktabView.Update(); Link to comment https://gtaforums.com/topic/809284-net-nativeui/page/6/#findComment-1068455106 Share on other sites More sharing options...
Krashadam Posted February 2, 2016 Share Posted February 2, 2016 1.5 would be good... Link to comment https://gtaforums.com/topic/809284-net-nativeui/page/6/#findComment-1068456602 Share on other sites More sharing options...
torguin Posted February 2, 2016 Share Posted February 2, 2016 So signed up just to report a "glitch". When ever I die or get busted the "wasted or busted" overlay persists and wont go away when i respawn. Luckily I had 1.5 i think saved and it works normally. Just a heads up. Anyways great work Guad. Link to comment https://gtaforums.com/topic/809284-net-nativeui/page/6/#findComment-1068457350 Share on other sites More sharing options...
Guad Posted February 2, 2016 Author Share Posted February 2, 2016 So signed up just to report a "glitch". When ever I die or get busted the "wasted or busted" overlay persists and wont go away when i respawn. Luckily I had 1.5 i think saved and it works normally. Just a heads up. Anyways great work Guad. Fixed, thanks for the report. torguin 1 Link to comment https://gtaforums.com/topic/809284-net-nativeui/page/6/#findComment-1068457708 Share on other sites More sharing options...
GeorgeZhang Posted February 2, 2016 Share Posted February 2, 2016 (edited) Wonderful Update !! I have few questions. 1.I haven't switch to 1.6/1.6.1 and I wish to know how to make big messages with NativeUI? 2.Do big messages here have the sound effects ? I can't find the sound to play. 3.Do you plan to add Mission Passed Screen ? The class you provided in NOoSE source is very cool and helpful. Edit: by asking how to, I meant I read the wiki but I don't know how to execute it? Edited February 2, 2016 by GeorgeZhang Link to comment https://gtaforums.com/topic/809284-net-nativeui/page/6/#findComment-1068458239 Share on other sites More sharing options...
Guad Posted February 2, 2016 Author Share Posted February 2, 2016 Wonderful Update !! I have few questions. 1.I haven't switch to 1.6/1.6.1 and I wish to know how to make big messages with NativeUI? 2.Do big messages here have the sound effects ? I can't find the sound to play. 3.Do you plan to add Mission Passed Screen ? The class you provided in NOoSE source is very cool and helpful. Edit: by asking how to, I meant I read the wiki but I don't know how to execute it? You call it like any other method: BigMessageThread.MessageInstance.ShowMissionPassedMessage("Hello!"); No it doesn't have any sound effects. Dunno, it's pretty ugly though. Link to comment https://gtaforums.com/topic/809284-net-nativeui/page/6/#findComment-1068459741 Share on other sites More sharing options...
GeorgeZhang Posted February 3, 2016 Share Posted February 3, 2016 Wonderful Update !! I have few questions. 1.I haven't switch to 1.6/1.6.1 and I wish to know how to make big messages with NativeUI? 2.Do big messages here have the sound effects ? I can't find the sound to play. 3.Do you plan to add Mission Passed Screen ? The class you provided in NOoSE source is very cool and helpful. Edit: by asking how to, I meant I read the wiki but I don't know how to execute it? You call it like any other method: BigMessageThread.MessageInstance.ShowMissionPassedMessage("Hello!"); No it doesn't have any sound effects. Dunno, it's pretty ugly though. Ok thanks. I've another problem here: One of player encountered this "Fatal: directx texture 'C:\Users\Администратор\AppData\Local\Temp\tmp4E4B.tmp' creation failed" However, none others have the problem. I have embedded my custom sprite, and the path is Sprite.WriteFileFromResources(Assembly.GetExecutingAssembly(), "Gang_War_Standalone.gangwarsprite_template.png") I call it only once at startup. The player having this issue has re-installed .net framework and redis- pack and run his game as administrator. I don't know how to help him because 1.no idea what caused it 2.it works fine for me and other players. Can you help? Link to comment https://gtaforums.com/topic/809284-net-nativeui/page/6/#findComment-1068460854 Share on other sites More sharing options...
Bkp666 Posted February 3, 2016 Share Posted February 3, 2016 Hello, I think that NativeUI is causing a strange issue, sometimes when I am entering Snapmatic the controls at the bottom disappear(it will look like this: http://i.imgur.com/AeOb8Fi.jpg ) And is not happening straight away when I load the game but after some time, and when I remove NativeUI from the scripts folder, Snapmatic is fine. I don't have any other scripts or mods installed, just ScriptHookV and ScriptHookV .Net Link to comment https://gtaforums.com/topic/809284-net-nativeui/page/6/#findComment-1068462913 Share on other sites More sharing options...
Guad Posted February 3, 2016 Author Share Posted February 3, 2016 Wonderful Update !! I have few questions. 1.I haven't switch to 1.6/1.6.1 and I wish to know how to make big messages with NativeUI? 2.Do big messages here have the sound effects ? I can't find the sound to play. 3.Do you plan to add Mission Passed Screen ? The class you provided in NOoSE source is very cool and helpful. Edit: by asking how to, I meant I read the wiki but I don't know how to execute it? You call it like any other method: BigMessageThread.MessageInstance.ShowMissionPassedMessage("Hello!"); No it doesn't have any sound effects. Dunno, it's pretty ugly though. Ok thanks. I've another problem here: One of player encountered this "Fatal: directx texture 'C:\Users\Администратор\AppData\Local\Temp\tmp4E4B.tmp' creation failed" However, none others have the problem. I have embedded my custom sprite, and the path is Sprite.WriteFileFromResources(Assembly.GetExecutingAssembly(), "Gang_War_Standalone.gangwarsprite_template.png") I call it only once at startup. The player having this issue has re-installed .net framework and redis- pack and run his game as administrator. I don't know how to help him because 1.no idea what caused it 2.it works fine for me and other players. Can you help? This is caused by ScriptHookV not being able to read the file. By looking at the path my best guess is that ScriptHookV doesn't support unicode characters in the filepath, so tell him to either log in as a different user, or extract the files to GTA5 directory. Link to comment https://gtaforums.com/topic/809284-net-nativeui/page/6/#findComment-1068463496 Share on other sites More sharing options...
Guad Posted February 3, 2016 Author Share Posted February 3, 2016 Hello, I think that NativeUI is causing a strange issue, sometimes when I am entering Snapmatic the controls at the bottom disappear(it will look like this: http://i.imgur.com/AeOb8Fi.jpg ) And is not happening straight away when I load the game but after some time, and when I remove NativeUI from the scripts folder, Snapmatic is fine. I don't have any other scripts or mods installed, just ScriptHookV and ScriptHookV .Net Thanks, I'll look into it. Link to comment https://gtaforums.com/topic/809284-net-nativeui/page/6/#findComment-1068463561 Share on other sites More sharing options...
Rugz007 Posted February 27, 2016 Share Posted February 27, 2016 how to make big message text red? I want it for mission failed. Link to comment https://gtaforums.com/topic/809284-net-nativeui/page/6/#findComment-1068551637 Share on other sites More sharing options...
qiangqiang101 Posted February 27, 2016 Share Posted February 27, 2016 how to make big message text red? I want it for mission failed. "~r~RED TEXT" "~y~YELLOW TEXT" "~w~WHITE TEXT" "~b~BLUE TEXT" "~g~GREEN TEXT" "~r~RED ~w~AND ~b~BLUE" Link to comment https://gtaforums.com/topic/809284-net-nativeui/page/6/#findComment-1068552307 Share on other sites More sharing options...
unknown modder Posted May 14, 2016 Share Posted May 14, 2016 May seem like an odd request, but could you support for a listmenuitem which also has a checkbox. I dont like having an off option in a list of settings Link to comment https://gtaforums.com/topic/809284-net-nativeui/page/6/#findComment-1068770532 Share on other sites More sharing options...
Guad Posted May 15, 2016 Author Share Posted May 15, 2016 May seem like an odd request, but could you support for a listmenuitem which also has a checkbox. I dont like having an off option in a list of settings How would that look? Like < Some text [X] > or just < [X] >? Should all items have checkboxes? Link to comment https://gtaforums.com/topic/809284-net-nativeui/page/6/#findComment-1068771451 Share on other sites More sharing options...
unknown modder Posted May 15, 2016 Share Posted May 15, 2016 (edited) May seem like an odd request, but could you support for a listmenuitem which also has a checkbox. I dont like having an off option in a list of settings How would that look? Like < Some text [X] > or just < [X] >? Should all items have checkboxes? I was thinking like {Item Text <List> [X] }. I just think that would be nicer than having Off or None in a list. Only 1 checkbox though, checkboxes in the list would be pretty confusing. Im able to create a new class that looks correct, but as controls are handled in UIMenu I cannot edit the items Edited May 15, 2016 by unknown modder Link to comment https://gtaforums.com/topic/809284-net-nativeui/page/6/#findComment-1068771870 Share on other sites More sharing options...
Guad Posted May 16, 2016 Author Share Posted May 16, 2016 May seem like an odd request, but could you support for a listmenuitem which also has a checkbox. I dont like having an off option in a list of settings How would that look? Like < Some text [X] > or just < [X] >? Should all items have checkboxes? I was thinking like {Item Text <List> [X] }. I just think that would be nicer than having Off or None in a list. Only 1 checkbox though, checkboxes in the list would be pretty confusing. Im able to create a new class that looks correct, but as controls are handled in UIMenu I cannot edit the items I see, that looks very specific. I'll include a way to completely customize items and menus by overriding controls. Link to comment https://gtaforums.com/topic/809284-net-nativeui/page/6/#findComment-1068773595 Share on other sites More sharing options...
unknown modder Posted May 17, 2016 Share Posted May 17, 2016 I see, that looks very specific. I'll include a way to completely customize items and menus by overriding controls. Yeah, that would be a nicer idea, letting menu items handle control inputs instead of the menu class Link to comment https://gtaforums.com/topic/809284-net-nativeui/page/6/#findComment-1068775395 Share on other sites More sharing options...
Willco2 Posted May 24, 2016 Share Posted May 24, 2016 (edited) Great work on this mod! Makes for some amazing looking menus that really fit the game. Edited May 24, 2016 by Willco2 Link to comment https://gtaforums.com/topic/809284-net-nativeui/page/6/#findComment-1068790743 Share on other sites More sharing options...
Jezperr Posted June 2, 2016 Share Posted June 2, 2016 I'm sorry if this is sort of irrelevant (I'm a beginner with C languages) but I made a small little menu, and it's in .cs... But how do I make it a .dll file? Link to comment https://gtaforums.com/topic/809284-net-nativeui/page/6/#findComment-1068813850 Share on other sites More sharing options...
Guad Posted June 2, 2016 Author Share Posted June 2, 2016 I'm sorry if this is sort of irrelevant (I'm a beginner with C languages) but I made a small little menu, and it's in .cs... But how do I make it a .dll file? You need to compile it. Use Visual Studio, or the command line. Link to comment https://gtaforums.com/topic/809284-net-nativeui/page/6/#findComment-1068814953 Share on other sites More sharing options...
Jezperr Posted June 2, 2016 Share Posted June 2, 2016 (edited) I'm sorry if this is sort of irrelevant (I'm a beginner with C languages) but I made a small little menu, and it's in .cs... But how do I make it a .dll file? You need to compile it. Use Visual Studio, or the command line. Ok so I made a C# Class Library, copied and pasted the .cs code and built the .dll, but pressing the hotkey ingame does nothing. I also added both NativeUI and ScriptHookVDotNet into the .cs and put the .dll in the scripts folder. Help? Edited June 2, 2016 by Jezperr Link to comment https://gtaforums.com/topic/809284-net-nativeui/page/6/#findComment-1068815248 Share on other sites More sharing options...
Guad Posted June 2, 2016 Author Share Posted June 2, 2016 Post your ScriptHookVDotNet-[date].log Link to comment https://gtaforums.com/topic/809284-net-nativeui/page/6/#findComment-1068815694 Share on other sites More sharing options...
Jezperr Posted June 3, 2016 Share Posted June 3, 2016 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 Link to comment https://gtaforums.com/topic/809284-net-nativeui/page/6/#findComment-1068818001 Share on other sites More sharing options...
nkjellman Posted June 3, 2016 Share Posted June 3, 2016 @Guad: Would it be possible to update the UI to have the wardrobe/clothing store/barber/tattoo parlor interface? The UI is the same, but the sounds when you move the courser, select, and go back are all different. Link to comment https://gtaforums.com/topic/809284-net-nativeui/page/6/#findComment-1068818395 Share on other sites More sharing options...
unknown modder Posted June 4, 2016 Share Posted June 4, 2016 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 Link to comment https://gtaforums.com/topic/809284-net-nativeui/page/6/#findComment-1068818520 Share on other sites More sharing options...
Jezperr Posted June 4, 2016 Share Posted June 4, 2016 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 Link to comment https://gtaforums.com/topic/809284-net-nativeui/page/6/#findComment-1068818670 Share on other sites More sharing options...
unknown modder Posted June 4, 2016 Share Posted June 4, 2016 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 Link to comment https://gtaforums.com/topic/809284-net-nativeui/page/6/#findComment-1068819172 Share on other sites More sharing options...
Guad Posted June 4, 2016 Author Share Posted June 4, 2016 @Guad: Would it be possible to update the UI to have the wardrobe/clothing store/barber/tattoo parlor interface? The UI is the same, but the sounds when you move the courser, select, and go back are all different. You can change the audio files as you want with myMenu.AUDIO_LIBRARY = "whatever". The default values are public string AUDIO_LIBRARY = "HUD_FRONTEND_DEFAULT_SOUNDSET";public string AUDIO_UPDOWN = "NAV_UP_DOWN";public string AUDIO_LEFTRIGHT = "NAV_LEFT_RIGHT";public string AUDIO_SELECT = "SELECT";public string AUDIO_BACK = "BACK";public string AUDIO_ERROR = "ERROR"; Link to comment https://gtaforums.com/topic/809284-net-nativeui/page/6/#findComment-1068819603 Share on other sites More sharing options...
Jezperr Posted June 4, 2016 Share Posted June 4, 2016 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 Link to comment https://gtaforums.com/topic/809284-net-nativeui/page/6/#findComment-1068819675 Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now