home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Inventor Labs: Technology
/
INVENTORLABS_TECHNOLOGY.BIN
/
pc
/
files
/
shared.cst
/
00045_Script_loadBtnObject
< prev
next >
Wrap
Text File
|
1997-07-24
|
3KB
|
89 lines
--P5:Tool5: load btn object --
property pToolRects, pNumOfRects
property pMenuCast
property argClickLocPnt
property pHiliteStartCast
property pHiliteSprite
property pQTVRsteps
property pKinetoscopeCast, pKSallrects
global gModeManager, gQTVRobj, gActiveQTVRhandler, gActiveFunctionObj, gEdisonFilmed
--==============================================================
on mInit me
set pKinetoscopeCast = the number of cast "TIEKSLWA.PIC"
set pKSallrects = []
return (me)
end
----------------------------------------------------------------------------ò
on mSetup me
end
----------------------------------------------------------------------------ò
on mSetMenuProp me, WhatMenuCast, toolrects, hiliteSprite, ActiveFunctionalty
set pWhatFunctActive = ActiveFunctionalty
if (WhatMenuCast = pKinetoscopeCast) then
set pKSallrects = value(string( toolrects ))
if (not gEdisonFilmed) then
set pMenuCast = pKinetoscopeCast - 1
set pHiliteStartCast = pMenuCast + 2
--deleteat(toolrects,7)
else
set toolrects = pKSallrects
set pMenuCast = WhatMenuCast
set pHiliteStartCast = pMenuCast + 1
end if
else
set pMenuCast = WhatMenuCast
set pHiliteStartCast = pMenuCast + 1
end if
set pToolRects = toolrects
set pHiliteSprite = hiliteSprite
set pNumOfRects = count(pToolRects)
end mSetMenuProp
----------------------------------------------------------------------------ò
on mGetToolMenuCast me
return ( pMenuCast )
end mGetToolMenuCast
----------------------------------------------------------------------------ò
on mButtonClicked me
set ClickLocPnt = the clickloc
set whatrect = mGetWhatToolRect( me, ClickLocPnt)
if (whatrect <> 0 ) then
if objectP(gActiveFunctionObj) then mLoad( gActiveFunctionObj, whatrect)
end if
end mButtonClicked
----------------------------------------------------------------------------ò
on mGetWhatToolRect me, argClickedPnt
set whatrect = 1
set found = #FALSE
repeat while (found = #FALSE)
if inside(argClickedPnt, getat(pToolRects,whatrect)) then
set found = #TRUE
set the castnum of sprite pHiliteSprite = pHiliteStartCast + whatrect - 1
updatestage
else set whatrect = whatrect + 1
if (whatrect > pNumOfRects) then set found = #NEVER
end repeat
if (found = #TRUE) then return( whatrect )
else return( 0 )
end mGetWhatToolRect
----------------------------------------------------------------------------ò