Advertisement
salahzar

mostra notecard senza titolo

May 4th, 2014
307
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. // Example of osDrawText
  2. string name;
  3. integer line;
  4.  
  5. string content;
  6.  
  7. default
  8. {
  9.     state_entry()
  10.     {
  11.         line=0; name=llGetInventoryName(INVENTORY_NOTECARD,0);
  12.         content="";
  13.         llGetNotecardLine(name,line);
  14.     }
  15.     dataserver(key id, string str)
  16.     {
  17.         if(str==EOF) state ready;
  18.         content+=str+"\n";
  19.         //llSay(0,str);
  20.         line++;
  21.         llGetNotecardLine(name,line);
  22.        
  23.     }
  24. }
  25. state ready
  26. {
  27.     state_entry()
  28.     {
  29.         //llSay(0,"content "+content);
  30.         string CommandList = ""; // Storage for our drawing commands
  31.  
  32.  
  33.         CommandList = osMovePen( CommandList, 10, 10 );           // Upper left corner at <10,10>
  34.        
  35.        
  36.         CommandList = osSetFontSize( CommandList, 36 );
  37.         CommandList = osDrawText( CommandList, content ); // Place some text
  38.  
  39.         // Now draw the image
  40.         osSetDynamicTextureData( "", "vector", CommandList, "width:1024,height:1024", 0 );
  41.     }
  42.    
  43.    
  44.  
  45. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement