menu presentation

I am working on a personal project using allegro/c++ and currently am displaying menus as an array of bmps. So if user hits down arrow the screen shows the next bmp which is a picture of the next word being highlighted or bigger. Seems like when i get into having a lot more options for the menu this will be a terrible way to do so. Is there a better way to do visual menus instead of just a bunch of bmps? I want more of an animated feel to it, like the letters hover around a bit when you have the certain one highlighted. I just cant seem to think of a good way to do this. Any ideas?

here is some of the code.. just to get an idea of menu navigation approach
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
int n = 0;
	int s = 0;
	int smenu = 0;
	menubuffer = create_bitmap (WIDTH, HEIGHT);
	while (!key[KEY_ESC])
	{
                //navigation through main menu
		if (key[KEY_DOWN] && smenu == 0) 
        { 
            n++;
			if(n>3)
				n=1;
			rest(100);
        }
        else if (key[KEY_UP] && smenu == 0)
		{
			n--;
			if(n<1)
				n=3;
			rest(100);
		}
		if (key[KEY_ENTER] && n == 3) 
        { 
            smenu = 1;
        }
		
		clear(menubuffer);
		draw_sprite(menubuffer,pause[n],50,50);
		//navigation through sub menu
		if( smenu == 1)
		{
			if (key[KEY_DOWN] ) 
			{ 
				s++;
				if(s>4)
					s=0;
				rest(100);
			}
			else if (key[KEY_UP] )
			{
				s--;
				if(s<0)
					s=4;
				rest(100);
			}
			rest(100);
			
			}
			int accu = 10 - int(player->accuracy);
			draw_sprite(menubuffer,skillmenu[s],WIDTH/2-200,50);
			//draw meters for players stats
			textprintf(menubuffer, font, WIDTH/2-50, 100, makecol(255,0,0), "Skill Points Remaining: %d",player->skillpoints);
			
			rectfill(menubuffer, WIDTH/2-40, 225, WIDTH/2 - 40 + 25*(player->speedskill-3),250, makecol(255,0,0));
			textprintf(menubuffer, font, WIDTH/2-50, 228, makecol(255,0,0), "%d",player->speedskill);
			rectfill(menubuffer, WIDTH/2-40, 325, WIDTH/2 - 40 + 25*(player->enduranceskill - 10),350, makecol(255,0,0));
			textprintf(menubuffer, font, WIDTH/2-50, 328, makecol(255,0,0), "%d",player->enduranceskill);
			rectfill(menubuffer, WIDTH/2-40, 425, WIDTH/2 - 40 + 25*(accu),450, makecol(255,0,0));
			textprintf(menubuffer, font, WIDTH/2-50, 428, makecol(255,0,0), "%d",accu);
			rectfill(menubuffer, WIDTH/2-40, 525, WIDTH/2 - 40 + 25*(player->sprint - 10),550, makecol(255,0,0));
			textprintf(menubuffer, font, WIDTH/2-50, 528, makecol(255,0,0), "%d",player->sprint);

		}
		stretch_sprite(menubuffer, player_image[0], 100, 125, 150, 192);
		vsync();
        acquire_screen();
		blit(menubuffer, screen, 0, 0, 0, 0, WIDTH-1, HEIGHT-1);
        release_screen();
		
	}
	destroy_bitmap(menubuffer);
	rest(100);



I might be explaining this incorrectly, here is a vid, menu shows up a little bit into it..

http://www.youtube.com/watch?v=DprPmqT6Myk
You need to take a more object oriented approach. Create classes for your menus to start with.
Yeah that makes sense. I can make a guy run around and kill a bunch of animated guys, i should be able to make a menu in a similar manner, i just don't know why I'm having trouble 'processing' the idea of how to do this best. I'll give it a shot in an object oriented way. Thanks return 0.
Topic archived. No new replies allowed.