WarMenu
An immediate mode GUI framework based on GTA V GUI style
Installation Guide
- Download and put into
resources/
directory
- Add
ensure warmenu
to your server.cfg
- Add
client_script '@warmenu/warmenu.lua'
to your fxmanifest.lua
Demo
Add client_script @warmenu/warmenu_demo.lua
to your fxmanifest.lua
and use warmenuDemo
chat command to open WarMenu demo
37 Likes
Nice fork! Looks great too.
3 Likes
Big thanks to you, @MrDaGree!
2 Likes
Update 0.9.5
This update improves almost each aspect of the framework.
Changelog
- Changed
WarMenu.ComboBox
control behavior and look - you need to press SELECT in order to confirm your choice.
Also, it has two indexes now - for a current displaying item and user-selected one.
It allows you create more complex menus like Los Santos Customs with Preview Mode.
And don’t forget to check new sexy arrows.
See updated Usage section for more info.
- Added new
SetMenuButtonPressedSound(id, name, set)
API
- Highly improved Debug Mode - more helpful information, better readability
-
SetTitleWrap()
and SetTitleScale()
APIs were removed due to text alignment complexity
- Fixed lots of potential bugs with Debug Mode
- Code cleaning and refactoring as well as bug fixes
3 Likes
I will definitely be using this in my RP gamemode, good work on the improvements.
3 Likes
OK, I hope you will find lots of bugs and share your opinion on whether it is convenient to use
2 Likes
One thing I would like to request is a small area in the original post for developer documentation, the API wrapper list is very helpful but it would be more clear to myself and others if you detailed how to set up a new instance of the menu, and what each command does.
2 Likes
Well, I supposed Usage section is clear enough about how to use it and function names speak for themselves.
I don’t know what should I add here.
It would be like:
WarMenu.CreateMenu(id, title)
function create a menu with specified id and title, which is kinda weird as for me.
2 Likes
Update 0.9.6
Small, but very important addition and fixes.
Changelog
- Added new
WarMenu.IsMenuAboutToBeClosed()
API
- Fixed
WarMenu.MenuButton
bug with unnecessary attempts to draw it without current menu
- Fixed
WarMenu.ComboBox
bug with incorrect current index after reopening menu
DOWNLOAD LINK IS THE SAME AND WILL REMAIN SO IN FUTURE UPDATES
1 Like
Found a bug with CloseMenu.
tostring needs to be applied to lines 265 and 268 for the debugPrint, otherwise an error occurs when currentMenu variable goes to Nil.
Also I’m not sure if its expected behaviour or a bug, but you have to press Yes twice to close the menu from the example.
1 Like
@alberto2345, could you check the latest version, please? I’m not near my PC right now.
1 Like
Latest version spams log that window is about to close, and it can’t be opened again.
1 Like
OK, thanks. I will fix it a bit later when I will return at home.
Temporary reverted to 0.9.5
2 Likes
Should perhaps look into uploading it to GitHub. There we can all contribute to the script and better documentation can be provided and contributed to. Also reporting bugs and issues can be alot easier.
1 Like
Yes, you’re right, it was developed in one night recently, so I had no time to do it.
2 Likes
Project repository was created.
Updated DOWNLOAD link and description.
3 Likes
Back to 0.9.6
Fixed WarMenu.IsMenuAboutToBeClosed()
API (thanks @alberto2345 for notice).
See full changelog.
2 Likes
As the PM stated I am interested in possibly porting my scripts over to your menu system. One question I have is would you possibly add in an Alpha option for title background color. I personally like to have my menus with a lower alpha in the titles around 50-75. I changed it in your resource to mess around and see what it looked like but it changed the actual submenu text alpha also and I didn’t feel like debugging that.
Otherwise this looks promising.
1 Like
You have to use WarMenu.SetTItleBackgroundColor.
In the WarMenu script, change the function, which should start at line 421 to this instead:
function WarMenu.SetTitleBackgroundColor(id, r, g, b, a)
setMenuProperty(id, 'titleBackgroundColor', { ['r'] = r, ['g'] = g, ['b'] = b, ['a'] = a })
end
EDIT: I made a pull request on github with the changes, so they can be added to the main script.
4 Likes