Luanti 5.11.0-dev
 
Loading...
Searching...
No Matches
l_mainmenu.h
Go to the documentation of this file.
1// Luanti
2// SPDX-License-Identifier: LGPL-2.1-or-later
3// Copyright (C) 2013 sapier
4
5#pragma once
6
7#include "lua_api/l_base.h"
8
9class AsyncEngine;
10
13{
14
15private:
22 static std::string getTextData(lua_State *L, const std::string &name);
23
30 static int getIntegerData(lua_State *L, const std::string &name, bool& valid);
31
38 static int getBoolData(lua_State *L, const std::string &name ,bool& valid);
39
40 //api calls
41
42 static int l_start(lua_State *L);
43
44 static int l_close(lua_State *L);
45
46 static int l_create_world(lua_State *L);
47
48 static int l_delete_world(lua_State *L);
49
50 static int l_get_worlds(lua_State *L);
51
52 static int l_get_mapgen_names(lua_State *L);
53
54 static int l_get_language(lua_State *L);
55
56 static int l_gettext(lua_State *L);
57
58 //packages
59
60 static int l_get_games(lua_State *L);
61
62 static int l_get_content_info(lua_State *L);
63
64 static int l_check_mod_configuration(lua_State *L);
65
66 static int l_get_content_translation(lua_State *L);
67
68 //gui
69
70 static int l_show_keys_menu(lua_State *L);
71
72 static int l_show_touchscreen_layout(lua_State *L);
73
74 static int l_show_path_select_dialog(lua_State *L);
75
76 static int l_set_topleft_text(lua_State *L);
77
78 static int l_set_clouds(lua_State *L);
79
80 static int l_get_textlist_index(lua_State *L);
81
82 static int l_get_table_index(lua_State *L);
83
84 static int l_set_background(lua_State *L);
85
86 static int l_update_formspec(lua_State *L);
87
88 static int l_set_formspec_prepend(lua_State *L);
89
90 static int l_get_window_info(lua_State *L);
91
92 static int l_get_active_driver(lua_State *L);
93
94 static int l_get_active_renderer(lua_State *L);
95
96 static int l_get_active_irrlicht_device(lua_State *L);
97
98 static int l_irrlicht_device_supports_touch(lua_State *L);
99
100 //filesystem
101
102 static int l_get_mainmenu_path(lua_State *L);
103
104 static int l_get_user_path(lua_State *L);
105
106 static int l_get_modpath(lua_State *L);
107
108 static int l_get_modpaths(lua_State *L);
109
110 static int l_get_clientmodpath(lua_State *L);
111
112 static int l_get_gamepath(lua_State *L);
113
114 static int l_get_texturepath(lua_State *L);
115
116 static int l_get_texturepath_share(lua_State *L);
117
118 static int l_get_cache_path(lua_State *L);
119
120 static int l_get_temp_path(lua_State *L);
121
122 static int l_create_dir(lua_State *L);
123
124 static int l_delete_dir(lua_State *L);
125
126 static int l_copy_dir(lua_State *L);
127
128 static int l_is_dir(lua_State *L);
129
130 static int l_extract_zip(lua_State *L);
131
132 static int l_may_modify_path(lua_State *L);
133
134 static int l_download_file(lua_State *L);
135
136 static int l_get_video_drivers(lua_State *L);
137
138 //version compatibility
139 static int l_get_min_supp_proto(lua_State *L);
140
141 static int l_get_max_supp_proto(lua_State *L);
142
143 static int l_get_formspec_version(lua_State *L);
144
145 // other
146 static int l_open_url(lua_State *L);
147
148 static int l_open_url_dialog(lua_State *L);
149
150 static int l_open_dir(lua_State *L);
151
152 static int l_share_file(lua_State *L);
153
154 // async
155 static int l_do_async_callback(lua_State *L);
156
157public:
158
164 static void Initialize(lua_State *L, int top);
165
166 static void InitializeAsync(lua_State *L, int top);
167
168};
Definition s_async.h:67
Definition l_base.h:28
Implementation of lua api support for mainmenu.
Definition l_mainmenu.h:13
static int l_get_max_supp_proto(lua_State *L)
Definition l_mainmenu.cpp:998
static int l_get_textlist_index(lua_State *L)
Definition l_mainmenu.cpp:218
static int l_get_temp_path(lua_State *L)
Definition l_mainmenu.cpp:746
static int l_get_texturepath_share(lua_State *L)
Definition l_mainmenu.cpp:730
static int l_get_cache_path(lua_State *L)
Definition l_mainmenu.cpp:739
static int l_show_keys_menu(lua_State *L)
Definition l_mainmenu.cpp:524
static void InitializeAsync(lua_State *L, int top)
Definition l_mainmenu.cpp:1143
static int l_get_modpath(lua_State *L)
Definition l_mainmenu.cpp:672
static int l_get_mapgen_names(lua_State *L)
Definition l_mainmenu.cpp:647
static int l_share_file(lua_State *L)
Definition l_mainmenu.cpp:1047
static int l_get_active_driver(lua_State *L)
Definition l_mainmenu.cpp:952
static int l_delete_world(lua_State *L)
Definition l_mainmenu.cpp:615
static int l_open_dir(lua_State *L)
Definition l_mainmenu.cpp:1036
static int l_get_modpaths(lua_State *L)
Definition l_mainmenu.cpp:681
static int l_get_content_info(lua_State *L)
Definition l_mainmenu.cpp:343
static int l_show_touchscreen_layout(lua_State *L)
Definition l_mainmenu.cpp:540
static int l_update_formspec(lua_State *L)
Definition l_mainmenu.cpp:79
static int l_get_texturepath(lua_State *L)
Definition l_mainmenu.cpp:721
static int l_open_url(lua_State *L)
Definition l_mainmenu.cpp:1012
static int l_extract_zip(lua_State *L)
Definition l_mainmenu.cpp:809
static int l_copy_dir(lua_State *L)
Definition l_mainmenu.cpp:778
static int l_get_content_translation(lua_State *L)
Definition l_mainmenu.cpp:505
static int getIntegerData(lua_State *L, const std::string &name, bool &valid)
read an integer variable from gamedata table within lua stack
Definition l_mainmenu.cpp:47
static int l_check_mod_configuration(lua_State *L)
Definition l_mainmenu.cpp:412
static int l_create_dir(lua_State *L)
Definition l_mainmenu.cpp:756
static int l_set_topleft_text(lua_State *L)
Definition l_mainmenu.cpp:632
static int l_get_mainmenu_path(lua_State *L)
Definition l_mainmenu.cpp:824
static void Initialize(lua_State *L, int top)
initialize this API module
Definition l_mainmenu.cpp:1085
static int l_may_modify_path(lua_State *L)
Definition l_mainmenu.cpp:834
static int l_set_clouds(lua_State *L)
Definition l_mainmenu.cpp:205
static std::string getTextData(lua_State *L, const std::string &name)
read a text variable from gamedata table within lua stack
Definition l_mainmenu.cpp:34
static int l_show_path_select_dialog(lua_State *L)
Definition l_mainmenu.cpp:844
static int getBoolData(lua_State *L, const std::string &name, bool &valid)
read a bool variable from gamedata table within lua stack
Definition l_mainmenu.cpp:63
static int l_start(lua_State *L)
Definition l_mainmenu.cpp:113
static int l_get_active_renderer(lua_State *L)
Definition l_mainmenu.cpp:960
static int l_get_games(lua_State *L)
Definition l_mainmenu.cpp:275
static int l_open_url_dialog(lua_State *L)
Definition l_mainmenu.cpp:1020
static int l_get_clientmodpath(lua_State *L)
Definition l_mainmenu.cpp:703
static int l_gettext(lua_State *L)
Definition l_mainmenu.cpp:911
static int l_download_file(lua_State *L)
Definition l_mainmenu.cpp:867
static int l_set_background(lua_State *L)
Definition l_mainmenu.cpp:160
static int l_get_table_index(lua_State *L)
Definition l_mainmenu.cpp:225
static int l_create_world(lua_State *L)
Definition l_mainmenu.cpp:556
static int l_get_user_path(lua_State *L)
Definition l_mainmenu.cpp:664
static int l_get_gamepath(lua_State *L)
Definition l_mainmenu.cpp:712
static int l_get_window_info(lua_State *L)
Definition l_mainmenu.cpp:921
static int l_get_formspec_version(lua_State *L)
Definition l_mainmenu.cpp:1005
static int l_is_dir(lua_State *L)
Definition l_mainmenu.cpp:798
static int l_irrlicht_device_supports_touch(lua_State *L)
Definition l_mainmenu.cpp:984
static int l_delete_dir(lua_State *L)
Definition l_mainmenu.cpp:767
static int l_get_min_supp_proto(lua_State *L)
Definition l_mainmenu.cpp:992
static int l_close(lua_State *L)
Definition l_mainmenu.cpp:150
static int l_get_active_irrlicht_device(lua_State *L)
Definition l_mainmenu.cpp:967
static int l_get_worlds(lua_State *L)
Definition l_mainmenu.cpp:242
static int l_do_async_callback(lua_State *L)
Definition l_mainmenu.cpp:1063
static int l_set_formspec_prepend(lua_State *L)
Definition l_mainmenu.cpp:98
static int l_get_language(lua_State *L)
Definition l_mainmenu.cpp:900
static int l_get_video_drivers(lua_State *L)
Definition l_mainmenu.cpp:879