ScaleformUI - A lightweight, fast and fun API

I know there are already many APIs out there to create custom NativeUI menus… but afaik NONE of them is made in scaleforms :smiley:

After months of teasing on the main discord, I present and release to you ScaleformUI. :partying_face::tada::champagne::clinking_glasses:



With ScaleformUI developers can create NativeUI menus and custom Pause Menus, animate them, interact with them all in a smooth and lightweight environment.

The API is available in C# and Lua.

It contains almost everything a vanilla HUD can do… like a Marker class to create and handle Markers easily, and a Notifications class to send native notifications without the need to write custom functions / methods for them.
The Menu API contains everything NativeUI has plus even more features!

ScaleformUI lets you handle InstructionalButtons, MidSizedMessage, BigMessage, WarningScreen scaleforms without writing a single line of scaleform code, simply call the needed function/method and you’re good to go!

Both Lua and C# have examples to show how Menus and PauseMenus are made and handled.

Question: Could you provide real-world examples of menus in action?

Answer: Absolutely! Welcome to the enthralling realm of the GTA Series Arcade, where ScaleformUI showcases its prowess on one of the most distinguished servers in the FiveM universe. Join me as we explore tangible instances of menus that exemplify the zenith of gaming immersion.

for the skepticals here are the pictures with the performance on Menu opened

C#

Lua

It’s all open source on Github.

Also i would love to thank sleepingtears for his help, commitment and contributions, and and @lacoL for his support.

You want to learn how to make scaleforms but don’t know where to start?

52 Likes

Thanks for the great release :slight_smile:
I suppose I will try to change all my menus to this because of the great features.

One thing that will be a hard step to change from other old resources that deals with menu is that they do it in a tick based paradigm : Each frame, create the whole menu to draw it (like old RageUI shit)

It has some good parts (change everything quickly frame by frame without having to think too much), but also some bad things (I suppose optimization things)
As this resource is “pre-create” based, it will probably be a barrier for some users.

Anyway, I suppose it would be very hard to suppose both type of “paradigm” of menu creation or perhaps it’s not something you want at all.

2 Likes

Menus are pre-created but almost every item component can be changed in real time after menu composition via internal api sending scaleform methods

for example ScaleformUI/UIMenuItem.cs at master · manups4e/ScaleformUI · GitHub

almost every item.parameter sends a scaleform method if the menu they’re in is not null and actually visible on screen… this way the menu can be pre-created and still be edited per tick

at the moment this is the best way i can handle the menu pre-creation / post-creation… if scaleform internal api was accessible via scripts like for NUI callbacks… it would be super easier to change parts of the scaleform while drawing and remove the ProcessControl ticks for both Lua and C#

3 Likes

Thanks for the release, looks very nice manu!

3 Likes

thanks :smiley: i’m very proud of it and I use it on daily basis!

3 Likes

Ok, this looks really cool! Glad to see more love for scaleforms!

3 Likes

The scaleforms are all custom made by me

2 Likes

looks great!

4 Likes

This is awesome! :cowboy_hat_face:

4 Likes

Awesome release. I’ve been waiting for this!

3 Likes

Awesome menu.My dream is come true.

2 Likes

The wiki has been added on GitHub :blush:

This looks like a good way to make menus, thanks manu :wink:

1 Like

Is it faster? What’s the benefit over other alternatives?

Looks great though!

2 Likes

Yup faster than NativeUI as for drawing it doesn’t need various sprites and rectangles but only the DrawScaleform native itself.
Various additions like the PauseMenu that looks exactly like the stock one but is all customizable… various scaleforms wrappers, and more panels/side panels to the menu

1 Like

Version 2.0.6 released!!

First of all, the Assets have been updated, you MUST update them to use this release.

Changes in this release:

  • Lua: fixed MenuPool giving errors (Thanks @Andyyy7666)
  • Lua: DrawText3D fix drawing
  • Lua: PauseMenu disable all control actions if enabled
  • Lua: UIMenu don’t set the container to null when closing the menu
  • C# menu pool: fix offset for submenu.
  • C# / Lua UIMenu: New AddSubMenu method for menus (You can see more in their description and examples)
  • C# / Lua UIMenu: added a smooth improvement in scrolling speed

From this release, there are 2 ways to add submenus:

  • the old way => local submenu = pool:AddSubMenu(parent, ...)
    example: local windowSubmenu = pool:AddSubMenu(exampleMenu, "Heritage Menu", "", true, true)
  • NEW way =>
    local subMenu = UIMenu.New() parent:AddSubMenu(subMenu, itemText, itemDescription, offset, KeepBanner)
    example:
    local windowSubmenu = pool:AddSubMenu(exampleMenu, "Heritage Menu", "", true, true) local heritageWindow = UIMenuHeritageWindow.New(0, 0)
    the new approach lets you create the submenu as a normal menu, and add it when you want to in the order you want, without the need to change your menu accordingly.

Download it here: Release Big changes!! · manups4e/ScaleformUI · GitHub

3 Likes

Thanks, looks awesome. Definitely going to find a use for this

1 Like

i have recently fixed the mouse handling for C# and for tomorrow i’ll fix the Lua too… stay tuned for a new release tomorrow/saturday with a finally fully working mouse for the scaleform!

1 Like

:partying_face::partying_face::eyes::eyes::video_game::video_game::heart:
New release 2.1.0

:warning::warning: WARNING: To use this release you MUST update the gfx files with the released assets!

Changes from this release:

  • New mouse interface for both Lua and C#, fixes the mouse pointing and selection + makes Lua mouse dragging smoother.
  • Lua: new async controls for mouse and keyboard / gamepad. It is now possible to draw and process controls in the same thread!(1)
  • Lua: UIMenu Added activated event for all items
  • Lua: UIMenu fixed going forward or backward more than once.
  • C#: TabView disable in-game UI when pause menu is open

(1): from this release you can safely use:
pool:ProcessControls() and pool:Draw() in the same thread

Citizen.CreateThread(function()
	while true do
		Wait(0)
        pool:ProcessControl()
        pool:Draw()
	end
end)
4 Likes

You are the best🤩

1 Like