BOII Development has rebranded to Playing In Traffic, with this comes some resource moves and renames. BDUK is now PLUCK - Predefined LUA UI Component Kit same kit, new name, new location.
MIT licensed feel free to use it in commercial projects just dont claim you made the builder support honest developmentā¦
Add the pluck resource into your server resources.
Add the following line into your server.cfg file: ensure pluck.
Restart your server or press F8 and type refresh; ensure pluck and the resource will be started.
Configuration generally boils down to themes, you can modify the defaults or create your own.
License
This script is MIT licensed meaning you can do pretty much whatever you want with it.
Use it in your server, your commercial scripts, it doesnāt matter.
Just retain the original credit notes at the top of the files and your good to go
Support honest development ā donāt be that guy.
Support
Need help? Found a bug? Need to vent about a bug that isnāt from this kit?
Join the Playing In Traffic Discord
Support Hours: 10am - 10pm, Monday - Friday (GMT)
We canāt guarantee instant replies, but we do our best.
Have spotted and fixed a couple issues, will push a v0.1.4 later today just finishing working on a script using it to see if I can spot any other bugs in the process.
Couple screenshots though of it in an actual script use case rather than just showing all the options
Most important change is on_click and on_keypress have now been unified under one handle on_action use this from now on
Any other bugs I spot will get fixed asap before moving to a full release, if anyone spots any give me a shout
Key
- Removed
! Modified
+ Added
# Notes
v0.1.4
! buttons/footer/tooltip.js: Unified `on_click` and `on_keypress` to one handle now use `on_action` instead for both.
! buttons.js: Modified global btn handler now returns the merged dataset from modals on click.
! tooltip.js: Fixed to call correct action, was calling old method.
! builder.js: Now removes modals properly when destroy() is called, stops modals from getting stuck on screen.
! test.lua: Removed action = "close_modal" from example code, isnt needed anymore any modal button without an action or on_action section will close modal.
! modal.js: Modified get_input_html() now merges additional dataset if provided.
! modal.css: Select options are now hidden by default as they should have been.
! buttons.css: Changed btn class to align items correctly if including icons.
! themes/default.css: Added slight opacity to default bg colours, makes the UI a little less dominant.
can run default test command to just view.
for actual use case you need to create a ui table, then setup some form of interaction that exports that ui through exports.bduk:build(your_ui) when interaction occurs for example accessing a ped through a target system? or just a simple drawtext setup āPress E to Open Storeā etc
Few changes.
Main addition is the new DUI setup.
This is a rework of a system Iāve used in a couple paid scripts before now, can support multiple progress bars, value displays and keypress actions same as other on_action = function ... for custom functions. You can enable custom locking controls over the dui display by using can_access = function() ... end on any DUI entry.
- main.lua: Split into new files and put into scripts/ folder.
- scripts/builder.lua: removed ui_active flag isnt used anymore.
+ scripts/dui_sprite.lua: New script to handle DUI locations for the new dui element.
+ components/dui_sprite.js: New element to create DUI's in the game world refer to discord for previews docs coming asap.
+ css/dui_sprite.css: Style for dui, uses same default root theme palette.
! builder.js: Added close() function and moved remove nui post out of destroy() into close.
! builder.lua: Changed nui focus to fixed values instead of relying on IsNuiFocused() native.
# and some other stuff i forgot.. hence for the full replace.
This new element has not been documented yet, will do this as soon as possible.
For now I have left some test commands in test.lua you can use these as a guide.
+ modal/button.js: Added support back in for `action = "close_modal"`
! content.js: Sections now respect layout so can load empty sections and actually put left and right on correct sides if center is missing.
+ tooltip.css: Added forced capitlization to values.
! tooltip.js: Fixed issue with rarity not displaying correctly on headers and should_close not being respected properly.
! cards.js: Changed how titles work can now use a single string "Some title" or title: { text: "Left Section", span: "Span" } and specify a main text + span.
! cards.js: Fixed dateset passing on hover keypresses, now works correctly from main card no more nesting drama...
+ progress_circle/bar.js | .css | .lua: Added files for progress circle and bars, can be used with exports.bduk:show_circle(...) or show_progress(...).
! handlers.js: Updated for new handlers and added jsdoc notes throughout
Hi @PlayingInTraffic
This is wonderful, and I will definitely use it in my scripts. Of course, I will give you credit, but⦠it would be GREAT if you could make a video explaining the whole process of integrating it into other scripts. Itās a little confusing at first. Thank you very much, and excellent work.
Ah life just got in the way, this should be documented better and it should have had some new components added in by now, I just havenāt really had time.
Will work on that though, make it easier for people to use