hi, i am making some stuf for menus and i was wondering how can i asign an id to some code like in gdk you can asign objects, sounds...
IDs which youn can then use(dbMoveObject(ID!!, blabla)
anyway heres my code:
void MakeButton(int img,int sprite, int HighLightImg, int HighLightSprite ,int posX, int posY)
{
dbSprite( sprite, posX, posY, img);
dbSetSprite(sprite, 1, 0);
dbSetSprite( HighLightSprite, 1, 0);
if (dbMouseX()>(posX)&&dbMouseX()<(posX+(dbGetImageWidth(img)))&&dbMouseY()>posY&&dbMouseY()<posY+(dbGetImageHeight(img)))
{
return 1;
}
if (dbMouseX()>(posX)&&dbMouseX()<(posX+(dbGetImageWidth(img)))&&dbMouseY()>posY&&dbMouseY()<posY+(dbGetImageHeight(img)))
{
dbSprite(HighLightSprite, posX, posY, HighLightImg);
dbShowSprite(sprite);
}
else
{
dbHideSprite(HighLightSprite);
}
}
then it would be great if i had a command like
MouseOverButton(ID);
or something like that.
thnx in advance
Game.Love