home *** CD-ROM | disk | FTP | other *** search
/ Shirley Barber's Fairies: Create, Paint & Play / Fairies.iso / pc / Files / Install.dxr / Internal_10_Quit.ls < prev    next >
Encoding:
Text File  |  2003-11-06  |  1.2 KB  |  34 lines

  1. property pLeaveSound, pSound, pSoundEnable, pLeaveSoundEnable
  2. global scrWidth, scrHeight, scrDepth
  3.  
  4. on mouseDown
  5.   if pSoundEnable then
  6.     puppetSound(1, pSound)
  7.   end if
  8.   Answer = baMsgBox("Are you sure you would like to quit?", "Question?", "YesNo", "Question", 1)
  9.   if Answer = "Yes" then
  10.     if pLeaveSoundEnable then
  11.       puppetSound(1, pLeaveSound)
  12.     end if
  13.     repeat while soundBusy(1)
  14.     end repeat
  15.     baDisableSwitching(0)
  16.     OldSS = baDisableScreenSaver(0)
  17.     KeysOff = baDisableKeys(0, baWinHandle())
  18.     showing = baHideTaskBar(0)
  19.     Ok = baSetDisplay(scrWidth, scrHeight, scrDepth, "temp", 0)
  20.     quit()
  21.   else
  22.     go("1")
  23.   end if
  24. end
  25.  
  26. on getPropertyDescriptionList me
  27.   vPDList = [:]
  28.   setaProp(vPDList, #pSound, [#comment: "Which sound to Play on mousedown?", #format: #sound, #default: EMPTY])
  29.   setaProp(vPDList, #pSoundEnable, [#comment: "Enable sound to Play on mousedown?", #format: #boolean, #default: 1])
  30.   setaProp(vPDList, #pLeaveSound, [#comment: "Which sound to Play on Leave?", #format: #sound, #default: EMPTY])
  31.   setaProp(vPDList, #pLeaveSoundEnable, [#comment: "Enable sound to Play on Leave?", #format: #boolean, #default: 1])
  32.   return vPDList
  33. end
  34.