T-Notify v1.4.0 - Type Validation & Color Codes
New Features
Color Codes
Color codes have now been added as an additional markdown-like tag. Here is an example of how they are used.
exports['t-notify']:Custom({
style = 'message',
duration = 11000,
title = 'Colors Example',
message = '~r~Red~r~ \n ~g~Green~g~ \n ~y~Yellow~y~ \n ~b~Blue~b~ \n ~c~Cyan~c~ \n ~p~Purple~p~ \n ~w~White~w~ \n ~o~Orange~o~ \n ~gy~Grey~gy~ \n',
sound = true
})
This produces the following notification:
Type Validation for Notification Properties
Type validation has also been added this release, which will inform you if the notification object has a property of the wrong type, before this was unhandled. Now there are verbose error messages.
Minor Tweaks/Fixes
- Fix an edge case when notifications would not properly show a title/message if that title or message was passed as a non-number.
- Error prints are now red
- Utilized FiveM color codes for the update script rather than ANSI Escape Codes so these format properly in svgui.
- General code cleanup for NUI
- General code cleanup for Lua
- Update docs with new color feature
Note
As always this update should be 100% backward compatible with past versions of T-Notify.