home *** CD-ROM | disk | FTP | other *** search
- property Sp, backSp1, BackSp2, pEnd, myMode, fCounter, pMenuTxt, pBen, pBen2, pEnd2, myList, lastSp
- global menuStartSp, ShadowOffset, bWidth, bHeight, ActiveSection, MaxItems
-
- on beginSprite me
- menuTree = member("menutree")
- return me
- Sp = sprite(me.spriteNum)
- myMode = "off"
- end
-
- on pInit me, pList, menuBack1, menuBack2, MMSp
- Sp = sprite(me.spriteNum)
- myList = pList
- backSp1 = menuBack1
- if menuBack2 <> 0 then
- BackSp2 = menuBack2
- else
- BackSp2 = 0
- end if
- pMenuTxt = sprite(MMSp)
- pb = myList.count
- if myList.count > MaxItems then
- pEnd = myList[MaxItems]
- else
- pEnd = myList[pb]
- end if
- pEnd2 = myList[pb]
- end
-
- on mouseEnter me
- sendAllSprites(#HideMenu, 0)
- tRect = rect(pMenuTxt.left, pMenuTxt.top - (bHeight / 2), pMenuTxt.right + 1, pEnd.bottom + (bHeight * 4))
- sprite(backSp1).rect = tRect
- if BackSp2 <> 0 then
- bRect = rect(pMenuTxt.right - 5, pMenuTxt.bottom, pMenuTxt.right + bWidth, pEnd2.bottom + (bHeight * 4))
- sprite(BackSp2).rect = bRect
- end if
- repeat with i = 1 to myList.count
- myList[i].visible = 1
- end repeat
- pChar = Sp.member.char.count - 1
- ActiveSection = Sp.member.text.char[1..pChar]
- end
-
- on HideMenu me
- repeat with i = 1 to myList.count
- if myList[i] = sprite(pMenuTxt) then
- myList[i].visible = 1
- next repeat
- end if
- myList[i].visible = 0
- end repeat
- end
-