aboutsummaryrefslogtreecommitdiff
path: root/lib/lua/src/ltm.h
blob: 64343b781b6498930c30abc8f56ce2f7c5ede1ac (plain)
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
/*
** $Id: ltm.h,v 2.6.1.1 2007/12/27 13:02:25 roberto Exp $
** Tag methods
** See Copyright Notice in lua.h
*/

#ifndef ltm_h
#define ltm_h


#include "lobject.h"


/*
* WARNING: if you change the order of this enumeration,
* grep "ORDER TM"
*/
typedef enum {
  TM_INDEX,
  TM_NEWINDEX,
  TM_GC,
  TM_MODE,
  TM_EQ,  /* last tag method with `fast' access */
  TM_ADD,
  TM_SUB,
  TM_MUL,
  TM_DIV,
  TM_MOD,
  TM_POW,
  TM_UNM,
  TM_LEN,
  TM_LT,
  TM_LE,
  TM_CONCAT,
  TM_CALL,
  TM_N		/* number of elements in the enum */
} TMS;



#define gfasttm(g,et,e) ((et) == NULL ? NULL : \
  ((et)->flags & (1u<<(e))) ? NULL : luaT_gettm(et, e, (g)->tmname[e]))

#define fasttm(l,et,e)	gfasttm(G(l), et, e)

LUAI_DATA const char *const luaT_typenames[];


LUAI_FUNC const TValue *luaT_gettm (Table *events, TMS event, TString *ename);
LUAI_FUNC const TValue *luaT_gettmbyobj (lua_State *L, const TValue *o,
                                                       TMS event);
LUAI_FUNC void luaT_init (lua_State *L);

#endif
">#include <string> class GUIKeyChangeMenu: public GUIModalMenu { public: GUIKeyChangeMenu(gui::IGUIEnvironment* env, gui::IGUIElement* parent, s32 id, IMenuManager *menumgr); ~GUIKeyChangeMenu(); void removeChildren(); /* Remove and re-add (or reposition) stuff */ void regenerateGui(v2u32 screensize); void drawMenu(); bool acceptInput(); bool OnEvent(const SEvent& event); private: void init_keys(); bool resetMenu(); gui::IGUIButton *forward; gui::IGUIButton *backward; gui::IGUIButton *left; gui::IGUIButton *right; gui::IGUIButton *use; gui::IGUIButton *sneak; gui::IGUIButton *jump; gui::IGUIButton *dropbtn; gui::IGUIButton *inventory; gui::IGUIButton *fly; gui::IGUIButton *fast; gui::IGUIButton *range; gui::IGUIButton *dump; gui::IGUIButton *chat; gui::IGUIButton *cmd; gui::IGUIButton *console; s32 activeKey; KeyPress key_forward; KeyPress key_backward; KeyPress key_left; KeyPress key_right; KeyPress key_use; KeyPress key_sneak; KeyPress key_jump; KeyPress key_drop; KeyPress key_inventory; KeyPress key_fly; KeyPress key_fast; KeyPress key_range; KeyPress key_chat; KeyPress key_cmd; KeyPress key_console; KeyPress key_dump; }; #endif