Stormworks: Build and Rescue

Stormworks: Build and Rescue

33 个评价
*LUA* Scalable Text
   
奖励
收藏
已收藏
取消收藏
文件大小
发表于
199.624 KB
2019 年 11 月 22 日 上午 10:30
1 项改动说明 ( 查看 )

订阅以下载
*LUA* Scalable Text

在 Tajin 的 1 个合集中
Quality microcontollers for every occasion
21 件物品
描述
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 条留言
MikGaming/DJ Mike 2023 年 8 月 21 日 下午 1:44 
how to skip a line ?
Ghost 2023 年 7 月 25 日 上午 3:29 
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 2023 年 7 月 25 日 上午 3:25 
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  [作者] 2023 年 2 月 11 日 下午 1:09 
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 2023 年 2 月 11 日 上午 11:28 
why would you spend so much time on this and not let the value change so systems can change what they display
Ω Compu 2023 年 2 月 7 日 下午 11:27 
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 2023 年 2 月 7 日 下午 7:44 
Ω Compu 2023 年 2 月 7 日 下午 7:17 
i'm not in that discord server
Tajin  [作者] 2023 年 2 月 7 日 下午 7:16 
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  [作者] 2023 年 2 月 7 日 下午 7:12