Stormworks: Build and Rescue

Stormworks: Build and Rescue

33 rating
*LUA* Scalable Text
   
Penghargaan
Favorit
Difavoritkan
Batalkan favorit
Ukuran File
Diposting
199.624 KB
22 Nov 2019 @ 10:30am
1 Catatan Perubahan ( lihat )

Berlangganan untuk mengunduh
*LUA* Scalable Text

Dalam koleksi 1 dari Tajin
Quality microcontollers for every occasion
Item 21
Deskripsi
This draws a custom made, fully scalable font on any connected screen.
It an be used as is or be included into an existing MC.


The script is by default configured to fit the whole screen and takes its settings from the properties in the MC. You can change the position and size of the text the same way you would draw a rectangle (x,y,w,h). The text automatically scales to fit inside that rectangle. Color and Fontweight are adjustable.

In short:
- scalable
- adjustable weight
- colorable
- Text is in capitals
- Default Charset includes the following: "ABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890 !?+-:_.,"


The charset can also be extended or even used to draw other things... if you understand how it works. (Hint: it's somewhat similar to svg)
22 Komentar
MikGaming/DJ Mike 21 Agu 2023 @ 1:44pm 
how to skip a line ?
Ghost 25 Jul 2023 @ 3:29am 
Nevermind, I found a solution by deleting the property text and putting TXT(Text, ....) in the fonction onDraw instead of TXT(prT("Text"), ....
Sorry for disturbing you, and great script by the way !
Ghost 25 Jul 2023 @ 3:25am 
Is there any way we can put the text inside the lua script instead of in a property text ? I want the value of my text to change, like when number == 0 then text="a" but I can't really do that with property text.
Tajin  [pembuat] 11 Feb 2023 @ 1:09pm 
Because you can't send text via logic connections unless you encode it and if you just want to display numbers, that is really quite easy to change.
Galactian 11 Feb 2023 @ 11:28am 
why would you spend so much time on this and not let the value change so systems can change what they display
Ω Compu 7 Feb 2023 @ 11:27pm 
i have narrowed the problem down further, the 8 is correct only at font weight 6 and below, any font weight above 6 breaks the 8
Ω Compu 7 Feb 2023 @ 7:17pm 
i'm not in that discord server
Tajin  [pembuat] 7 Feb 2023 @ 7:16pm 
I posted an example how to do that on discord a while ago if you're interested:
https://discord.com/channels/357480372084408322/578586360336875520/671338074709426187
Tajin  [pembuat] 7 Feb 2023 @ 7:12pm