The two standard client scripts covered in this section are meant to be very simple full-perm clients that are both useable and and example of how a client script for the Theme-O-Matic can work. These scripts have not evolved much since version 1.0 and are, most notably, not using preloaders.
If speed is a concern you should consider the preloading standard client scripts instead.
The T-O-M-SC SimpleCycle client scans for available notecards in the prim's inventory that have the required prefix. Then every time someone touches the object the "next" theme is activated.
This is a great way to customize for example textures on furniture without bothering the user with a full-blown menu.
The T-O-M-SC SimpleCycle has only one parameter:
string prefix="Theme-";
Here you can specify the prefix notecard names must have to be recognized as themes. If you do not want a prefix just set it to the empty string (""). Note that the prefix is case sensitive ("theme" is not equal to "Theme", for example), and of course spaces matter.
... are not supported by this client script because I wanted to keep it simple as mainly an example. LSD support could be added fairly simply ; feel free to request it from me.
Like the T-O-M-SC SimpleCycle, the T-O-M-SC Automenu will start by looking for notecards in the prim's inventory whose names has the required prefix. It does also look for LSD themes too, if the required configuration switch is active.
Then, every time someone touches the object, a menu opens with the list of theme names (truncated to 12 letters - SL limitation) for them to pick.
Pagination buttons ◄Prev and Next ► appear as required to organize the menu in pages of 9 themes. You also get a special button you can use to display specific information when the user clicks on it.
Several parameters are grouped at the beginning of the script, ranging from prefix selection to menu labels to menu timeout and such.
integer notecards_active=TRUE;
This is a switch (set it to TRUE or FALSE) that indicates if notecard themes are being considered or not. Set it to FALSE if you plan to use only LSD themes.
string prefix="Theme-";
Again the prefix parameter is the prefix by which notecard names must start to be recognized as themes. Use the empty string ("") for no prefix.
integer LSD_active=TRUE;
This is again a switch that indicates if the LSD themes are to be added in the menu. Set it to FALSE to use only notecards (but it does not hurt, of course, to set it to TRUE if you have no LSD themes inside your object).
For the script to do anything useful, you will have to have at least one of the switches notecards_active or LSD_active set to TRUE.
integer menu_channel=-7712;
The menu_channel setting is the channel used for menu communication. There is no point in changing it really, except for preventing a very improbable channel collision with another script.
float menu_timeout=30.0;
This is the number of seconds after which the menu stops responding, as an anti-lag measure. You can set it to 0.0 if you do not want a timeout, but it’s not recommended.
string menu_timeout_msg="Menu timeout, please touch again to get the menu.";
This is the message whispered in the local chat when timeout happens.
string menu_prompt="Available themes:";
This is the menu prompt, appearing in the dialog presented to the user with the list of themes.
string label_next="Next ►";
string label_prev="◄ Prev";
string label_placeholder=" - ";
These three settings are obviously labels used for the menu pagination into pages of 9 themes. If a ◄ Prev or Next ► button must not appear it is replaced with the placeholder.
string label_about="- About -";
This is a button appearing at the bottom of the menu that you can use to display information to the user.
string about_msg="Theme-O-Matic by Oggy's Scripted Items. Visit http://oggysscripteditems.blogspot.com for latest news.";
This is the message whispered in local chat when the user clicks on the previously mentioned – About – button.