FTEQW
Documentation of the FTE engine source tree.
menu.h File Reference

Go to the source code of this file.

Classes

struct  menu_s
 
struct  menucommon_t
 
struct  menubutton_t
 
struct  menuedit_t
 
struct  menuslider_t
 
struct  menucheck_s
 
struct  menutext_t
 
struct  menucustom_s
 
struct  menupicture_t
 
struct  menubox_t
 
struct  menucombo_t
 
struct  menubind_t
 
struct  menuframe_t
 
union  menuoption_s
 
struct  menutooltip_s
 
struct  menuresel_s
 
struct  emenu_s
 
struct  menubulk_s
 

Typedefs

typedef struct menu_s menu_t
 
typedef struct emenu_s emenu_t
 
typedef struct menucheck_s menucheck_t
 
typedef struct menucustom_s menucustom_t
 
typedef union menuoption_s menuoption_t
 
typedef struct menutooltip_s menutooltip_t
 
typedef struct menuresel_s menuresel_t
 
typedef struct menubulk_s menubulk_t
 

Enumerations

enum  promptbutton_t { PROMPT_YES = 0 , PROMPT_NO = 1 , PROMPT_CANCEL = -1 }
 
enum  menutype_t {
  mt_framestart , mt_frameend , mt_button , mt_qbuttonbigfont ,
  mt_hexen2buttonbigfont , mt_box , mt_colouredbox , mt_line ,
  mt_edit , mt_text , mt_slider , mt_combo ,
  mt_bind , mt_checkbox , mt_picture , mt_picturesel ,
  mt_menudot , mt_menucursor , mt_custom
}
 
enum  chk_set_t { CHK_CHECKED , CHK_TOGGLE }
 

Functions

void M_DrawTextBox (int x, int y, int width, int lines)
 
void Menu_KeyEvent (qboolean down, int qdeviceid, int key, int unicode)
 
int Menu_WantOSK (void)
 
void Menu_Draw (void)
 
void Prompts_Draw (void)
 
void Menu_PopAll (void)
 
void Menu_Unlink (menu_t *menu, qboolean forced)
 
void Menu_Push (menu_t *menu, qboolean prompt)
 
menu_tMenu_FindContext (void *ctx)
 
qboolean Menu_IsLinked (menu_t *menu)
 
void Menu_Prompt (void(*callback)(void *, promptbutton_t), void *ctx, const char *messages, const char *optionyes, const char *optionno, const char *optioncancel, qboolean highpri)
 
void M_Init (void)
 
void M_Reinit (void)
 
void M_Shutdown (qboolean total)
 
void M_Menu_Mods_f (void)
 
void M_Menu_Installer (void)
 
mpic_t * M_CachePic (char *path)
 
void M_Menu_Quit_f (void)
 
void menufixme (void)
 
menutext_tMC_AddBufferedText (emenu_t *menu, int lhs, int rhs, int y, const char *text, int rightalign, qboolean red)
 
menutext_tMC_AddRedText (emenu_t *menu, int lhs, int rhs, int y, const char *text, int rightalign)
 
menutext_tMC_AddWhiteText (emenu_t *menu, int lhs, int rhs, int y, const char *text, int rightalign)
 
menubind_tMC_AddBind (emenu_t *menu, int cx, int bx, int y, const char *caption, char *command, const char *tooltip)
 
menubox_tMC_AddBox (emenu_t *menu, int x, int y, int width, int height)
 
menupicture_tMC_AddPicture (emenu_t *menu, int x, int y, int width, int height, const char *picname)
 
menupicture_tMC_AddSelectablePicture (emenu_t *menu, int x, int y, int height, const char *picname)
 
menupicture_tMC_AddCenterPicture (emenu_t *menu, int y, int height, const char *picname)
 
menupicture_tMC_AddCursor (emenu_t *menu, menuresel_t *resel, int x, int y)
 
menuoption_tMC_AddCursorSmall (emenu_t *menu, menuresel_t *reselection, int x)
 
menuslider_tMC_AddSlider (emenu_t *menu, int tx, int sx, int y, const char *text, cvar_t *var, float min, float max, float delta)
 
menucheck_tMC_AddCheckBox (emenu_t *menu, int tx, int cx, int y, const char *text, cvar_t *var, int cvarbitmask)
 
menucheck_tMC_AddCheckBoxFunc (emenu_t *menu, int tx, int cx, int y, const char *text, qboolean(*func)(menucheck_t *option, emenu_t *menu, chk_set_t set), int bits)
 
menubutton_tMC_AddConsoleCommand (emenu_t *menu, int lhs, int rhs, int y, const char *text, const char *command)
 
menubutton_tMC_AddConsoleCommandQBigFont (emenu_t *menu, int x, int y, const char *text, const char *command)
 
mpic_t * QBigFontWorks (void)
 
menubutton_tMC_AddConsoleCommandHexen2BigFont (emenu_t *menu, int x, int y, const char *text, const char *command)
 
menubutton_t *VARGS MC_AddConsoleCommandf (emenu_t *menu, int lhs, int rhs, int y, int rightalign, const char *text, char *command,...)
 
menubutton_tMC_AddCommand (emenu_t *menu, int lhs, int rhs, int y, const char *text, qboolean(*command)(union menuoption_s *, struct emenu_s *, int))
 
menucombo_tMC_AddCombo (emenu_t *menu, int tx, int cx, int y, const char *caption, const char **ops, int initialvalue)
 
menucombo_tMC_AddCvarCombo (emenu_t *menu, int tx, int cx, int y, const char *caption, cvar_t *cvar, const char **ops, const char **values)
 
menuedit_tMC_AddEdit (emenu_t *menu, int cx, int ex, int y, const char *text, const char *def)
 
menuedit_tMC_AddEditCvar (emenu_t *menu, int cx, int ex, int y, const char *text, const char *name, qboolean slim)
 
menucustom_tMC_AddCustom (emenu_t *menu, int x, int y, void *dptr, int dint, const char *tooltip)
 
menuframe_tMC_AddFrameStart (emenu_t *menu, int y)
 
menuframe_tMC_AddFrameEnd (emenu_t *menu, int y)
 
int MC_AddBulk (emenu_t *menu, menuresel_t *resel, menubulk_t *bulk, int xstart, int xtextend, int y)
 
emenu_tM_Options_Title (int *y, int infosize)
 
emenu_tM_CreateMenu (int extrasize)
 
void M_RemoveMenu (emenu_t *menu)
 
void M_RemoveAllMenus (qboolean leaveprompts)
 
void M_ReloadMenus (void)
 
menubutton_tM_FindButton (emenu_t *menu, const char *command)
 
void M_Complex_Key (emenu_t *currentmenu, int key, int unicode)
 
void M_Script_Init (void)
 
void M_Serverlist_Init (void)
 
void M_Menu_BasedirPrompt (ftemanifest_t *man)
 
const char * M_ChooseAutoSave (void)
 
void M_Menu_Main_f (void)
 
void M_Menu_SinglePlayer_f (void)
 
void M_Menu_Load_f (void)
 
void M_Menu_Save_f (void)
 
void M_Menu_MultiPlayer_f (void)
 
void M_Menu_Setup_f (void)
 
void M_Menu_Net_f (void)
 
void M_Menu_Options_f (void)
 
void M_Menu_Keys_f (void)
 
void M_Menu_Video_f (void)
 
void M_Menu_Help_f (void)
 
void M_Menu_Preset_f (void)
 
void M_Menu_LanConfig_f (void)
 
void M_Menu_GameOptions_f (void)
 
void M_Menu_Search_f (void)
 
void M_Menu_ServerList_f (void)
 
void M_BuildTranslationTable (unsigned int pc, unsigned int top, unsigned int bottom, unsigned int *translationTable)
 
void M_DrawCharacter (int cx, int line, unsigned int num)
 
void M_Print (int cx, int cy, qbyte *str)
 
void M_PrintWhite (int cx, int cy, qbyte *str)
 
void M_DrawScalePic (int x, int y, int w, int h, mpic_t *pic)
 
void M_UnbindCommand (const char *command)
 
int M_FindKeysForCommand (int bindmap, int pnum, const char *command, int *keylist, int *keymods, int keycount)
 
int QDECL M_FindKeysForBind (int bindmap, const char *command, int *keylist, int *keymods, int keycount)
 
void M_ToggleMenu_f (void)
 
void MP_CvarChanged (cvar_t *var)
 
qboolean MP_Init (void)
 
void MP_Shutdown (void)
 
qboolean MP_Toggle (int mode)
 
void MP_RendererRestarted (void)
 
void MP_Draw (void)
 
qboolean MP_UsingGamecodeLoadingScreen (void)
 
void MP_RegisterCvarsAndCmds (void)
 
int MP_BuiltinValid (const char *name, int num)
 
qboolean MP_ConsoleCommand (const char *cmdtext)
 
int MP_GetServerCategory (int index)
 
void MN_Shutdown (void)
 
qboolean MN_Init (void)
 
int M_GameType (void)
 
qboolean Plug_CenterPrintMessage (char *buffer, int clientnum)
 
qboolean Plug_ChatMessage (char *buffer, int talkernum, int tpflags)
 
void Plug_Command_f (void)
 
int Plug_ConnectionlessClientPacket (char *buffer, int size)
 
qboolean Plug_ConsoleLink (char *text, char *info, const char *consolename)
 
qboolean Plug_ConsoleLinkMouseOver (float x, float y, char *text, char *info)
 
void Plug_DrawReloadImages (void)
 
void Plug_Initialise (qboolean fromgamedir)
 
void Plug_Shutdown (qboolean preliminary)
 
qboolean Plug_Menu_Event (int eventtype, int keyparam, int unicodeparam)
 
void Plug_ResChanged (qboolean restarted)
 
void Plug_SBar (playerview_t *pv)
 
qboolean Plug_ServerMessage (char *buffer, int messagelevel)
 
void Plug_Tick (void)
 
qboolean Plugin_ExecuteString (void)
 
void Plug_FreeAllImages (void)
 

Variables

menu_ttopmenu
 
menu_tpromptmenu
 
menu_export_tmn_entry
 

Typedef Documentation

◆ emenu_t

typedef struct emenu_s emenu_t

◆ menu_t

typedef struct menu_s menu_t

◆ menubulk_t

typedef struct menubulk_s menubulk_t

◆ menucheck_t

typedef struct menucheck_s menucheck_t

◆ menucustom_t

typedef struct menucustom_s menucustom_t

◆ menuoption_t

typedef union menuoption_s menuoption_t

◆ menuresel_t

typedef struct menuresel_s menuresel_t

◆ menutooltip_t

typedef struct menutooltip_s menutooltip_t

Enumeration Type Documentation

◆ chk_set_t

enum chk_set_t
Enumerator
CHK_CHECKED 
CHK_TOGGLE 

◆ menutype_t

enum menutype_t
Enumerator
mt_framestart 
mt_frameend 
mt_button 
mt_qbuttonbigfont 
mt_hexen2buttonbigfont 
mt_box 
mt_colouredbox 
mt_line 
mt_edit 
mt_text 
mt_slider 
mt_combo 
mt_bind 
mt_checkbox 
mt_picture 
mt_picturesel 
mt_menudot 
mt_menucursor 
mt_custom 

◆ promptbutton_t

Enumerator
PROMPT_YES 
PROMPT_NO 
PROMPT_CANCEL 

Function Documentation

◆ M_BuildTranslationTable()

void M_BuildTranslationTable ( unsigned int  pc,
unsigned int  top,
unsigned int  bottom,
unsigned int translationTable 
)

◆ M_CachePic()

mpic_t * M_CachePic ( char *  path)

◆ M_ChooseAutoSave()

const char * M_ChooseAutoSave ( void  )

◆ M_Complex_Key()

void M_Complex_Key ( emenu_t currentmenu,
int  key,
int  unicode 
)

◆ M_CreateMenu()

emenu_t * M_CreateMenu ( int  extrasize)

◆ M_DrawCharacter()

void M_DrawCharacter ( int  cx,
int  line,
unsigned int  num 
)

◆ M_DrawScalePic()

void M_DrawScalePic ( int  x,
int  y,
int  w,
int  h,
mpic_t *  pic 
)

◆ M_DrawTextBox()

void M_DrawTextBox ( int  x,
int  y,
int  width,
int  lines 
)

◆ M_FindButton()

menubutton_t * M_FindButton ( emenu_t menu,
const char *  command 
)

◆ M_FindKeysForBind()

int QDECL M_FindKeysForBind ( int  bindmap,
const char *  command,
int keylist,
int keymods,
int  keycount 
)

◆ M_FindKeysForCommand()

int M_FindKeysForCommand ( int  bindmap,
int  pnum,
const char *  command,
int keylist,
int keymods,
int  keycount 
)

◆ M_GameType()

int M_GameType ( void  )

◆ M_Init()

void M_Init ( void  )

◆ M_Menu_BasedirPrompt()

void M_Menu_BasedirPrompt ( ftemanifest_t man)

◆ M_Menu_GameOptions_f()

void M_Menu_GameOptions_f ( void  )

◆ M_Menu_Help_f()

void M_Menu_Help_f ( void  )

◆ M_Menu_Installer()

void M_Menu_Installer ( void  )

◆ M_Menu_Keys_f()

void M_Menu_Keys_f ( void  )

◆ M_Menu_LanConfig_f()

void M_Menu_LanConfig_f ( void  )

◆ M_Menu_Load_f()

void M_Menu_Load_f ( void  )

◆ M_Menu_Main_f()

void M_Menu_Main_f ( void  )

◆ M_Menu_Mods_f()

void M_Menu_Mods_f ( void  )

◆ M_Menu_MultiPlayer_f()

void M_Menu_MultiPlayer_f ( void  )

◆ M_Menu_Net_f()

void M_Menu_Net_f ( void  )

◆ M_Menu_Options_f()

void M_Menu_Options_f ( void  )

◆ M_Menu_Preset_f()

void M_Menu_Preset_f ( void  )

◆ M_Menu_Quit_f()

void M_Menu_Quit_f ( void  )

◆ M_Menu_Save_f()

void M_Menu_Save_f ( void  )

◆ M_Menu_Search_f()

void M_Menu_Search_f ( void  )

◆ M_Menu_ServerList_f()

void M_Menu_ServerList_f ( void  )

◆ M_Menu_Setup_f()

void M_Menu_Setup_f ( void  )

◆ M_Menu_SinglePlayer_f()

void M_Menu_SinglePlayer_f ( void  )

◆ M_Menu_Video_f()

void M_Menu_Video_f ( void  )

◆ M_Options_Title()

emenu_t * M_Options_Title ( int y,
int  infosize 
)

◆ M_Print()

void M_Print ( int  cx,
int  cy,
qbyte str 
)

◆ M_PrintWhite()

void M_PrintWhite ( int  cx,
int  cy,
qbyte str 
)

◆ M_Reinit()

void M_Reinit ( void  )

◆ M_ReloadMenus()

void M_ReloadMenus ( void  )

◆ M_RemoveAllMenus()

void M_RemoveAllMenus ( qboolean  leaveprompts)

◆ M_RemoveMenu()

void M_RemoveMenu ( emenu_t menu)

◆ M_Script_Init()

void M_Script_Init ( void  )

◆ M_Serverlist_Init()

void M_Serverlist_Init ( void  )

◆ M_Shutdown()

void M_Shutdown ( qboolean  total)

◆ M_ToggleMenu_f()

void M_ToggleMenu_f ( void  )

◆ M_UnbindCommand()

void M_UnbindCommand ( const char *  command)

◆ MC_AddBind()

menubind_t * MC_AddBind ( emenu_t menu,
int  cx,
int  bx,
int  y,
const char *  caption,
char *  command,
const char *  tooltip 
)

◆ MC_AddBox()

menubox_t * MC_AddBox ( emenu_t menu,
int  x,
int  y,
int  width,
int  height 
)

◆ MC_AddBufferedText()

menutext_t * MC_AddBufferedText ( emenu_t menu,
int  lhs,
int  rhs,
int  y,
const char *  text,
int  rightalign,
qboolean  red 
)

◆ MC_AddBulk()

int MC_AddBulk ( emenu_t menu,
menuresel_t resel,
menubulk_t bulk,
int  xstart,
int  xtextend,
int  y 
)

◆ MC_AddCenterPicture()

menupicture_t * MC_AddCenterPicture ( emenu_t menu,
int  y,
int  height,
const char *  picname 
)

◆ MC_AddCheckBox()

menucheck_t * MC_AddCheckBox ( emenu_t menu,
int  tx,
int  cx,
int  y,
const char *  text,
cvar_t var,
int  cvarbitmask 
)

◆ MC_AddCheckBoxFunc()

menucheck_t * MC_AddCheckBoxFunc ( emenu_t menu,
int  tx,
int  cx,
int  y,
const char *  text,
qboolean(*)(menucheck_t *option, emenu_t *menu, chk_set_t set)  func,
int  bits 
)

◆ MC_AddCombo()

menucombo_t * MC_AddCombo ( emenu_t menu,
int  tx,
int  cx,
int  y,
const char *  caption,
const char **  ops,
int  initialvalue 
)

◆ MC_AddCommand()

menubutton_t * MC_AddCommand ( emenu_t menu,
int  lhs,
int  rhs,
int  y,
const char *  text,
qboolean(*)(union menuoption_s *, struct emenu_s *, int command 
)

◆ MC_AddConsoleCommand()

menubutton_t * MC_AddConsoleCommand ( emenu_t menu,
int  lhs,
int  rhs,
int  y,
const char *  text,
const char *  command 
)

◆ MC_AddConsoleCommandf()

menubutton_t *VARGS MC_AddConsoleCommandf ( emenu_t menu,
int  lhs,
int  rhs,
int  y,
int  rightalign,
const char *  text,
char *  command,
  ... 
)

◆ MC_AddConsoleCommandHexen2BigFont()

menubutton_t * MC_AddConsoleCommandHexen2BigFont ( emenu_t menu,
int  x,
int  y,
const char *  text,
const char *  command 
)

◆ MC_AddConsoleCommandQBigFont()

menubutton_t * MC_AddConsoleCommandQBigFont ( emenu_t menu,
int  x,
int  y,
const char *  text,
const char *  command 
)

◆ MC_AddCursor()

menupicture_t * MC_AddCursor ( emenu_t menu,
menuresel_t resel,
int  x,
int  y 
)

◆ MC_AddCursorSmall()

menuoption_t * MC_AddCursorSmall ( emenu_t menu,
menuresel_t reselection,
int  x 
)

◆ MC_AddCustom()

menucustom_t * MC_AddCustom ( emenu_t menu,
int  x,
int  y,
void dptr,
int  dint,
const char *  tooltip 
)

◆ MC_AddCvarCombo()

menucombo_t * MC_AddCvarCombo ( emenu_t menu,
int  tx,
int  cx,
int  y,
const char *  caption,
cvar_t cvar,
const char **  ops,
const char **  values 
)

◆ MC_AddEdit()

menuedit_t * MC_AddEdit ( emenu_t menu,
int  cx,
int  ex,
int  y,
const char *  text,
const char *  def 
)

◆ MC_AddEditCvar()

menuedit_t * MC_AddEditCvar ( emenu_t menu,
int  cx,
int  ex,
int  y,
const char *  text,
const char *  name,
qboolean  slim 
)

◆ MC_AddFrameEnd()

menuframe_t * MC_AddFrameEnd ( emenu_t menu,
int  y 
)

◆ MC_AddFrameStart()

menuframe_t * MC_AddFrameStart ( emenu_t menu,
int  y 
)

◆ MC_AddPicture()

menupicture_t * MC_AddPicture ( emenu_t menu,
int  x,
int  y,
int  width,
int  height,
const char *  picname 
)

◆ MC_AddRedText()

menutext_t * MC_AddRedText ( emenu_t menu,
int  lhs,
int  rhs,
int  y,
const char *  text,
int  rightalign 
)

◆ MC_AddSelectablePicture()

menupicture_t * MC_AddSelectablePicture ( emenu_t menu,
int  x,
int  y,
int  height,
const char *  picname 
)

◆ MC_AddSlider()

menuslider_t * MC_AddSlider ( emenu_t menu,
int  tx,
int  sx,
int  y,
const char *  text,
cvar_t var,
float  min,
float  max,
float  delta 
)

◆ MC_AddWhiteText()

menutext_t * MC_AddWhiteText ( emenu_t menu,
int  lhs,
int  rhs,
int  y,
const char *  text,
int  rightalign 
)

◆ Menu_Draw()

void Menu_Draw ( void  )

◆ Menu_FindContext()

menu_t * Menu_FindContext ( void ctx)

◆ Menu_IsLinked()

qboolean Menu_IsLinked ( menu_t menu)

◆ Menu_KeyEvent()

void Menu_KeyEvent ( qboolean  down,
int  qdeviceid,
int  key,
int  unicode 
)

◆ Menu_PopAll()

void Menu_PopAll ( void  )

◆ Menu_Prompt()

void Menu_Prompt ( void(*)(void *, promptbutton_t callback,
void ctx,
const char *  messages,
const char *  optionyes,
const char *  optionno,
const char *  optioncancel,
qboolean  highpri 
)

◆ Menu_Push()

void Menu_Push ( menu_t menu,
qboolean  prompt 
)

◆ Menu_Unlink()

void Menu_Unlink ( menu_t menu,
qboolean  forced 
)

◆ Menu_WantOSK()

int Menu_WantOSK ( void  )

◆ menufixme()

void menufixme ( void  )

◆ MN_Init()

qboolean MN_Init ( void  )

◆ MN_Shutdown()

void MN_Shutdown ( void  )

◆ MP_BuiltinValid()

int MP_BuiltinValid ( const char *  name,
int  num 
)

◆ MP_ConsoleCommand()

qboolean MP_ConsoleCommand ( const char *  cmdtext)

◆ MP_CvarChanged()

void MP_CvarChanged ( cvar_t var)

◆ MP_Draw()

void MP_Draw ( void  )

◆ MP_GetServerCategory()

int MP_GetServerCategory ( int  index)

◆ MP_Init()

qboolean MP_Init ( void  )

◆ MP_RegisterCvarsAndCmds()

void MP_RegisterCvarsAndCmds ( void  )

◆ MP_RendererRestarted()

void MP_RendererRestarted ( void  )

◆ MP_Shutdown()

void MP_Shutdown ( void  )

◆ MP_Toggle()

qboolean MP_Toggle ( int  mode)

◆ MP_UsingGamecodeLoadingScreen()

qboolean MP_UsingGamecodeLoadingScreen ( void  )

◆ Plug_CenterPrintMessage()

qboolean Plug_CenterPrintMessage ( char *  buffer,
int  clientnum 
)

◆ Plug_ChatMessage()

qboolean Plug_ChatMessage ( char *  buffer,
int  talkernum,
int  tpflags 
)

◆ Plug_Command_f()

void Plug_Command_f ( void  )

◆ Plug_ConnectionlessClientPacket()

int Plug_ConnectionlessClientPacket ( char *  buffer,
int  size 
)

◆ Plug_ConsoleLink()

qboolean Plug_ConsoleLink ( char *  text,
char *  info,
const char *  consolename 
)

◆ Plug_ConsoleLinkMouseOver()

qboolean Plug_ConsoleLinkMouseOver ( float  x,
float  y,
char *  text,
char *  info 
)

◆ Plug_DrawReloadImages()

void Plug_DrawReloadImages ( void  )

◆ Plug_FreeAllImages()

void Plug_FreeAllImages ( void  )

◆ Plug_Initialise()

void Plug_Initialise ( qboolean  fromgamedir)

◆ Plug_Menu_Event()

qboolean Plug_Menu_Event ( int  eventtype,
int  keyparam,
int  unicodeparam 
)

◆ Plug_ResChanged()

void Plug_ResChanged ( qboolean  restarted)

◆ Plug_SBar()

void Plug_SBar ( playerview_t pv)

◆ Plug_ServerMessage()

qboolean Plug_ServerMessage ( char *  buffer,
int  messagelevel 
)

◆ Plug_Shutdown()

void Plug_Shutdown ( qboolean  preliminary)

◆ Plug_Tick()

void Plug_Tick ( void  )

◆ Plugin_ExecuteString()

qboolean Plugin_ExecuteString ( void  )

◆ Prompts_Draw()

void Prompts_Draw ( void  )

◆ QBigFontWorks()

mpic_t * QBigFontWorks ( void  )

Variable Documentation

◆ mn_entry

menu_export_t* mn_entry
extern

◆ promptmenu

menu_t* promptmenu
extern

◆ topmenu

menu_t* topmenu
extern