File: menu.h

package info (click to toggle)
xbill 2.0-9
  • links: PTS
  • area: main
  • in suites: slink
  • size: 528 kB
  • ctags: 339
  • sloc: cpp: 1,803; makefile: 38; sh: 21
file content (55 lines) | stat: -rw-r--r-- 1,035 bytes parent folder | download | duplicates (4)
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
#ifndef MENU_H
#define MENU_H

#include <X11/Intrinsic.h>
#include <X11/IntrinsicP.h>
#include <X11/StringDefs.h>

#define MAXMENUS 2
#define MAXMENUSIZE 5

typedef struct _menubuttontype {
	char *name;
	Widget *dialog;
} menubuttontype;

typedef struct _submenutype {
	char *name;
	int size;
	menubuttontype button[MAXMENUSIZE];
	Widget pulldown, pshell;
} submenutype;

typedef struct _menutype {
	int size;
	submenutype submenu[MAXMENUS];
} menutype;

extern Widget toplevel, base, menubar, field;
extern Widget aboutbox, rulesbox, storybox;
extern Widget warpbox, quitbox, newgamebox, pausebox;
extern Widget scorebox, highscorebox;
extern Widget endgamebox, enternamebox;

menutype menu = {2, 
	{
		{"Game", 5, 
			{
				{"New game", &newgamebox},
				{"Pause game", &pausebox},
				{"Warp to level...", &warpbox},
				{"View high scores", &highscorebox},
				{"Quit game", &quitbox},
			}
		},
		{"Info", 3,
			{
				{"Story of xBill", &storybox},
				{"Rules", &rulesbox},
				{"About xBill", &aboutbox},
			}
		}
	}
};

#endif