menu_toggle
This commit is contained in:
parent
4e25d88936
commit
e1b44b6c26
|
@ -22,7 +22,6 @@ static char *last_cmd = NULL;
|
|||
|
||||
void game_cursor(int on);
|
||||
void mouse_reset(int hl);
|
||||
static void menu_toggle(void);
|
||||
|
||||
void game_err_msg(const char *s)
|
||||
{
|
||||
|
@ -2011,7 +2010,7 @@ void mouse_reset(int hl)
|
|||
}
|
||||
|
||||
|
||||
static void menu_toggle(void)
|
||||
void menu_toggle(void)
|
||||
{
|
||||
mouse_reset(1);
|
||||
menu_shown ^= 1;
|
||||
|
|
|
@ -80,6 +80,7 @@ extern int game_from_disk(void);
|
|||
|
||||
extern int game_pict_modify(img_t p);
|
||||
extern int game_pict_coord(int *x, int *y, int *w, int *h);
|
||||
extern void menu_toggle(void);
|
||||
|
||||
#define CURSOR_CLEAR -1
|
||||
#define CURSOR_OFF 0
|
||||
|
|
|
@ -1146,6 +1146,11 @@ static int luaB_free_sprite(lua_State *L) {
|
|||
return 1;
|
||||
}
|
||||
|
||||
static int luaB_show_menu(lua_State *L) {
|
||||
menu_toggle();
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int luaB_free_font(lua_State *L) {
|
||||
const char *key = luaL_optstring(L, 1, NULL);
|
||||
_fnt_t *fn;
|
||||
|
@ -1173,6 +1178,7 @@ static const luaL_Reg base_funcs[] = {
|
|||
{"set_timer", luaB_set_timer},
|
||||
{"theme_var", luaB_theme_var},
|
||||
{"readdir", dir_iter_factory},
|
||||
{"menu_toggle", luaB_show_menu},
|
||||
|
||||
{"font_load", luaB_load_font},
|
||||
{"font_free", luaB_free_font},
|
||||
|
|
Loading…
Reference in a new issue