Ok, so I want menuscroll.jpg to be my background. When i run this code I get an error, but if I hit ok, everything else ends up fine, but the menu doesn't show. Help? Here is the code:
Quote: "#include "DarkGDK.h"
bool InTitle = true;
bool MouseInRectangle ( float x1, float y1, float x2, float y2 );
void DarkGDK ( void )
{
dbSyncOn ( );
dbSyncRate ( 60 );
dbSetImageColorKey ( 255, 255, 255 );
sbLoadImage ( "MenuScroll.png", 1 );
dbLoadImage ( "_NewGame.png", 2 );
dbLoadImage ( "_LoadGame.png", 3 );
dbLoadImage ( "_Options.png", 4 );
dbLoadImage ( "_Exit.png", 5 );
dbSprite ( 1, dbScreenWidth ( ) / 2 - 50, 100, 1 );
dbSprite ( 2, dbScreenWidth ( ) / 2 - 50, 180, 2 );
dbSprite ( 3, dbScreenWidth ( ) / 2 - 50, 210, 3 );
dbSprite ( 4, dbScreenWidth ( ) / 2 - 50, 240, 4 );
dbSprite ( 5, dbScreenWidth ( ) / 2 - 50, 270, 5 );
while ( LoopGDK ( ) )
{
if ( InTitle == true )
{
if ( MouseInRectangle ( dbScreenWidth ( ) / 2 - 50, 280, dbScreenWidth ( ) / 2 + 50, 312 ) )
{
if ( dbMouseClick ( ) == 1 )//1 = Left Click, 2 = Right Click
{
InTitle = false;
//New Game Code
}
else
{
//Mouse Hovering Over Button Code (just to make it look nice)
}
}
else
if ( MouseInRectangle ( dbScreenWidth ( ) / 2 - 50, 320, dbScreenWidth ( ) / 2 + 50, 352 ) )
{
if ( dbMouseClick ( ) == 1 )//1 = Left Click, 2 = Right Click
{
InTitle = false;
//Load Game Code
}
else
{
//Mouse Hovering Over Button Code (just to make it look nice)
}
}
else
if ( MouseInRectangle ( dbScreenWidth ( ) / 2 - 50, 360, dbScreenWidth ( ) / 2 + 50, 392 ) )
{
if ( dbMouseClick ( ) == 1 )//1 = Left Click, 2 = Right Click
{
//Options Code
}
else
{
//Mouse Hovering Over Button Code (just to make it look nice)
}
}
else
if ( MouseInRectangle ( dbScreenWidth ( ) / 2 - 50, 400, dbScreenWidth ( ) / 2 + 50, 432 ) )
{
if ( dbMouseClick ( ) == 1 )//1 = Left Click, 2 = Right Click
{
exit ( 1 );
}
else
{
//Mouse Hovering Over Button Code (just to make it look nice)
}
}
}
dbSync ( );
}
return;
}
bool MouseInRectangle ( float x1, float y1, float x2, float y2 )
{
float MX = dbMouseX ( );
float MY = dbMouseY ( );
if ( MX > x1 && MY > y1 && MX < x2 && MY < y2 )
return true;
else
return false;
}"