From 2558f8ac3122f2721c9f47500626f781ff548bbe Mon Sep 17 00:00:00 2001 From: Mike Mazur Date: Fri, 18 Jul 2008 04:51:36 +0000 Subject: Make scripts LSL compliant. --- bin/assets/ScriptsAssetSet/osTextBoard.lsl | 53 +++++++++++++++--------------- 1 file changed, 27 insertions(+), 26 deletions(-) (limited to 'bin/assets/ScriptsAssetSet/osTextBoard.lsl') diff --git a/bin/assets/ScriptsAssetSet/osTextBoard.lsl b/bin/assets/ScriptsAssetSet/osTextBoard.lsl index bb5ae81..7aacab4 100644 --- a/bin/assets/ScriptsAssetSet/osTextBoard.lsl +++ b/bin/assets/ScriptsAssetSet/osTextBoard.lsl @@ -4,6 +4,33 @@ 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() { @@ -18,30 +45,4 @@ default { } } - 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); - } } -- cgit v1.1