Display a List on a Primitive

The following function formats a command string that can be passed to osSetDynamicTextureData in order to display the contents of the list input with a spacing of spacing pixels.

Example call:

osSetDynamicTextureData("", "vector", wasTextDisplayList(["hi", "there", "how", "are", "you"], 20), "width:256,height:256", 0);
///////////////////////////////////////////////////////////////////////////
//    Copyright (C) 2013 Wizardry and Steamworks - License: GNU GPLv3    //
///////////////////////////////////////////////////////////////////////////
string wasTextDisplayList(list input, integer spacing) {
    string c = "";
    integer p = 0;
    do {
        string in = llList2String(input, 0);
        c = osMovePen(c, 0, p);
        p += spacing;
        c = osDrawText(c, in);
        input = llDeleteSubList(input, 0, 0);
    } while(llGetListLength(input));
    return c;
}

fuss/ossl.txt ยท Last modified: 2017/02/22 18:30 (external edit)

Access website using Tor Access website using i2p


For the copyright, license, warranty and privacy terms for the usage of this website please see the license, privacy and plagiarism pages.