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日 13時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日 13時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日 23時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日 19時17分 
i'm not in that discord server
Tajin  [作成者] 2023年2月7日 19時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日 19時12分