[Standalone][Free] Text UI

This is my first project I did in Svelte, it’s really simple.

The idea is based on cd_drawtextui and the design is inspired from NoPixel (kinda).

Video Showcase - If the video below doesn’t work

The UI is scalable and will work on all resolutions.

To call the UI you can use this event client side:

TriggerEvent('luke_textui:ShowUI', text, color)

To close the UI you can use this event client side:

TriggerEvent('luke_textui:HideUI')

Color is an optional parameter so it can be left blank or nil, if you specify the color then the background color of the container will change to the specified color.

Here are the examples I used in the video:

RegisterCommand('show', function()
    TriggerEvent('luke_textui:ShowUI', '[E] - Hello There!')
end)

RegisterCommand('hide', function()
    TriggerEvent('luke_textui:HideUI')
end)

RegisterCommand('showhtml', function()
    TriggerEvent('luke_textui:ShowUI', '<h4>Hello There</h4>General Kenobi', 'rgb(231, 76, 60)')
end)

HTML is supported in the text parameter.

If you call the event while there is already UI showing, the UI showing will simply get overwritten with the new call.

You can get the resource here:

For any issues please open a new Issue in the GitHub repository.

Feedback and suggestions are always welcome.

13 Likes

Simple, good looking, free
Nice work

2 Likes

I’m no expert at creating resources but this thing is cool, nice :+1:

1 Like

well done

better create a release on github.

What would I put in the release? Just the client and the build folder without anything else?

how do you finish it for use? i have never done that before.

You don’t unless you want to develop.
Instead you follow these instructions:
image

Sorry about that, i always forget to check the releases.

1 Like

Sweet

1 Like

big props, amazing job

1 Like

Hello!

Thanks for the release, i just got about to try it out, and nothing seems to be triggering at all. Is there any dependencies or so im missing?

All im trying to do was

**if distance < 3.0 then

                    TriggerEvent('luke_textui:ShowUI', '[E] - Open Shop')**

However, nothing appears at all. A simple Draw3DText function works fine so must be on the luke_textui resource end. Any help is greatly appreciated. :slight_smile:

You did download the release and not the source code, right?

As per usual just Code → Download ZIP.

Source code is not the release. Go onto the repo, releases and download luke_textui.zip.

Sorry, brainlag.

Thanks for the resource, its awesome :slight_smile: !

Nice script, but not realy optimized…

1 Like

wat

If the UI is on screen, it is 0.30 ms idle mode!

That’s definitely not coming from my resource, as all I have in the client code is events to send to UI.

Which means you are probably not using the event correctly in your resource, probably constantly calling it in a while true loop.