Shortnote

This file is part of the inverse matrix calculator and assumes that the main calculator script file is placed in the same primitive and named [WaS-K] Matrix.

The optional script displays a spinner while the [WaS-K] Matrix script is active.

Code

activity_monitor.lsl
///////////////////////////////////////////////////////////////////////////
//  Copyright (C) Wizardry and Steamworks 2011 - License: GNU GPLv3      //
//  Please see: http://www.gnu.org/licenses/gpl.html for legal details,  //
//  rights of fair usage, the disclaimer and warranty conditions.        //
///////////////////////////////////////////////////////////////////////////
 
list spinChars = [ "↑", "↗", "→", "↘", "↓", "↙", "←", "↖" ];
string spinner() {
    string text = llList2String(llGetLinkPrimitiveParams(LINK_THIS, [PRIM_TEXT]), 0);
    do {
        string tok = llGetSubString(text, llStringLength(text)-1, llStringLength(text)-1);
        if(!~llListFindList(spinChars, (list)tok) && tok != "\n" && tok != "[" && tok != "]") jump show;
        text = llDeleteSubString(text, llStringLength(text)-1, llStringLength(text)-1);
    } while(llStringLength(text));
@show;
    string next = llList2String(spinChars,  0);
    spinChars = llDeleteSubList(spinChars, 0, 0);
    spinChars += next;
    return "[" + next + "]";
}
 
default {
    link_message(integer sender_num, integer num, string str, key id) {
        if(str == "start") {
            llSetTimerEvent(1);
            return;
        }
        llSetTimerEvent(0);
    }
    timer() {
        if(llGetScriptState("[WaS-K] Matrix") != TRUE) {
            llSetTimerEvent(0);
            return;
        }
        llSetText("Computing...\nPlease wait..." + "\n" + spinner(), <1,1,0>, 1);        
    }
}

secondlife/inverse_matrix_calculator/activity_monitor.txt · Last modified: 2022/11/24 07:46 by 127.0.0.1

Access website using Tor Access website using i2p Wizardry and Steamworks PGP Key


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