RAGENativeUI is a library for RAGEPluginHook that helps you to quickly and easily build Rockstar-like menus and UIs.
Copy RAGENativeUI.dll to main GTAV directory.
Thanks to Guad for creating NativeUI. This project started as a fork of NativeUI.
License: MIT License
RAGENativeUI is a library for RAGEPluginHook that helps you to quickly and easily build Rockstar-like menus and UIs.
Copy RAGENativeUI.dll to main GTAV directory.
Thanks to Guad for creating NativeUI. This project started as a fork of NativeUI.
Currently menus scroll after 9 items. This is a const
. Please make it changeable on a per-UIMenu basis.
Whenever a user tries to switch menus with a UIMenuListItem and consequently a UIMenuSwitchMenusItem, it scrolls through into the next menus, resulting in the same menu staying open forever until the user 'gets lucky'. This problem was already there in 1.4.1, but got far worse in 1.5.0.0.
It would be useful if LSPDFR plugins (running in the same AppDomain) could know if another plugin is rendering a menu, to avoid mulitple menus being visible at once. Is it possible, even across pools, to have a bool to indicate if any Menu.IsVisible
?
I would like to be able to change the text for the default "Enter"/"Accept" InstructionalButton from saying "Select" to saying something custom. There doesn't appear to be any way to clear the default instructional buttons, and disabling them entirely isn't desired.
In the version 1.0 you can't use custom banner(external images i.e. a png) for the title.
This will be added in a future release.
Probably because MenuTheme.Draw is executed in the frame render
Add T_
, w_
and b_
.
See this example from the vanilla game:
Currently it crashes:
[4/11/2020 10:57:26 PM.835] MenuExample:
[4/11/2020 10:57:26 PM.836] MenuExample: ==============================
[4/11/2020 10:57:26 PM.837] MenuExample: UNHANDLED EXCEPTION DURING GAME FIBER TICK
[4/11/2020 10:57:26 PM.837] MenuExample: ------------------------------
[4/11/2020 10:57:26 PM.837] MenuExample: Origin: Game fiber "<UNNAMED THREAD>".
[4/11/2020 10:57:26 PM.838] MenuExample: ------------------------------
[4/11/2020 10:57:26 PM.838] MenuExample: Exception type: System.DivideByZeroException
[4/11/2020 10:57:26 PM.838] MenuExample: Exception message: Attempted to divide by zero.
[4/11/2020 10:57:26 PM.839] MenuExample: ------------------------------
[4/11/2020 10:57:26 PM.839] MenuExample: Inner exceptions:
[4/11/2020 10:57:26 PM.839] MenuExample: ------------------------------
[4/11/2020 10:57:26 PM.840] MenuExample: Stack trace:
[4/11/2020 10:57:26 PM.840] MenuExample: at RAGENativeUI.UIMenu.Draw() in E:\programming\RAGENativeUI\Source\UIMenu.cs:line 541
[4/11/2020 10:57:26 PM.840] at RAGENativeUI.MenuPool.ProcessMenus() in E:\programming\RAGENativeUI\Source\MenuPool.cs:line 164
[4/11/2020 10:57:26 PM.841] at MenuExample.EntryPoint.ProcessLoop() in E:\programming\RAGENativeUIExamples\MenuExampleProject\MenuExample.cs:line 238
[4/11/2020 10:57:26 PM.841] at Rage.GameFiber.Main()
[4/11/2020 10:57:26 PM.841] MenuExample: ==============================
[4/11/2020 10:57:26 PM.841] MenuExample:
There is a 2.0 version and we should start using the NuGet package instead of having the .exe in the repo.
For adding menus to menu pools, and adding menu items to menus, it would be helpful to have an overload for the Add/AddItem method which takes params UIMenu[]
or params UIMenuItem[]
and likewise IEnumerable<UIMenu>
or IEnumerable<UIMenuItem>
to allow for registering multiple menus/menu items at once.
Using object
for the underlying values on UIListMenuItem
breaks the C# type system. It would be preferable to have a generic version of UIListMenuItem
and IDisplayItem
.
interface IDisplayItem<T>
{
T Value { get; }
string DisplayText { get; }
}
class UIMenuListItem<T>
{
public UIMenuListItem<T>(string text, string description, IEnumerable<IDisplayItem<T>> items) {}
}
If the Invoke
method of the PropertyType
is overloaded, the following code will throw an AmbiguousMatchException.
MethodInfo invokeMethod = prop.PropertyType.GetMethod("Invoke");
We should use the GetMethod
overloads to only get the methods with either of the following signatures
void Invoke();
void Invoke(MenuItem item);
Additionally, if both are present, which one should we take? Should we execute both?
See #35.
See use-compiler-services-unsafe branch.
Need to wait for C# 8, currently the branch uses preview versions of C# 8 and Roslyn 3.1
the zip file will not open. says invalid or empty zip. Needing the RAGENativeUI.dll file
https://github.com/alexguirre/RAGENativeUI/blob/master/Source/MenuPool.cs#L148
MenuPool.Process (and the related process functions it calls) use foreach
loops. This means that if a menu has an event handler which itself adds/removes menus, you will get a System.InvalidOperationException for modifying an enumerable while in a foreach loop.
Instead, consider using a for
loop, or doing a foreach
on InternalList.ToArray()
I saw FPS drop from 70 to 40 when the Native UI is opened (e.g. traffic stop, EUP menu)
I am using GTA V patch 1290 with RPH 0.59
If set, its contents are shown as the menu description instead of the description of the current item.
The SetKey(Common.MenuControls control, Keys keyToSet) overload isn't working. It might be related to the HasControlJustBeenPressed(), HasControlJustBeenReleased() and IsControlBeingPressed() methods.
The other overload methods (SetKey(Common.MenuControls control, GameControl gtaControl) and SetKey(Common.MenuControls control, GameControl gtaControl, int index)) work.
Basically the menu doesn't work with Keys enum.
Hey.
I'm not able to load the plugin.
ERROR: Could not load plugin from "C:........\Plugins\RAGENativeUI.dll" Assembly RAGENativeUI.dll (RAGENativeUI, Version=1.4.1.0, Culture=neutral, PublicKeyToken=null) does not have the required Plugin attribute. Paramaternavn: assemblyPath
I'm trying to load it in RAGE Plugin Hook - Open Alpha - 0.39.946.8098 - a fresh install, with no other plugins installed prior to this.
I need this plugin to get RAGE_Transportation to work.
Am I doing something wrong?
This plugin doesn't show up in RPH Plugins Options either. But the other plugin I'm trying to get to work is showing.
Hi, there is compability problem with eslint.
"[eslint] A function with a name starting with an uppercase letter should only be used as a constructor. (new-cap)"
It's on AddItem or SetRightBadge methods for example.
It should allow the user to use any texture, not only the predefined ones.
Can you implement a way to provide a configuration file for setting the Container size? I have a three monitor setup and I can barely see any options. Alternatively you can calculate the size based on the current window size and then keep the ratio you want (What I assume LSPDFR is doing)
Line 180 in 9fc2800
Replace the remaining places where it is used with _BEGIN_TEXT_COMMAND_GET_WIDTH
/_END_TEXT_COMMAND_GET_WIDTH
and mark it as obsolete.
Hey! Now wiki uses a constructor which is obsolete, please change this. Thanks.
Recently me and a few others have problems with viewing the court data in the Britisch Police Script.
Everytime I press F9 and go to the court data it crashes.
RagePluginHook.log
[25-9-2018 20:01:31.323] LSPD First Response:
[25-9-2018 20:01:31.324] LSPD First Response: ==============================
[25-9-2018 20:01:31.325] LSPD First Response: UNHANDLED EXCEPTION DURING GAME FIBER TICK
[25-9-2018 20:01:31.325] LSPD First Response: ------------------------------
[25-9-2018 20:01:31.326] LSPD First Response: Origin: Rage.SleeplessGameFiber
[25-9-2018 20:01:31.326] LSPD First Response: ------------------------------
[25-9-2018 20:01:31.326] LSPD First Response: Exception type: System.NullReferenceException
[25-9-2018 20:01:31.327] LSPD First Response: Exception message: De objectverwijzing is niet op een exemplaar van een object ingesteld.
[25-9-2018 20:01:31.328] LSPD First Response: ------------------------------
[25-9-2018 20:01:31.328] LSPD First Response: Inner exceptions:
[25-9-2018 20:01:31.329] LSPD First Response: ------------------------------
[25-9-2018 20:01:31.329] LSPD First Response: Stack trace:
[25-9-2018 20:01:31.330] LSPD First Response: bij RAGENativeUI.PauseMenu.TabSubmenuItem.ProcessControls()
[25-9-2018 20:01:31.330] bij RAGENativeUI.PauseMenu.TabView.ProcessControls()
[25-9-2018 20:01:31.331] bij RAGENativeUI.PauseMenu.TabView.Update()
[25-9-2018 20:01:31.331] bij ????????????????????????????????????????.?????????????????????????????????????????(Object , GraphicsEventArgs )
[25-9-2018 20:01:31.332] bij System.EventHandler`1.Invoke(Object sender, TEventArgs e)
[25-9-2018 20:01:31.332] bij Rage.Game.RaiseFrameRender(GraphicsEventArgs e)
[25-9-2018 20:01:31.333] bij Rage.RemotePlugin.HandleRenderFiber()
[25-9-2018 20:01:31.334] bij Rage.GameFiber.Main()
[25-9-2018 20:01:31.334] LSPD First Response: ==============================
[25-9-2018 20:01:31.334] LSPD First Response:
[25-9-2018 20:01:33.757] LSPD First Response: All signs removed
[25-9-2018 20:01:33.907] LSPD First Response: NewsHeliPursuit exited
[25-9-2018 20:01:34.177] LSPD First Response: System.Threading.ThreadAbortException: De thread is afgebroken.
[25-9-2018 20:01:34.182] bij Rage.GameFiber.SleepThis(Int32 duration)
[25-9-2018 20:01:34.185] bij Rage.GameFiber.Sleep(Int32 duration)
[25-9-2018 20:01:34.185] bij Rage.Task.WaitForStatus(TaskStatus status, Int32 timeout)
[25-9-2018 20:01:34.194] bij Rage.Task.WaitForCompletion()
[25-9-2018 20:01:34.200] bij ?????????????????????????????????????????.?????????????????????????????????????????()
[25-9-2018 20:01:34.204] bij ?????????????????????????????????????????.?????????????????????????????????????????()
[25-9-2018 20:01:34.207] LSPD First Response: Added ambient event fibers to cleanup
Currently, examples cannot be easily built after cloning the repo or on CI. Add a new .csproj
containing all the examples and make the necessary changes so only one plugin needed (i.e. using commands to start each example).
Additionally, build the examples on CI.
I saw in the TabView.cs code that you commented the lines to display and support mouse cursor.
Why did you do it?
The PauseMenu is a really good infrastructure to build a police computer for LSPDFR which is I'm now trying to do.
Any example images in the wiki fail to load.
Hi! Your download link for RageNativeUI.zip, v. 1.6, downloads an empty file to my network. It seems to be a broken asset because we can download 1.5.1 correctly.
When opening a child menu or going back to the parent menu, there is like one tick in which the new menu is not drawn.
Currently timer bars are missing some features seen in the vanilla game.
all_white_bg
on top of the timer bar background.Event that triggers when the menu becomes visible.
Need to port the PauseMenu API to v2.0.
Can we reuse the game's pause menu system?
I had a disabled list item for one of my plugins, however, it could still be changed. I had it disabled to prevent crashes when a player wasn't in a vehicle.
The navigation bar should not be visible if the menu has no items.
Using 1.6.2 on patch 1290/RPH 0.60
Unfortunately the FPS still drops when player is approaching the stopped driver.
The good thing is, when we press E to open traffic stop menu, the FPS is back up.
I have no idea. perhaps it's also related to traffic policer which suppresses the original LSPDFR traffic stop menu plugin.
Opening EUP menu, the FPS is still dropping but better than before.
Add a feature/code to have a global of all menus. For example, different plugins can do something like MenuPool.AddToGlobalMenu(MyMainMenu).
The global menu will be a compilation of all menus so that players can just activate the global menu and cycle through whatever menus were added. This way it'll free up keybinds and also be a major relief for controller players, as they can just press thr activation buttons to access all the menus for the various mods.
if GTA V is configured to start with 57601080 Resolution
( 3 x (19201080) screens vertical setup)
the RAGENativeUI is squished and the UI is unreadable.
Reproduction Example:
open the Ultimate Backup UI.
See menu-template branch.
Allows the user to create a Menu
based on the properties and methods of a class that inherits MenuTemplate
via attributes.
All item attributes specifiy at least three properties: Name
, Text
and Description
. Name
is used to reference the MenuItem
(for example, to access the MenuItem
instance with MenuTemplate.GetItemByName
), if null, the property name will be used.
Base class for menu templates. Implements INotifyPropertyChanged
.
The method BuildMenu
creates the menu and sets the property Menu
.
Defines the basic properties of a Menu
: Title
, Subtitle
and Theme
. Required to build the menu from a template class.
[Menu(Title = "My Menu", Subtitle = "Subtitle for my menu")]
private class TestMenu : MenuTemplate
Defines a property as a MenuItem
. The property type must be a delegate or a type that has an Invoke
method with either of the following signatures:
void Invoke();
void Invoke(MenuItem);
The delegate or method will be executed when the MenuItem.Activated
event is raised.
[MenuItem(Text = "ItemText", Description "ItemDescription")]
private Action BasicItem { get; }
[MenuItem(Text = "ItemText", Description "ItemDescription")]
private Action<MenuItem> BasicItem2 { get; }
[MenuItem(Text = "ItemText", Description "ItemDescription")]
private InvokableClass ItemWithCustomClass { get; } = new InvokableClass();
// ...
private class InvokableClass
{
public void Invoke()
{
// ...
}
}
Defines a property as a MenuItemCheckbox
. The property type must be bool
. If the create checkbox item is checked or unchecked the property value will be updated. And in the other way around, if the property setter raises the INotifyPropertyChanged.PropertyChanged
event, changing the value via the property setter the checkbox item IsChecked
property will be updated too.
[MenuItemCheckbox(Text = "ItemText")]
public bool BoolValue
{
get => boolValue;
set => SetProperty(ref doSomeOtherThing, value);
}
Note, SetProperty
is a method provided by MenuTemplate
that raises the PropertyChanged
event.
Similar to MenuItemCheckboxAttribute
but for properties of numeric types. Also provides properties to customize the MenuItemNumericScroller
created: Minimum
, Maximum
, Increment
, ThousandsSeparator
, Hexadecimal
and DecimalPlaces
.
[MenuItemNumericScroller(Text = "ItemText")]
public float FloatValue
{
get => floatValue;
set => SetProperty(ref floatValue, value);
}
[MenuItemNumericScroller(Text = "ItemText", Increment = 1.0, DecimalPlaces = 0)]
public int IntValue
{
get => intValue;
set => SetProperty(ref intValue, value, nameof(IntValue), nameof(IntValueAsHex));
}
[MenuItemNumericScroller(Text = "Int Value as Hex", Increment = 1.0, DecimalPlaces = 0, Hexadecimal = true)]
private int IntValueAsHex
{
get => IntValue;
set => IntValue = value;
}
Similar to MenuItemCheckboxAttribute
and MenuItemNumericScrollerAttribute
but for properties of enum types.
[MenuItemEnumScroller(Text = "ItemText")]
public GameControl EnumValue
{
get => enumValue;
set => SetProperty(ref enumValue, value);
}
Defines a method as a MenuItem.Activated
event handler for a specific set of items. The Items
string array contains the names of the wanted menu items.
[MenuItemActivatedHandler(nameof(IntValue), nameof(FloatValue))]
private void OnIntOrFloatValueActivated(MenuItem sender, ActivatedEventArgs e)
{
}
when I want to get informations from an UIMenuListItem the plugin crashes...
My Code:
job = jobList.Collection[jobList.Index].Value.ToString();
job is a String
jobList is an UIMenuItem with the following params:
jobList = new UIMenuListItem("Job", new List<dynamic> { "Rettungshelfer", "Rettungssanitäter" }, 0);
I know the jobList constructor I use will be removed soon but it should work anyway at the moment.
Please send help :)
Greetings
Benjamin
Split the DrawBanner method in two, ProcessBanner and DrawBanner, ProcessBanner will do the calculation on the FrameRender and DrawBanner will only do the drawing on the RawFrameRender.
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.