LemonUI: Highly extensible NativeUI replacement

LemonUI is a framework for creating UI systems in Grand Theft Auto V that is compatible with SHVDN2, SHVDN3 and FiveM. It allows you to create UI Elements with a NativeUI style, or you can also create your own UI System from scratch via the resolution-independant classes for Text, Rectangles and Textures.

It was created as a replacement for NativeUI due to being too convoluted to develop and maintain. LemonUI retains most (if not all) of the UI Elements available in NativeUI.

Special thanks to:

  • Guad for the original work in NativeUI
  • alloc8or for the help with the GTA Online Loading Screen Scaleform
  • ikt for helping me to use SET_SCRIPT_GFX_ALIGN and SET_SCRIPT_GFX_ALIGN_PARAMS
  • Dot. for the snippet of code used for the item scrolling
  • deterministic_bubble for answering some questions about some missing C# classes in FiveM
  • PNWParksFan for helping me with some RPH question when I was doing the port

Altough there are a bunch of related options available for creating basically “the same looking” UIs now, I think that your repo-structure and source code make in terms of quality and readability a very good impression.

Have you already thought about implementing “Panels” as seen recently in the NativeUI port to CitizenFX?

Thank you for your contributions!

That was my #1 priority with LemonUI: Extensibility without sacrificing the Readability (and my sanity).

What do you mean with Panels? I don’t see any mentions of Panels in the CitizenFX Fork.

I’m speaking of this.

Example Screenshot

Note the area below the Menu.
Image Source


Oh, the Character Creator Selectors.

I’m probably gonna take the time to implement them into LemonUI to make it a true NativeUI Replacement (and kill the later in the process).

The installation link is not working.

Either way, could you elaborate it a bit more on how devs should use it? Not all devs are pros and know much about it :stuck_out_tongue:

Thanks in advance.

I fixed the link to the installation instructions, feel free to check now.

Check the Quick Start Instructions and the Object Browser inside of Visual Studio.

Hello justalemon,

i want to use your works to replace NativeUI; unfortunatly Heritage Window doesn’t exist (or i’m blind)

see below screenshot:
sources : [Release][Dev] NativeUILua

Best regards!

LemonUI is extensible. Just implement it yourself!

You need to inherit the NativeMenu class and intercept the recalculate call.

Merry Christmas guys! I just pushed update 1.6 for LemonUI. I recommend updating if you want to use the new features as the fixes are not critical (for FiveM at least).

Anyway, here is the changelog:

WARNING: This update removes support for ScriptHookVDotNet 2. If you want to keep using LemonUI, please update to ScriptHookVDotNet 3 or continue using version 1.5.2 or older.

  • NEW: Added support for ■■■■■■ (requires using the classes manually)
  • NEW: Added custom color backgrounds for NativeItems
  • NEW: The DrawFullScreen, Draw and Process functions in scaleforms are now virtual
  • NEW: You can now get and set the Weapon Hash in a BigMessage as a uint
  • FIX: Slidable Arrows now show the correct color from the ColorSet associated to it
  • FIX: Added missing native calls for RPH in NativeMenu, BaseScaleform, InstructionalButtons and TimerBarCollection
  • DEP: Removed support for ScriptHookVDotNet 2

Are there plans to release a LUA version?

Nope, as it relies on C# specific features.

If you find this message, there is now a LUA version in the works.

The missing C#/SHVDN features have since then been implemented by the CFX team as natives.

Awesome Creation, Is there possibly documentation for this??

Right now, there is no full blown documentation but you can use aside from the stuff available in the wiki at Home · LemonUIbyLemon/LemonUI Wiki · GitHub