Changeset 18 for trunk/lingosource/castlib3/Alex_HierMenuParent.ls
- Timestamp:
- 10/24/08 12:12:09 (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/lingosource/castlib3/Alex_HierMenuParent.ls
r15 r18 1 -- Hierarchisches Menu by Alex da Franca ©2001 da.Franca@online.de1 -- Hierarchisches Menu by Alex da Franca c2001 da.Franca@online.de 2 2 ------------------------------------------------------------------ 3 3 … … 212 212 213 213 pMyScrollBarScript = mGetXScript(#SliderScrollbarMenuParent) 214 if not voidP(pMyScrollBarScript) then pMyScrollBarScript = new(pMyScrollBarScript) 214 if not listP(pMyScrollBarScript) then 215 if ilk(pMyScrollBarScript) = #instance then pMyScrollBarScript = pMyScrollBarScript.script 216 pMyScrollBarScript = new(pMyScrollBarScript) 217 else 218 pMyScrollBarScript = 0 219 end if 215 220 216 221 pShadowScript = mGetXScript(#DropShadowPScript) 217 if not voidP(pShadowScript) then pShadowScript = new(pShadowScript) 222 if not listP(pShadowScript) then 223 if ilk(pShadowScript) = #instance then pShadowScript = pShadowScript.script 224 pShadowScript = new(pShadowScript) 225 else 226 pShadowScript = 0 227 end if 218 228 219 229 return me … … 1606 1616 1607 1617 -- properties dieses behviors global speichern, damit beim naechsten beginsprite dieses behaviors der alte zustand wieder hergestellt wird (z.B. bei einem sprung in ein anderes movie) 1618 if objectP(pMenuProps) then 1608 1619 if pMenuProps.getaprop(#saveProps) then 1609 1620 global gSicherprop … … 1617 1628 end if 1618 1629 -- (the actorlist).deleteOne(me) 1630 end if 1619 1631 1620 1632 -- aufraeumen … … 1891 1903 if pMyScrollBarScript.mGetEnabled() <> 1 then 1892 1904 mUpdateScrollBarRect me 1893 pMyScrollBarScript.SetEnabled(1)1905 pMyScrollBarScript.SetEnabled(1) 1894 1906 end if 1895 1907 … … 1972 1984 if ilk(pShadowScript) <> #instance then 1973 1985 pShadowScript = mGetXScript(#DropShadowPScript) 1974 if not voidP(pShadowScript) then pShadowScript = new(pShadowScript) 1986 if not listP(pShadowScript) then 1987 if ilk(pShadowScript) = #instance then pShadowScript = pShadowScript.script 1988 pShadowScript = new(pShadowScript) 1989 else 1990 pShadowScript = 0 1991 end if 1975 1992 end if 1976 1993 … … 2121 2138 2122 2139 if ilk(hgfarbe) = #color then 2123 ttimg.fill(ttimg.rect, hgfarbe)2140 ttimg.fill(ttimg.rect, hgfarbe) 2124 2141 else if hgfarbe = #image then 2125 2142 ttimg.copypixels(hgfarbe, ttimg.rect, hgfarbe.rect) … … 3171 3188 dertimer = the ticks 3172 3189 -- dieAnimTime = min((abs(pAnimStart) * max(2,(15 / abs(pAnimStart)))), 40) 3173 dieAnimTime = min((abs(pAnimStart) * 5), 40) -- animationszeit abhaengig von der hoehe des stuecks, das animiert wird,, jedoch maximal 40 ms3190 dieAnimTime = min((abs(pAnimStart) * 5), 25) -- animationszeit abhaengig von der hoehe des stuecks, das animiert wird,, jedoch maximal 40 ms 3174 3191 diebeschl = 12.0 3175 3192 … … 3501 3518 --------------------------------- 3502 3519 3503 if usealternateColor then3504 if n mod 2 then3505 derlocVHL = pZeilenhoehe * (n - pScrollOffset)3506 tr = rect(0, (derlocVHL + obenoffset + 1), (pBuffImg.rect.right - 1), (derlocV + 1 + obenoffset - pMenuProps.getaprop(#myLineWidth)))3507 pBuffImg.fill(tr, alternateColor)3508 if usealph then3509 pAlphaImage.fill(tr, rgb(0,0,0))3510 end if3511 treeviewdata.setaprop(#alternatecolor, 1)3512 else3513 treeviewdata.setaprop(#alternatecolor, 0)3514 end if3515 end if3516 3520 if usealternateColor then 3521 if n mod 2 then 3522 derlocVHL = pZeilenhoehe * (n - pScrollOffset) 3523 tr = rect(0, (derlocVHL + obenoffset + 1), (pBuffImg.rect.right - 1), (derlocV + 1 + obenoffset - pMenuProps.getaprop(#myLineWidth))) 3524 pBuffImg.fill(tr, alternateColor) 3525 if usealph then 3526 pAlphaImage.fill(tr, rgb(0,0,0)) 3527 end if 3528 treeviewdata.setaprop(#alternatecolor, 1) 3529 else 3530 treeviewdata.setaprop(#alternatecolor, 0) 3531 end if 3532 end if 3533 3517 3534 end if 3518 3535 … … 3733 3750 if ilk(pStrichel) = #image then 3734 3751 3735 -- strichellinie:3736 -- strichzahl = templiste.stelleH - 13737 strichzahl = stelleH - 13738 3739 oben = derlocV + obenoffset - pZeilenhoehe3740 unten = oben + pStrichel.rect.height3741 links = STRlinks3742 3743 if ilk(pAlphaImage) = #image then3744 3745 repeat with z = 1 to strichzahl3746 pBuffImg.copyPixels(pStrichel, rect(links, oben, (links + 1), unten), pStrichel.rect)3747 pAlphaImage.copyPixels(pStrichelAlpha, rect(links, oben, (links + 1), unten), pStrichel.rect, [#ink:#darkest])3748 links = links + tabAbstand3749 end repeat3750 3751 else3752 repeat with z = 1 to strichzahl3753 pBuffImg.copyPixels(pStrichel, rect(links, oben, (links + 1), unten), pStrichel.rect)3754 links = links + tabAbstand3755 end repeat3756 end if3757 3752 -- strichellinie: 3753 -- strichzahl = templiste.stelleH - 1 3754 strichzahl = stelleH - 1 3755 3756 oben = derlocV + obenoffset - pZeilenhoehe 3757 unten = oben + pStrichel.rect.height 3758 links = STRlinks 3759 3760 if ilk(pAlphaImage) = #image then 3761 3762 repeat with z = 1 to strichzahl 3763 pBuffImg.copyPixels(pStrichel, rect(links, oben, (links + 1), unten), pStrichel.rect) 3764 pAlphaImage.copyPixels(pStrichelAlpha, rect(links, oben, (links + 1), unten), pStrichel.rect, [#ink:#darkest]) 3765 links = links + tabAbstand 3766 end repeat 3767 3768 else 3769 repeat with z = 1 to strichzahl 3770 pBuffImg.copyPixels(pStrichel, rect(links, oben, (links + 1), unten), pStrichel.rect) 3771 links = links + tabAbstand 3772 end repeat 3773 end if 3774 3758 3775 end if 3759 3776
Note: See TracChangeset
for help on using the changeset viewer.
