From f7768ad7dcfbefce525d846ce2f565dacf99f546 Mon Sep 17 00:00:00 2001 From: James Haley Date: Sun, 5 Sep 2010 23:28:16 +0000 Subject: Corrections to some of Kaiser's previous commits. Also, significant work on dialog engine, p_enemy code, and support for all new mapthing_t flag values in P_SpawnMapThing. Subversion-branch: /branches/strife-branch Subversion-revision: 2015 --- src/strife/m_menu.h | 39 ++++++++++++++++++++++++++++++++++++--- 1 file changed, 36 insertions(+), 3 deletions(-) (limited to 'src/strife/m_menu.h') 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 -- cgit v1.2.3