FS#12076 - DB stats resurrection: If the filename was changed, require
[kugel-rb.git] / apps / plugins / doom / m_menu.h
blobda360c0147df366f9c1a9de8ea46569db262ee3f
1 // Emacs style mode select -*- C++ -*-
2 //-----------------------------------------------------------------------------
3 //
4 // $Id$
5 //
6 // Copyright (C) 1993-1996 by id Software, Inc.
7 //
8 // This program is free software; you can redistribute it and/or
9 // modify it under the terms of the GNU General Public License
10 // as published by the Free Software Foundation; either version 2
11 // of the License, or (at your option) any later version.
13 // This program is distributed in the hope that it will be useful,
14 // but WITHOUT ANY WARRANTY; without even the implied warranty of
15 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 // GNU General Public License for more details.
18 // DESCRIPTION:
19 // Menu widget stuff, episode selection and such.
21 //-----------------------------------------------------------------------------
24 #ifndef __M_MENU__
25 #define __M_MENU__
29 #include "d_event.h"
32 // MENUS
34 // Called by main loop,
35 // saves config file and calls I_Quit when user exits.
36 // Even when the menu is not displayed,
37 // this can resize the view and change game parameters.
38 // Does all the real work of the menu interaction.
39 boolean M_Responder (event_t *ev);
42 // Called by main loop,
43 // only used for menu (skull cursor) animation.
44 void M_Ticker (void);
46 // Called by main loop,
47 // draws the menus directly into the screen buffer.
48 void M_Drawer (void);
50 // Called by D_DoomMain,
51 // loads the config file.
52 void M_Init (void);
54 // Called by intro code to force menu up upon a keypress,
55 // does nothing if menu is already up.
56 void M_StartControlPanel (void);
58 /****************************
60 * The setup_group enum is used to show which 'groups' keys fall into so
61 * that you can bind a key differently in each 'group'.
63 enum {
64 m_null, // Has no meaning; not applicable
65 m_scrn, // A key can not be assigned to more than one action
66 m_map, // in the same group. A key can be assigned to one
67 m_menu, // action in one group, and another action in another.
69 typedef unsigned setup_group;
71 /****************************
73 * phares 4/17/98:
74 * State definition for each item.
75 * This is the definition of the structure for each setup item. Not all
76 * fields are used by all items.
78 * A setup screen is defined by an array of these items specific to
79 * that screen.
81 * killough 11/98:
83 * Restructured to allow simpler table entries,
84 * and to Xref with defaults[] array in m_misc.c.
85 * Moved from m_menu.c to m_menu.h so that m_misc.c can use it.
88 typedef struct setup_menu_s
90 const char *m_text; /* text to display */
91 int m_flags; /* phares 4/17/98: flag bits S_* (defined above) */
92 setup_group m_group; /* Group */
93 short m_x; /* screen x position (left is 0) */
94 short m_y; /* screen y position (top is 0) */
96 union /* killough 11/98: The first field is a union of several types */
98 const void *var; /* generic variable */
99 int *m_key; /* key value, or 0 if not shown */
100 const char *name; /* name */
101 struct default_s *def; /* default[] table entry */
102 struct setup_menu_s *menu; /* next or prev menu */
103 } var;
105 int *m_mouse; /* mouse button value, or 0 if not shown */
106 int *m_joy; /* joystick button value, or 0 if not shown */
107 void (*action)(void); /* killough 10/98: function to call after changing */
108 } setup_menu_t;
113 #endif
114 //-----------------------------------------------------------------------------
116 // $Log$
117 // Revision 1.1 2006/03/28 15:44:01 dave
118 // Patch #2969 - Doom! Currently only working on the H300.
121 //-----------------------------------------------------------------------------