wont load title skips straight to mainmenu

okay i am making a game and for some reason my game goes straight to the main menu instead of my title screen then main menu.
below is what i am using for my menu and title screen any ideas why it does this?

thanks for your time!!

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
bool Title() 
{	
	DrawSprite(iTitleScreen,0,0,1024,768);
	if(IsKeyDown(KEY_RETURN))
	{ 
		currentstate = MAINMENU;
	}
	if(IsKeyDown(KEY_ESCAPE))
	{
		CloseDown();
	}
	return true;
}
bool Menu()
{
	DrawSprite(iMenu,0,0,1024,768);
	{
	if (IsKeyDown(KEY_UP) && iMenuCounter <= 0)
	{
		iMenuSwitch--;
		iMenuCounter = 30;
	}
	else if (IsKeyDown(KEY_DOWN) && iMenuCounter <= 0)
	{
		iMenuSwitch++;
		iMenuCounter = 30;
	}
	if (iMenuSwitch > 5)
	{
		iMenuSwitch = 1;
	}
	else if (iMenuSwitch < 1)
	{
		iMenuSwitch = 5;
	}
		iMenuCounter--;
	}
		switch (iMenuSwitch)
	{
	case 1:
		DrawSprite(iArrow,90,100, 40, 40);
		if(IsKeyDown(KEY_RETURN))
		{
			currentstate = GAME;
		}
		else
		if(IsKeyDown(KEY_ESCAPE))
		{
		    currentstate = MAINMENU;
		}
		break;
	case 2:
		DrawSprite(iArrow,90,200, 40, 40);
		break;
	case 3:
		DrawSprite(iArrow,90,275, 40, 40);
		break;
	case 4:
		DrawSprite(iArrow,90,370, 40, 40);
		break;
	case 5:
		DrawSprite(iArrow,90,445, 40, 40);
		if(IsKeyDown(KEY_RETURN))
		{
			exit(0);
		}
		break;		
	default:
		break;
	}
	return true;
}
This is not really the important code right now. You need to show the order in which these functions are called. The functions themselves provide no information about the order in which they are called.
Topic archived. No new replies allowed.