2. You should check the mouse position. I have made a function that checks if the mouse is over a sprite:
bool MouseOver(int nr)
{
if(dbMouseX() > dbSpriteX(nr) && dbMouseX() < dbSpriteX(nr) + dbSpriteWidth(nr) && dbMouseY() > dbSpriteY(nr) && dbMouseY() < dbSpriteY(nr) + dbSpriteHeight(nr))
{
return true;
}
return false;
}
3. The stretch value is in percent. You must count how many percent the image should stretch to fit the screen. And you can't stretch images for some reason, you must use sprites. Here is an example of a stretching function:
void StretchToFit(int s, int x, int y)
{
int xs = dbSpriteWidth(s), ys = dbSpriteHeight(s);
float nx = 0, ny = 0;
nx = x / 100; ny = y / 100;
dbStretchSprite(s, nx * 100, ny * 100);
}