home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Chip 2005 November
/
CDVD1105.ISO
/
Util
/
Winamp
/
Skins
/
Anime_Shogo.wal
/
scripts
/
checkbox.m
< prev
next >
Wrap
Text File
|
2004-08-15
|
1KB
|
33 lines
#include "../../../lib/std.mi"
Global Text textBox;
Global Togglebutton buttonCheckBox;
Global String strItem = "";
Global String strSection = "";
Global int intDefaultValue = 999;
System.onScriptLoaded() {
textBox = System.getScriptGroup().getObject("checkbox.text");
buttonCheckBox = System.getScriptGroup().getObject("checkbox.toggle");
}
System.onSetXuiParam(String strParam, String strValue) {
if (strUpper(strParam) == "USETEXT") textBox.setText(strValue);
if (strUpper(strParam) == "PRIVATEINTITEM") strItem = strValue;
if (strUpper(strParam) == "DEFAULT") intDefaultValue = System.stringToInteger(strValue);
if (strItem != "" && strSection != "" && intDefaultValue != 999) {
buttonCheckBox.setActivated(System.getPrivateInt(getSkinName(), strItem, intDefaultValue));
}
}
buttonCheckBox.onLeftClick() {
buttonCheckBox.setActivated(!buttonCheckBox.getActivated());
}
textBox.onLeftButtonUp(Int intPosX, Int intPosY) {
buttonCheckBox.setActivated(!buttonCheckBox.getActivated());
}
buttonCheckBox.onActivate(Int intActivated) {
System.setPrivateInt(getSkinName(), strItem, intActivated);
}