PLUCK - Predefined LUA UI Component Kit

PLUCK - Predefined LUA UI Component Kit

Rebrand

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 :sweat_smile: support honest development…

:arrow_down_small: Download

GitHub


:spiral_notepad: Documentation

Docs


What is PLUCK?

  • Formally? Predefined LUA UI Component Kit
  • When it’s working great? Perfect Little UI Component Kit
  • When it’s not? Painfully Lame UI Clutter Kit

PLUCK lets you build UI entirely in Lua. No HTML. No CSS. No JavaScript. No problem.
Less ā€œlearning Reactā€ - more ā€œjust show the damn button.ā€

Who’s It For?

  • Scripters who hate coding UI but still want good-looking panels.
  • Developers who’d rather focus on gameplay.
  • Anyone tired of context menus pretending to be UI.
  • You. Yes, you.

Why Use PLUCK?

  • No Bloat - You only get what you actually use.
  • No Headaches - Buttons, modals, inputs - they just work.
  • No HTML - Build everything in clean, readable Lua.
  • Unified Look - Consistent visuals across your entire server.

What’s Included?

Main UI Frame

  • Header - Branding + buttons + whatever chaos you want up top.
  • Footer - Keybinds, hints, and quick info.
  • Sidebar - Optional. Menus within menus.
  • Content - The good stuff.
  • Tooltip - Hover support out the box.

Components

  • Buttons - Smart, modal-aware buttons.
  • Cards - Display items, jobs, stores, whatever.
  • Inputs - Full group logic (tuning, clothes, etc).
  • Modal - With selects, colors, text, number sliders, and more.
  • Namecards - Beautiful profile-style cards.
  • Notify - Simple, clean in-UI notifications.

Extras

  • Themes - One file controls fonts, spacing, and colour.
  • Layouts *(coming soon)- - Premade setups for stores, panels, and more.

Screenshots

UI Builder (all options)
main_ui
main_ui2
Builder Alt Theme
alt_theme_test
DUI
progbardui
Progress Circle


Progress Bar

Action Menu


Getting Started

  1. Download the latest release.
  2. Add the pluck resource into your server resources.
  3. Add the following line into your server.cfg file: ensure pluck.
  4. Restart your server or press F8 and type refresh; ensure pluck and the resource will be started.
  5. Configuration generally boils down to themes, you can modify the defaults or create your own.

:page_facing_up: 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 :heart:

Support honest development — don’t be that guy.


:speech_balloon: 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.

17 Likes

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 :heart:



5 Likes

Some bug fixes and minor changes.

Most important change is on_click and on_keypress have now been unified under one handle on_action use this from now on :heart:

Any other bugs I spot will get fixed asap before moving to a full release, if anyone spots any give me a shout :+1:

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.
2 Likes

Am I dumb or how do I open it x)?

And its finally released <3 loved seeing this thru all the WIP That it went thru.

Look forward to trying it out

2 Likes

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 :slight_smile:

v0.2.0

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.

Much love, enjoy the scripting adventure! :heart:

Howdy!

It’s still being worked on and stuff is still being added.

What’s new?

  • progressbar
  • progress circle
  • rarity for card displays
  • bunch of small fixes



v0.3.0

+ 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

great release buddy

1 Like

Have rebranded BOII Development so the resources have had a change also.

This is now a relatively stable 1.0.0 build.
Same setup, new location, new name.

Updated docs: Playing In Traffic

Edit: scratch that im dumb i did post it above :sweat:

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.

P.S.: I’m looking forward to the layout update.

1 Like

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 :slight_smile:

1 Like

Been a while… but heres v1.1.0 and a action menu :slight_smile: