home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Mobiclic 51
/
Mobiclic51.iso
/
mac
/
DATA
/
COMMUNS
/
MOBICLIC_MENUS.CST
/
00234_Script_GESTION_D'UNE_INTERFACE_TOUT_EN_UN
< prev
next >
Wrap
Text File
|
2003-01-30
|
2KB
|
62 lines
property pdizsprite, pdizspriteNo, pdizguy_x0, pdizguy_y0, pdizguyname, pzeNoItemInterface
global gNoItemInterface, gpiste_Interface, gpiste_Pseudo_Interface
----------------------
on beginSprite me
pdizspriteNo = me.spriteNum
pdizsprite = sprite(pdizspriteNo)
pdizguyname = pdizsprite.member.name
pyBandeau = pdizsprite.locV
gpiste_Interface = pdizspriteNo
end
------------------
on mouseEnter
if the pauseState = 1 then exit
pdizguy_x0 = pdizsprite.left
pdizguy_y0 = pdizsprite.top
x = the mouseH-pdizguy_x0
y = the mouseV-pdizguy_y0
end
-----------------------
on mouseWithin
if the pauseState = 1 then exit
x = the mouseH-pdizguy_x0
y = the mouseV-pdizguy_y0
zecolor = member(pdizguyname&"BIS").image.getPixel(x,y)
case(zecolor)of
0:
puppetSprite gpiste_Pseudo_Interface,FALSE
otherwise:
zecolor.colorType = #paletteIndex
pzeNoItemInterface = zecolor.paletteIndex
case(pzeNoItemInterface) of
0,255:
puppetSprite gpiste_Pseudo_Interface,FALSE
cursor -1
otherwise:
cursor 280
sprite(gpiste_Pseudo_Interface).member = pdizguyname&"_"&gimme2digits(pzeNoItemInterface)&"_R"
sprite(gpiste_Pseudo_Interface).loc = pdizsprite.loc
updatestage
end case
end case
end
---------------------
on mouseLeave
if the pauseState = 1 then exit
puppetSprite gpiste_Pseudo_Interface,FALSE
cursor -1
end
------------
on mouseUp
if the pauseState = 1 then exit
gNoItemInterface = pzeNoItemInterface
do "CLICK_SUR_INTERFACE_"&pdizguyname
end
---------------------
on mouseDown
if the pauseState = 1 then exit
gNoItemInterface = pzeNoItemInterface
do "DOWN_SUR_INTERFACE_"&pdizguyname
end
-----------