Luanti 5.11.0-dev
 
Loading...
Searching...
No Matches
s_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"
8#include "util/string.h"
9#include "gui/guiMainMenu.h"
10
11class ScriptApiMainMenu : virtual public ScriptApiBase {
12public:
17 void setMainMenuData(const MainMenuDataForScript *data);
18
23 void handleMainMenuEvent(const std::string &text);
24
29 void handleMainMenuButtons(const StringMap &fields);
30};
Definition s_base.h:64
Definition s_mainmenu.h:11
void handleMainMenuButtons(const StringMap &fields)
process field data received from formspec
Definition s_mainmenu.cpp:48
void setMainMenuData(const MainMenuDataForScript *data)
Hand over MainMenuDataForScript to lua to inform lua of the content.
Definition s_mainmenu.cpp:9
void handleMainMenuEvent(const std::string &text)
process events received from formspec
Definition s_mainmenu.cpp:26
std::unordered_map< std::string, std::string > StringMap
Definition string.h:65
Definition guiMainMenu.h:12