You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
<> = default delimiters for handlers (default can be changed; see code)
6
-
\< = put escape character \ to prevent tag parsing and print <
7
-
\> = put escape character \ to include > in tag name or print >
8
-
9
-
tag names can't have \ at end because \ escapes >
10
-
tag names can't have space characters
11
-
12
-
NOTES
13
-
=====
14
-
15
-
Previous color and font are restored after each text:draw().
16
-
17
-
Graphical transformations don't affect other rows (scale,rotate,etc).
18
-
19
-
All text align to the top of each row.
20
-
21
-
When drawing partial text, a drawn tag with love.graphics.push not paired up with a tag with love.graphics.pop will eventually error.
22
-
--]]
23
-
24
-
message=[[
25
-
Delimiter test: \<1> <2\> <<3\> <4\>\> <<5\>\>
26
-
<red>This is red<reset>
27
-
This is <green>green<reset>
28
-
This is a picture:<pic>
29
-
This is <shake>SHAKING</shake>
30
-
UTF8 test: а б в г д е ё ж з и й к л м н о
31
-
This is <font>Vera Sans</font>
32
-
Wrap test with Lorem Ipsum:<small>
33
-
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Mauris nisi ipsum, aliquet et iaculis in, malesuada nec erat. Integer quis nulla vel risus consequat varius. Aliquam blandit imperdiet lectus non vestibulum. Nam lorem leo, bibendum id luctus vitae, tincidunt vel tellus. Praesent ac sagittis nibh. Nam sapien orci, venenatis quis gravida sed, mattis ut lorem. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Ut lectus orci, adipiscing quis euismod a, consequat eget nulla. Sed lobortis turpis in erat fringilla posuere.
34
-
35
-
Vivamus commodo ultricies scelerisque. In hac habitasse platea dictumst. Fusce tempor euismod mollis. Ut lobortis commodo nulla, ac adipiscing urna auctor quis. Cras facilisis cursus metus, vel cursus leo posuere non. Aliquam sit amet vulputate orci. Vivamus ut ante ante, non hendrerit quam. Cras ligula libero, elementum id posuere sollicitudin, gravida ut nibh</font>]]
36
-
37
-
smallFont=love.graphics.newFont(12)
38
-
normalFont=love.graphics.newFont(18)
39
-
cyrillicFont=love.graphics.newFont('font.ttf',24)
40
-
41
-
--[[
42
-
Handlers are text objects substituting a tag
43
-
Each handler table can have the following field:
44
-
45
-
draw : callback used at tag location
46
-
font : font to use onward from tag location (MUST USE THIS FIELD FOR CUSTOM FONTS TO CORRECTLY WRAP AND ALIGN)
47
-
width : (default: 0) width of text object; used for correct wrapping
48
-
length: (default: 0) "view length" of text object; obj's with bigger lengths take more time to finish scrolling
0 commit comments