-
Notifications
You must be signed in to change notification settings - Fork 8
Expand file tree
/
Copy pathlongtext.lua
More file actions
31 lines (24 loc) · 2.83 KB
/
longtext.lua
File metadata and controls
31 lines (24 loc) · 2.83 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
return [[
[swing=30]H[swing=20]e[swing=10]l[swing=5]l[swing=1]o[/swing] [shake=30]t[shake=20]h[shake=10]e[shake=00]r[shake=-30]e[/shake], [spin=10]w[spin=9]e[spin=8]l[spin=7]c[spin=5]o[spin=3]m[spin=0]e[/spin] [blink=1]t[blink=2]o[blink=2.5] t[blink=-3]h[blink=4]e[/blink] [raindrop=3]l[raindrop=2]i[raindrop=1]b[raindrop=0]r[raindrop=-1]a[raindrop=-2]r[raindrop=-3]y[raindrop=999]![/raindrop]
[font=earth_illusion][bounce=0][rainbow=3=100]Hello! Welcome [rainbow=10=-30]to [rainbow=20]the [rainbow=1]library![/rainbow][/bounce][/font]
This library will work with any font object that love can produce, and at any scale. So even if you don't use pixel art, this library will work for you!
Note, in order to apply all the effects and animate everything each character is a draw call. So if you have a lot of text, like a visual novel, it might be overkill.
[b]b[/b] - [b]Fake Bold[/b] [b]u[/b] - [u]Underline[/u] [shadowcolor=#FF0000] [b]dropshadow=[/b]# - Style[font=earth_illusion] [dropshadow=0]00 [dropshadow=1]01 [dropshadow=2]02 [dropshadow=3]03 [dropshadow=4]04 [dropshadow=5]05 [shadowcolor=#00FFAA][dropshadow=6]06 [dropshadow=7]07 [dropshadow=8]08 [dropshadow=9]09 [dropshadow=10]10[/dropshadow][/font]
[b]i[/b] - [i]Fake Italics[/i] [b]s[/b] - [s]Strikethrough[/s] [b]mirror[/b] - [mirror]Print text backwards[/mirror] (Print Text Backwards) [b]rotate[/b]=# - [rotate=180]Rotate Text[/rotate] (Rotate Text)
[b]color[/b]=# - [color=20]Sets color, based on a palette table.[/color] [color=#AA2032]Or Hex #AA2032[/color] [b]font=font_name[/b] - [font=comic_neue]Change font ([b]B[/b] [i]I[/i] [u=-3]U[/u] [s=1]S[/s])
[/font][b]scale[/b]=# - [scale=2]Scale the text[/scale]
[b=30]shake[/b] - [shake]Shake Text[/shake] [b]bounce[/b] - [bounce]Bounce Text[/bounce]
[b]spin[/b] - [spin]Spin Text[/spin] [b]blink[/b] - [blink]Blink Text[/blink]
[b]swing[/b] - [swing]Swing Text[/swing] [b]rainbow[/b] - [rainbow]Raibow Text[/rainbow]
[b]raindrop[/b] - [raindrop]Rain Fall Text[/raindrop] [b]shader[/b] - [shader=x_gradient]Apply a shader for advanced text control - have fun![/shader]
[rainbow=4=100][bounce][shake]Combine them for more effects![/shake][/bounce][/rainbow] - (rainbow bounce shake)
A note on Unicode characters:
You can just use them!
Thèn you can print it to your hèarts dèsirè.
You can even wrap more than one character this way.
ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖרÙÚÛÜÝÞßàáâãäåæçö
[rainbow][swing]Tèxt èffects[/swing] [shake]work too! Cool èh? [/shake][/rainbow]
This will even work for other languages!
[font=shinonome_12]こんにちは![/font][font=shinonome_14]こんにちは![/font][font=shinonome_16]こんにちは![/font]
You can even draw an image directly in the text!
[image=frame=default_8][image=frame=eb_8][image=frame=m3_8] ]]