blob: 7aacab4131ddf6bc206c2c9fa3ec5929188f71b4 (
plain)
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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
|
string title = "";
string subtitle = "";
string text = "";
string add = "";
integer channel = 0; // if this is >= 0, llSay on that channel on updates
push_text()
{
compile_text();
draw_text();
}
compile_text()
{
title = "Some Title";
subtitle = "Some subtitle";
text = "Plenty of text for the main body.\n";
text += "You need to manual do line breaks\n";
text += "here. No word wrap yet.";
add = "Additional text at the bottom";
}
draw_text()
{
string drawList = "MoveTo 40,80; PenColour RED; FontSize 48; Text " + title + ";";
drawList += "MoveTo 160,160; FontSize 32; Text " + subtitle + ";";
drawList += "PenColour BLACK; MoveTo 40,220; FontSize 24; Text " + text + ";";
drawList += "PenColour RED; FontName Times New Roman; MoveTo 40,900; Text " + add + ";";
osSetDynamicTextureData("", "vector", drawList, "1024", 0);
}
default {
state_entry()
{
push_text();
}
touch_start(integer count)
{
push_text();
if (channel >= 0) {
llSay(channel, text);
}
}
}
|