Releases: manups4e/ScaleformUI
Super speed and light Pause Menu update.
New release and new update:
Pause menu now builds 50000000000000% times faster!! 🥳
Little Timmy: Hi Mr. Manups4e, How?
A: Very simple, instead of building all the tabs at once (ugh.. boring.. and slow) it now builds only the currently visible tab!!
Little Timmy: Woow Mr Manups4e, this is amazing! What does it mean?
A: Very simple, everytime you change tab, the scaleform now deletes everything and rebuilds only the currently visible page, also now the building process is not async anymore it means that everything is done in 1 frame!! Amazing isn't it?
Full Changelog: 5.2.2...5.2.5
Also Little Timmy, don't forget to
BugFix and Features update
What's Changed
- Fix typo for filter checks by @Mathu-lmn in #204
- Handle filtering fail (no match found) by @Mathu-lmn in #205
- Fix bannercolor arguments in scaleform functions + fix mouse edge rotation by @Mathu-lmn in #206
- Fix persistent notification color + nil check by @Mathu-lmn in #207
- Show default char image if nothing is provided or headshot fail… by @ash2148 in #208
- Added a new and awesome MinimapOverlays rework, now adding an overlay will generate a new object/metatable with a Handle value
- Various bugfixing and overall enhancements for the Scaleforms
Full Changelog: 5.1.1...5.2.2
UIMenu and Minimap panel bugfix
New fixes for both UIMenu and Minimap Panel in pause menus!
- UIMenu fixed missing banner
- Minimap Panel:
- fixed player blip now is hidden,
- added gps flags to ensure the minimap is correctly handled
- added blip scale and color features
Full Changelog: 5.1...5.1.1
⚠️ ⚠️ PLEASE UPDATE ASSETS!
ScaleformUI - Never Trust Avocados edition!
This new version is dedicated to a friend of mine who taught me so much and made me feel so much included and showed me how sharing with the community can be fun and useful! D0p3t 🩷 we all miss you buddy.
This new version is my Holy Grail, yes because after years of research i was able to finally manage to include the Minimap into Pause Menu and Lobby Menu!
Code is very easy and same for both Lua and C#
-- To add a route to the minimap (race track for example) simply use the provided MinimapRoute
object
- C#:
playersTab.Minimap.MinimapRoute.RouteColor = HudColor.HUD_COLOUR_RED;
playersTab.Minimap.MinimapRoute.StartPoint = new MinimapRaceCheckpoint(new Vector3(-213.4f, -1426.1f, 31.3f), (int)BlipSprite.Race);
playersTab.Minimap.MinimapRoute.CheckPoints.Add(new MinimapRaceCheckpoint(new Vector3(-275.88f, -1145.813f, 23.0f), (int)BlipSprite.Number1));
playersTab.Minimap.MinimapRoute.CheckPoints.Add(new MinimapRaceCheckpoint(new Vector3(-105.36f, -1144.17f, 25.78f), (int)BlipSprite.Number2));
playersTab.Minimap.MinimapRoute.EndPoint = new MinimapRaceCheckpoint(new Vector3(-213.4f, -1426.1f, 31.3f), (int)BlipSprite.RaceFinish);
- Lua:
playersTab.Minimap.MinimapRoute.RouteColor = HudColours.HUD_COLOUR_RED
playersTab.Minimap.MinimapRoute.StartPoint = MinimapRaceCheckpoint.New(309, vector3(-213.4, -1426.1, 31.3));
table.insert(playersTab.Minimap.MinimapRoute.CheckPoints, MinimapRaceCheckpoint.New(17,vector3(-275.88, -1145.813, 23.0)));
table.insert(playersTab.Minimap.MinimapRoute.CheckPoints, MinimapRaceCheckpoint.New(18,vector3(-105.36, -1144.17, 25.78)));
playersTab.Minimap.MinimapRoute.EndPoint = MinimapRaceCheckpoint.New(38, vector3(-213.4, -1426.1, 31.3));
-- To add free Blips to the Minimap you can use the provided MinimapBlips library (blips are made with FakeBlip class/metatable as they are not real blips!!)
you can clear the minimap to use it with another item by simply using the Minimap.ClearMinimap()
/ Minimap:ClearMinimap()
(Lua),
and it can be enabled/disabled by Minimap.Enable = true
/ Minimap:Enable(true)
(Lua)
⚠️ ⚠️ UPDATING THE ASSETS RESOURCE IS MANDATORY!!
What's Changed
- chore: bump version by @Local9 in #190
- Lua: fixed DetailsWindow issue by @aprobeni in #191
- Feat: TaxiMeter Scaleform by @Mycroft-Studios in #192
- Web experiment by @manups4e in #193
- Fix typos in function documentations + edits to MissionSelector by @Mathu-lmn in #195
- Update Readme to add the newest features and mention that Lua is supported too :) by @Mathu-lmn in #196
New Contributors
- @aprobeni made their first contribution in #191
- @Mycroft-Studios made their first contribution in #192
Full Changelog: 4.9...5.0
Bug fixing and Feature fixing
What's Changed
Lua: fix error going back on menu opened.. somehow i lost some code..
C# Controls: fix typo
C#UIMenu: added MouseSettings method
C# MenuHandler: Added inheritance of MouseSettings and fixed drawing on top of controls
Lua: Sync new MouseSettings as in C# version
C# UIMenu: Fix SwitchTo fading too late or too soon
C# UIMenu: removed unused parameter
C# Scaleforms: Fix Null checking error in InstructionalButtons list
C# MenuHandler: inherit the alternativeTitle
General bugfixing
C# MenuHandler: correclty handle null menus
C# MenuExample: Added SetMouse Example
C# Item.Selected should be only readable.. the item can be selected via controls or via CurrentSelection = N
C# UIMenu: Added CurrentItem {get;set;} for retrieving the item currently highlighted or to select another one.
Lua:(f8c8394)
- scaleform: separated basic CallFunction from the Async return methods
- UIMenu: test fix for slow menu building (part 1)
C#: use GetNetworkTime()
C# Pause/Lobby: fix for SettingsItems bg
Lua: (3a2718f)
- Fix menu building await
- fixed building pause menus
Full Changelog: 4.8...4.9
⚠️ ⚠️ Remember to download / update the assets for the the API to work correctly!
New UIMenu Features and BugFixes
New features in this release:
-
Banner-less menu feature: you only need to add an empty title and empty txd, txn
(empty = "")
-
Item-less menu feature: 3rd parameter for C#, last parameter for Lua
Lua:
C#:
What's Changed
- UIMenuItem Highlighted event by @Saturn745 in #186
- feat(goback) : add optional parameter to allow bypassing CanPlayerCloseMenu condition by @Mathu-lmn in #187
- C# Countdown handler fix for draw racing on last frame (3d5ee0b)
- C# InstructionalButtons: Check button list is not null (3367584)
- C#/Lua: Fix color panel selection (a9a9324)
- Lua/C# UIMenu: changed background color of the items and added Interaction_bgd as background color in the menu (ttps://github.com/manups4e/ScaleformUI/commit/3e62009fff9dcc8a153678d707de1863ff7a46cb)
- C# Lobby/Pause: fix columns adding one less item (4e812c7)
- C#/Lua UIMenu: Added BannerLess menu option. (3824227)
- C#/Lua UIMenu: Added itemless menu with long description (like GTA:O) (784978e)
New Contributors
- @Saturn745 made their first contribution in #186
Full Changelog: 4.7...4.8
Bug Fixing
As always we repeat that you MUST update the assets script along with the API.
What's Changed
Full Changelog: 4.6...4.7
Menu Filtering and BugFixing
Small update with bugfixing and added a small feature for both C# and Lua: Menu filtering.
- You can now filter your UIMenu(s) and sort them with specific functions:
-
Filtering:
- Lua - menu:FilterMenuItems(predicate) will let you filter only the items with the returned predicate(
function(_item)
) when true, example:
itemFilter.Activated = function(menu, item) local inputString = "" AddTextEntry('FMscui_KEY_TIP1', "Input filter") --Sets the Text above the typing field in the black square DisplayOnscreenKeyboard(1, "FMscui_KEY_TIP1", "", "Item", "", "", "", 10) --Actually calls the Keyboard Input while UpdateOnscreenKeyboard() ~= 1 and UpdateOnscreenKeyboard() ~= 2 do --While typing is not aborted and not finished, this loop waits Citizen.Wait(0) end if UpdateOnscreenKeyboard() ~= 2 then local result = GetOnscreenKeyboardResult() --Gets the result of the typing Citizen.Wait(250) --Little Time Delay, so the Keyboard won't open again if you press enter to finish the typing inputString = result --Returns the result else Citizen.Wait(250) --Little Time Delay, so the Keyboard won't open again if you press enter to finish the typing inputString = "" --Returns false if the typing got aborted end -- filter predicate receives the item on its own and process it as you desire, consider that only when the predicate returns true, the item will be added to the Items list menu:FilterMenuItems(function(itemToCheck) return string.lower(itemToCheck:Label()):find(string.lower(inputString)) ~= nil end) end
- While for C# it's a bit more clear:
UIMenuItem itemFilter = new UIMenuItem("Item filtering", "Select this item to filter items based on their labels"); itemFilter.Activated += async (menu, item) => { string filter = await Game.GetUserInput(10); menu.FilterMenuItems((mb) => mb.Label.ToLower().Contains(filter.ToLower())); };
- Lua - menu:FilterMenuItems(predicate) will let you filter only the items with the returned predicate(
-
Ordering:
- Lua: menu:SortMenuItems(predicate) where predicate is a function receiving 2 items (
function(pair1, pair2)
) you can then process the 2 items to make your checks and only those returning true will be added to the list, example:
local itemSort = UIMenuItem.New("Item sorting", "Activate this item to sort items alphabetically") itemSort.Activated = function(menu, item) -- sort predicate receives 2 parameters.. item1, item2.. items input is automatically filled by the system. menu:SortMenuItems(function(pair1, pair2) return string.lower(pair1:Label()) < string.lower(pair2:Label()) -- pairs from shortest label to longest end) end
- in c# it's a bit more clear:
UIMenuItem itemSorter = new UIMenuItem("Item sorting", "Activate this item to sort items alphabetically"); itemSorter.Activated += (menu, item) => { menu.SortMenuItems((pair1, pair2) => pair1.Label.ToString().ToLower().CompareTo(pair2.Label.ToString().ToLower())); };
- Lua: menu:SortMenuItems(predicate) where predicate is a function receiving 2 items (
-
Clearing items, simply call menu:ResetFilter() / menu.ResetFilter() to restore all the items to their original order.
-
What's Changed
Full Changelog: 4.5.1...4.6
If you didn't do that yet, join my discord server to talk about scripting, scaleformui, coding, and chilling :D https://discord.gg/KKN7kRT2vM
Colors! Colors everywhere!! (Revamped PauseMenu / Lobby Finale)
⚠️ CODE BREAKING UPDATE AHEAD! UPDATING WILL REQUIRE YOU TO EDIT YOUR CODE TO MEET THE LATEST CHANGES!
Here we are in our final update for the PauseMenu and LobbyMenu enhancements plan!! This time.. all ScaleformUI API was updated!
- The biggest feature for this update is the new SColor class for both Lua and C#!
- SColor is a class that let's you handle your favourite colors (both system.. custom.. and HUD colors), its main features are the ability to handle such colors in their
A
,R
,G
,B
values.- For C# devs.. this is an exensions of
System.Drawing.Color
with some goodies like Hex support and HudColor support. - For Lua devs.. this is a MetaTable with custom initializers such as
FromArgb(number)
,FromArgb(a,r,g,b)
,FromHex(hexString)
,FromHudColor(colorId)
, with added functions likeToArgb() [number]
,ToHex() [string]
,Brightness() [number]
,Hue() [number]
,Saturation() [number]
, SColor can be printed directly to show all the color data in one print (example:print(color)
) - SColor handles
A
,R
,G
,B
values for both Lua/C# and provides extended color functionalities to the scaleforms that were restricted with HudColors before. - This changes requires you to change your code both in Lua and C# to meet the requirements.. luckily.. SColor provides all the system colors and HudColors already converted.. simply use
SColor.HUD_Freemode
for hud freemode color(116)
orSColor.Purple
for system color purple(-8388480)
- Custom colors can be loaded by
hex
,argbInt
,[a,r,g,b]
,HudColor
values, the class also provides aFromRandomValues()
function that will randomize the color for you 😄 - SColor is not restricted to ScaleformUI.. with its
a,r,g,b
, nature.. it can be used with Natives that wanta,r,g,b
values as input.
- For C# devs.. this is an exensions of
- Lua: Renamed
Colours
enum intoHudColours
to meet C# naming conventions - PauseMenu and Lobby both in their multi column interface now lets you choose between newStyle or oldStyle, with a simple parameter in Lobby / PlayerListTab constructor you can now decide how players will navigate the menu.
- NewStyle is the new navigation system where left/right changes column selection
- OldStyle is the GTA:O navigation system where left/right are disabled and you can change column with
SelectColumn
function both in Lua and C# (tab.SelectColumn/tab:SelectColumn
) parameter can be the column to switch to.. or its index never been so easier!
- a new
CreawTag
class has been made for both Lua and C# for the PlayerItems in Lobby/PauseMenu this is the original R* tag and since it's not a simple string but a regex one, the constructor will help you deciding how to make your players tag (max 5 chars / 4 chars with the R* symbol)
👀 Don't forget to take a look at the example files to check the added changes!
What's Changed
Full Changelog: 4.3.5...4.5.1
⚠️ UPDATING THE ASSETS IS MANDATORY AS ALWAYS! ⚠️
Revamped PauseMenu and Lobby (Part 2)
This is the second part of the Revamp!!
- PauseMenu PlayerListTab and Lobby now have introduced the UIMenu's Pagination system, this means that you can now add up to 5000 items without the menu lagging nor erroring out!!! 🎉 🎉
This may seem just an update.. but it's actually a complete rework of the internal system! You can also set the scrolling type for each column choosing between Classic (default), Paginated and Endless!
Full Changelog: 4.3...4.3.5
UPDATING ASSETS RESOURCE IS MANDATORY!!!
❤️❤️ If you enjoy my work and my menus, and you want to support me, you can contribute by donating via PayPal / ko-fi or by buying ScaleformUI on Tebex (You decide the price!)