From 7355d79881e77492c37b5cd0220d842c1785a8ba Mon Sep 17 00:00:00 2001 From: Sean Dague Date: Wed, 18 Jun 2008 19:23:46 +0000 Subject: [PATCH] prune all the empty script directories. Contribute my text board script to be part of the stock scripts. --- .../ScriptsAssetSet/ScriptsAssetSet.xml | 7 ++ bin/assets/ScriptsAssetSet/osTextBoard.lsl | 47 ++++++++ .../ScriptsLibrary/ScriptsLibraryFolders.xml | 102 +----------------- .../ScriptsLibrary/ScriptsLibraryItems.xml | 14 +++ 4 files changed, 71 insertions(+), 99 deletions(-) create mode 100644 bin/assets/ScriptsAssetSet/osTextBoard.lsl diff --git a/bin/assets/ScriptsAssetSet/ScriptsAssetSet.xml b/bin/assets/ScriptsAssetSet/ScriptsAssetSet.xml index 18e39f3e13..341454ffd7 100644 --- a/bin/assets/ScriptsAssetSet/ScriptsAssetSet.xml +++ b/bin/assets/ScriptsAssetSet/ScriptsAssetSet.xml @@ -132,4 +132,11 @@ +
+ + + + + +
diff --git a/bin/assets/ScriptsAssetSet/osTextBoard.lsl b/bin/assets/ScriptsAssetSet/osTextBoard.lsl new file mode 100644 index 0000000000..bb5ae81b63 --- /dev/null +++ b/bin/assets/ScriptsAssetSet/osTextBoard.lsl @@ -0,0 +1,47 @@ +string title = ""; +string subtitle = ""; +string text = ""; +string add = ""; +integer channel = 0; // if this is >= 0, llSay on that channel on updates + +default { + state_entry() + { + push_text(); + } + + touch_start(integer count) + { + push_text(); + if (channel >= 0) { + llSay(channel, text); + } + } + + void push_text() + { + compile_text(); + draw_text(); + } + + void 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"; + } + + void 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); + } +} diff --git a/bin/inventory/ScriptsLibrary/ScriptsLibraryFolders.xml b/bin/inventory/ScriptsLibrary/ScriptsLibraryFolders.xml index 8b469926de..1b93a1b7a6 100644 --- a/bin/inventory/ScriptsLibrary/ScriptsLibraryFolders.xml +++ b/bin/inventory/ScriptsLibrary/ScriptsLibraryFolders.xml @@ -29,78 +29,6 @@ -
- - - - -
-
- - - - -
-
- - - - -
-
- - - - -
-
- - - - -
-
- - - - -
-
- - - - -
-
- - - - -
-
- - - - -
-
- - - - -
-
- - - - -
-
- - - - -
@@ -113,34 +41,10 @@
-
- +
+ - - -
-
- - - - -
-
- - - - -
-
- - - - -
-
- - - +
diff --git a/bin/inventory/ScriptsLibrary/ScriptsLibraryItems.xml b/bin/inventory/ScriptsLibrary/ScriptsLibraryItems.xml index 66888c92bb..b78c094077 100644 --- a/bin/inventory/ScriptsLibrary/ScriptsLibraryItems.xml +++ b/bin/inventory/ScriptsLibrary/ScriptsLibraryItems.xml @@ -286,4 +286,18 @@ + +
+ + + + + + + + + + + +