home *** CD-ROM | disk | FTP | other *** search
/ Minami 40 / MINAMI40.ISO / Extra / winamp3_0-full.exe / Wacs / xml / config / scripts / cfgbool.m next >
Text File  |  2002-06-25  |  573b  |  29 lines

  1. #include <lib/std.mi>
  2. #include "configinfobox.mi"
  3.  
  4. Global Text txt;
  5. Global ToggleButton tgbutton;
  6. Global CfgGroup cgroup;
  7. Global Button butt;
  8.  
  9. System.onScriptLoaded() {
  10.   cgroup = getScriptGroup();
  11.   txt = cgroup.getObject("cfg.txt");
  12.   tgbutton = cgroup.getObject("cfg.toggle");
  13.   butt = cgroup.getObject("cfg.toggle2");
  14. }
  15.  
  16. tgbutton.onToggle(int on) {
  17.   cgroup.cfgSetInt(on);
  18. }
  19.  
  20. cgroup.onCfgChanged() {
  21.   txt.setText(cfgGetName());
  22.   tgbutton.setActivated(cfgGetInt());
  23. }
  24.  
  25. butt.onLeftClick() {
  26.  if (!ConfigInfoBox())
  27.    tgbutton.leftClick();
  28. }
  29.