Colors
color replaces the accent of one component: the header line, bars, keys, the selected row and its icon. iconColor changes one item’s icon.
A color is one of:
- A theme token from
UgLib.Enums.Color:Primary,Success,Warning,Destructive,Muted. It follows the owner’s theme, light and dark. - A hex color,
#rrggbb. Text on it turns dark or light to stay readable.
client.lua
On a notification,
color replaces the color of its type.
Raw CSS is never accepted. Any resource can call ug-lib, and a CSS value such as
url(...) would load a remote file on every player’s game. Anything other than a token or #rrggbb raises: Notify.Show: color MUST be a UgLib.Enums.Color value or a #rrggbb hex.Positions
position takes a UgLib.Enums.Position: TopLeft, Top, TopRight, CenterLeft, Center, CenterRight, BottomLeft, Bottom, BottomRight.
Dialogs and radials stay centered.
Player settings
Players open/uisettings, a mouse screen with a preview of their screen, real samples and a color picker. Every change applies at once:
Each one starts at “Server default”. Changes are saved on the player’s PC, so they need no database and follow the player across reconnects on this server.
What wins, from lowest to highest:
- The owner’s config.
- Your call:
position,style. - The player’s choice.
fixed = true when a component MUST stay where you put it, such as a prompt that sits above your own HUD. The player’s choice is then ignored for that call:
client.lua
fixed works on Notify.Show, TextUI.Show, Progress.Start, Menu.Register and Context.
The player’s accent replaces the theme’s primary color. A color you pass still wins: it carries meaning, such as red for danger.
Open the settings from your own UI with UgLib.Ui.OpenSettings().
For owners
playerSettings = falseturns the feature off. The command then tells players it is off.lockedSettingshides preferences players MUST NOT change, such as{ 'accent', 'mode' }for a branded server. Keys are the values ofUgLib.Enums.PreferenceKey.settingsCommandrenames the command.