summaryrefslogtreecommitdiff
path: root/src/strife/m_menu.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/strife/m_menu.h')
-rw-r--r--src/strife/m_menu.h39
1 files changed, 36 insertions, 3 deletions
diff --git a/src/strife/m_menu.h b/src/strife/m_menu.h
index c06fe981..82848126 100644
--- a/src/strife/m_menu.h
+++ b/src/strife/m_menu.h
@@ -28,9 +28,40 @@
#ifndef __M_MENU__
#define __M_MENU__
+#include "d_event.h"
+//
+// MENU TYPEDEFS
+//
-#include "d_event.h"
+// haleyjd 09/04/10: [STRIFE] Made external
+
+typedef struct
+{
+ // 0 = no cursor here, 1 = ok, 2 = arrows ok
+ short status;
+
+ char name[10];
+
+ // choice = menu item #.
+ // if status = 2,
+ // choice=0:leftarrow,1:rightarrow
+ void (*routine)(int choice);
+
+ // hotkey in menu
+ char alphaKey;
+} menuitem_t;
+
+typedef struct menu_s
+{
+ short numitems; // # of menu items
+ struct menu_s* prevMenu; // previous menu
+ menuitem_t* menuitems; // menu items
+ void (*routine)(); // draw routine
+ short x;
+ short y; // x,y of menu
+ short lastOn; // last item user was on in menu
+} menu_t;
//
// MENUS
@@ -59,11 +90,13 @@ void M_Init (void);
// does nothing if menu is already up.
void M_StartControlPanel (void);
+// haleyjd 09/04/10: Externalized. Draws menu text.
+int M_WriteText(int x, int y, char *string);
+// haleyjd 09/04/10: [STRIFE] New function.
+void M_DialogDimMsg(int x, int y, char *str, boolean useyfont);
extern int detailLevel;
extern int screenblocks;
-
-
#endif