-
Notifications
You must be signed in to change notification settings - Fork 124
/
Copy pathmenu.h
76 lines (61 loc) · 2.15 KB
/
menu.h
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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
/*
Copyright (C) 1996-1997 Id Software, Inc.
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
$Id: menu.h,v 1.22 2007-10-17 17:08:26 dkure Exp $
*/
#ifndef __MENU_H__
#define __MENU_H__
#include "keys.h"
#define OPTPADDING 4
//
// menus
//
void M_Init (void);
void M_Keydown (int key, wchar unichar);
void M_Draw (void);
void M_ToggleMenu_f (void);
void M_LeaveMenus (void);
void M_LeaveMenu (int parent);
void M_EnterMenu (int state);
void M_Menu_Main_f (void);
void M_EnterProxyMenu (void);
void M_DrawTextBox (int x, int y, int width, int lines);
void M_Menu_Quit_f (void);
void M_Demos_Playlist_stop_f (void);
void M_Menu_ServerList_f (void);
void M_DrawTransPic (int x, int y, mpic_t *pic);
void M_DrawPic (int x, int y, mpic_t *pic);
void M_PrintWhite (int cx, int cy, char *str);
void M_Print (int cx, int cy, char *str);
void M_DrawCharacter (int cx, int line, int num);
void M_DrawSlider (int x, int y, float range);
void M_FindKeysForCommand (const char *command, int *twokeys);
void M_BuildTranslationTable(int top, int bottom);
void M_Unscale_Menu(void);
qbool Menu_Mouse_Event(const mouse_state_t* ms);
qbool Menu_ExecuteKey(int key);
extern int m_yofs;
#define FLASHINGARROW() (12+((int)(curtime*4)&1))
#define FLASHINGCURSOR() (10+((int)(curtime*4)&1))
typedef enum {
m_none, m_main, m_proxy, m_singleplayer, m_load, m_save,
m_multiplayer, m_demos, m_multiplayer_submenu,
m_options,
m_help,
m_quit, m_ingame,
#ifdef WITH_MP3_PLAYER
m_mp3_control, m_mp3_playlist
#endif
} m_state_t;
extern m_state_t m_state;
#endif // __MENU_H_