PDA

View Full Version : Edit Properties Dialog in DDRs



Blake
12-11-2003, 05:38 PM
If you haven't checked out the skin I made to do this, check it out. http://vbulletin.newtek.com/showthread.php?s=&threadid=15074

I'm posting the scripted part here for educational purposes, so if you have a question about it, shoot.



//Create Edit Properties button
//The button toggles on or off the Edit Properties dialog when
//a clip is selected

CreateControl(155,0,0, "SkinControl_SubControl"):
{
MouseOver=false
Clicked=false

UpdateButtonState() = {
if (Clicked) {
if (MouseOver) SetLayer(3)
else SetLayer(1)
}
else {
if (MouseOver) SetLayer(2)
else SetLayer(0)
}
}

AddCallback("MouseEnter", code(
MouseOver=true
UpdateButtonState()
)
)

AddCallback("MouseExit", code(
MouseOver=false
UpdateButtonState()
)
)

AddCallback("MouseLButtonClick", code(
Clicked=true
UpdateButtonState()
)
)

AddCallback("MouseLButtonRelease", code(
Clicked=false
UpdateButtonState()
ToggleEdit()
)
)
}


It's basically the code from the docs, with different variable names to make it original ;)

Blake Royer
--
PIZAZZ Productions
www.pizazzme.com