Luanti 5.10.0-dev
 
Loading...
Searching...
No Matches
scripting_mainmenu.h
Go to the documentation of this file.
1// Luanti
2// SPDX-License-Identifier: LGPL-2.1-or-later
3// Copyright (C) 2013 celeron55, Perttu Ahola <celeron55@gmail.com>
4
5#pragma once
6
7#include "cpp_api/s_base.h"
9#include "cpp_api/s_async.h"
10
11/*****************************************************************************/
12/* Scripting <-> Main Menu Interface */
13/*****************************************************************************/
14
16 : virtual public ScriptApiBase,
18{
19public:
20 MainMenuScripting(GUIEngine* guiengine);
21
22 // Global step handler to pass back async events
23 void step();
24
25 // Calls core.on_before_close()
26 void beforeClose();
27
28 // Pass async events from engine to async threads
29 u32 queueAsync(std::string &&serialized_func,
30 std::string &&serialized_param);
31
32private:
33 void initializeModApi(lua_State *L, int top);
34 static void registerLuaClasses(lua_State *L, int top);
35
37};
Definition s_async.h:64
implementation of main menu based uppon formspecs
Definition guiEngine.h:113
Definition scripting_mainmenu.h:18
void step()
Definition scripting_mainmenu.cpp:86
AsyncEngine asyncEngine
Definition scripting_mainmenu.h:36
void beforeClose()
Definition scripting_mainmenu.cpp:72
MainMenuScripting(GUIEngine *guiengine)
Definition scripting_mainmenu.cpp:22
void initializeModApi(lua_State *L, int top)
Definition scripting_mainmenu.cpp:46
static void registerLuaClasses(lua_State *L, int top)
Definition scripting_mainmenu.cpp:66
u32 queueAsync(std::string &&serialized_func, std::string &&serialized_param)
Definition scripting_mainmenu.cpp:91
Definition s_base.h:64
Definition s_mainmenu.h:11