home *** CD-ROM | disk | FTP | other *** search
/ What PC? 1997 December / WPCDEC97.ISO / DXRS / INXWDEC.DXR / 00021_CDXMenuHeadings.ls < prev    next >
Encoding:
Text File  |  1997-10-13  |  4.0 KB  |  77 lines

  1. on CDXMenuHeadings
  2.   global WhichInxTopMenuList, CDXDrpMenu, CDXLeaveThis, CDXLastResSprite, CDXFirstResSprite, CDXDuringSearch, CDXHelpOnStage
  3.   repeat with t = 1 to count(WhichInxTopMenuList)
  4.     set heading to getAt(getAt(WhichInxTopMenuList, t), 1)
  5.     if rollOver(heading) then
  6.       set PosInList to t
  7.       set the castNum of sprite heading to the castNum of sprite heading + 1
  8.       updateStage()
  9.       repeat while rollOver(heading)
  10.         if the mouseDown then
  11.           set the castNum of sprite getAt(getAt(WhichInxTopMenuList, t), 2) to -1
  12.           set the locH of sprite getAt(getAt(WhichInxTopMenuList, t), 2) to 2000
  13.           repeat with s = 30 to 35
  14.             set the castNum of sprite s to the number of member "CDDot"
  15.             set the locH of sprite s to 2000
  16.             set the locV of sprite s to 2000
  17.           end repeat
  18.           set the castNum of sprite 36 to the number of member "CDDot"
  19.           set the locH of sprite 36 to 2000
  20.           set CDXHelpOnStage to 0
  21.           updateStage()
  22.           set CDXDuringSearch to 0
  23.           case t of
  24.             1:
  25.               setAt(getAt(WhichInxTopMenuList, 2), 12, the locH of sprite getAt(getAt(WhichInxTopMenuList, 2), 2))
  26.               setAt(getAt(WhichInxTopMenuList, 2), 13, the locV of sprite getAt(getAt(WhichInxTopMenuList, 2), 2))
  27.               set the locH of sprite getAt(getAt(WhichInxTopMenuList, 2), 2) to 2000
  28.             3:
  29.               setAt(getAt(WhichInxTopMenuList, 4), 12, the locH of sprite getAt(getAt(WhichInxTopMenuList, 4), 2))
  30.               setAt(getAt(WhichInxTopMenuList, 4), 13, the locV of sprite getAt(getAt(WhichInxTopMenuList, 4), 2))
  31.               set the locH of sprite getAt(getAt(WhichInxTopMenuList, 4), 2) to 2000
  32.           end case
  33.           repeat with f = CDXFirstResSprite to CDXLastResSprite
  34.             set the castNum of sprite f to the number of member "CDDot"
  35.             set the locH of sprite f to 2000
  36.           end repeat
  37.           updateStage()
  38.           set the castNum of sprite CDXDrpMenu to the number of member getAt(getAt(WhichInxTopMenuList, t), 3)
  39.           set the loc of sprite CDXDrpMenu to point(getAt(getAt(WhichInxTopMenuList, t), 7), getAt(getAt(WhichInxTopMenuList, t), 8))
  40.           updateStage()
  41.           repeat while the mouseDown
  42.             repeat with s = 1 to count(WhichInxTopMenuList)
  43.               set HEADINGTwo to getAt(getAt(WhichInxTopMenuList, s), 1)
  44.               if rollOver(HEADINGTwo) and (HEADINGTwo <> heading) then
  45.                 set CDXLeaveThis to 1
  46.               end if
  47.             end repeat
  48.             if CDXLeaveThis = 1 then
  49.               set CDXLeaveThis to 0
  50.               exit repeat
  51.             end if
  52.             CDXDDPTEXT(PosInList)
  53.           end repeat
  54.           set the castNum of sprite CDXDrpMenu to -1
  55.           updateStage()
  56.           set the castNum of sprite getAt(getAt(WhichInxTopMenuList, t), 2) to the number of member getAt(getAt(WhichInxTopMenuList, t), 4)
  57.           repeat with d = 2 to the number of lines in field the number of member getAt(getAt(WhichInxTopMenuList, t), 4)
  58.             put EMPTY into line d of field the number of member getAt(getAt(WhichInxTopMenuList, t), 4)
  59.           end repeat
  60.           set the loc of sprite getAt(getAt(WhichInxTopMenuList, t), 2) to point(getAt(getAt(WhichInxTopMenuList, t), 5), getAt(getAt(WhichInxTopMenuList, t), 6))
  61.           case t of
  62.             1:
  63.               set the locH of sprite getAt(getAt(WhichInxTopMenuList, 2), 2) to getAt(getAt(WhichInxTopMenuList, 2), 12)
  64.               set the locV of sprite getAt(getAt(WhichInxTopMenuList, 2), 2) to getAt(getAt(WhichInxTopMenuList, 2), 13)
  65.             3:
  66.               set the locH of sprite getAt(getAt(WhichInxTopMenuList, 4), 2) to getAt(getAt(WhichInxTopMenuList, 4), 12)
  67.               set the locV of sprite getAt(getAt(WhichInxTopMenuList, 4), 2) to getAt(getAt(WhichInxTopMenuList, 4), 13)
  68.           end case
  69.           updateStage()
  70.         end if
  71.       end repeat
  72.       set the castNum of sprite heading to the castNum of sprite heading - 1
  73.       updateStage()
  74.     end if
  75.   end repeat
  76. end
  77.