diff options
author | Sean Dague | 2008-06-18 19:23:46 +0000 |
---|---|---|
committer | Sean Dague | 2008-06-18 19:23:46 +0000 |
commit | 7355d79881e77492c37b5cd0220d842c1785a8ba (patch) | |
tree | 7fc63cbffac01cf3167ae28610b1787fe550766c /bin/assets/ScriptsAssetSet | |
parent | * By popular demand, skipping trees from the map tile generation routine. S... (diff) | |
download | opensim-SC_OLD-7355d79881e77492c37b5cd0220d842c1785a8ba.zip opensim-SC_OLD-7355d79881e77492c37b5cd0220d842c1785a8ba.tar.gz opensim-SC_OLD-7355d79881e77492c37b5cd0220d842c1785a8ba.tar.bz2 opensim-SC_OLD-7355d79881e77492c37b5cd0220d842c1785a8ba.tar.xz |
prune all the empty script directories. Contribute
my text board script to be part of the stock scripts.
Diffstat (limited to 'bin/assets/ScriptsAssetSet')
-rw-r--r-- | bin/assets/ScriptsAssetSet/ScriptsAssetSet.xml | 7 | ||||
-rw-r--r-- | bin/assets/ScriptsAssetSet/osTextBoard.lsl | 47 |
2 files changed, 54 insertions, 0 deletions
diff --git a/bin/assets/ScriptsAssetSet/ScriptsAssetSet.xml b/bin/assets/ScriptsAssetSet/ScriptsAssetSet.xml index 18e39f3..341454f 100644 --- a/bin/assets/ScriptsAssetSet/ScriptsAssetSet.xml +++ b/bin/assets/ScriptsAssetSet/ScriptsAssetSet.xml | |||
@@ -132,4 +132,11 @@ | |||
132 | <Key Name="inventoryType" Value="10" /> | 132 | <Key Name="inventoryType" Value="10" /> |
133 | <Key Name="fileName" Value="llSetRot.lsl" /> | 133 | <Key Name="fileName" Value="llSetRot.lsl" /> |
134 | </Section> | 134 | </Section> |
135 | <Section Name="osTextBoard"> | ||
136 | <Key Name="assetID" Value="3e4f2be4-4697-4697-15c8-5920140208c5" /> | ||
137 | <Key Name="name" Value="osTextBoard" /> | ||
138 | <Key Name="assetType" Value="10" /> | ||
139 | <Key Name="inventoryType" Value="10" /> | ||
140 | <Key Name="fileName" Value="osTextBoard.lsl" /> | ||
141 | </Section> | ||
135 | </Nini> | 142 | </Nini> |
diff --git a/bin/assets/ScriptsAssetSet/osTextBoard.lsl b/bin/assets/ScriptsAssetSet/osTextBoard.lsl new file mode 100644 index 0000000..bb5ae81 --- /dev/null +++ b/bin/assets/ScriptsAssetSet/osTextBoard.lsl | |||
@@ -0,0 +1,47 @@ | |||
1 | string title = ""; | ||
2 | string subtitle = ""; | ||
3 | string text = ""; | ||
4 | string add = ""; | ||
5 | integer channel = 0; // if this is >= 0, llSay on that channel on updates | ||
6 | |||
7 | default { | ||
8 | state_entry() | ||
9 | { | ||
10 | push_text(); | ||
11 | } | ||
12 | |||
13 | touch_start(integer count) | ||
14 | { | ||
15 | push_text(); | ||
16 | if (channel >= 0) { | ||
17 | llSay(channel, text); | ||
18 | } | ||
19 | } | ||
20 | |||
21 | void push_text() | ||
22 | { | ||
23 | compile_text(); | ||
24 | draw_text(); | ||
25 | } | ||
26 | |||
27 | void compile_text() | ||
28 | { | ||
29 | title = "Some Title"; | ||
30 | subtitle = "Some subtitle"; | ||
31 | |||
32 | text = "Plenty of text for the main body.\n"; | ||
33 | text += "You need to manual do line breaks\n"; | ||
34 | text += "here. No word wrap yet."; | ||
35 | |||
36 | add = "Additional text at the bottom"; | ||
37 | } | ||
38 | |||
39 | void draw_text() | ||
40 | { | ||
41 | string drawList = "MoveTo 40,80; PenColour RED; FontSize 48; Text " + title + ";"; | ||
42 | drawList += "MoveTo 160,160; FontSize 32; Text " + subtitle + ";"; | ||
43 | drawList += "PenColour BLACK; MoveTo 40,220; FontSize 24; Text " + text + ";"; | ||
44 | drawList += "PenColour RED; FontName Times New Roman; MoveTo 40,900; Text " + add + ";"; | ||
45 | osSetDynamicTextureData("", "vector", drawList, "1024", 0); | ||
46 | } | ||
47 | } | ||