Luanti 5.10.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
46 static bool mayModifyPath(std::string path);
47
48 //api calls
49
50 static int l_start(lua_State *L);
51
52 static int l_close(lua_State *L);
53
54 static int l_create_world(lua_State *L);
55
56 static int l_delete_world(lua_State *L);
57
58 static int l_get_worlds(lua_State *L);
59
60 static int l_get_mapgen_names(lua_State *L);
61
62 static int l_get_language(lua_State *L);
63
64 static int l_gettext(lua_State *L);
65
66 //packages
67
68 static int l_get_games(lua_State *L);
69
70 static int l_get_content_info(lua_State *L);
71
72 static int l_check_mod_configuration(lua_State *L);
73
74 static int l_get_content_translation(lua_State *L);
75
76 //gui
77
78 static int l_show_keys_menu(lua_State *L);
79
80 static int l_show_path_select_dialog(lua_State *L);
81
82 static int l_set_topleft_text(lua_State *L);
83
84 static int l_set_clouds(lua_State *L);
85
86 static int l_get_textlist_index(lua_State *L);
87
88 static int l_get_table_index(lua_State *L);
89
90 static int l_set_background(lua_State *L);
91
92 static int l_update_formspec(lua_State *L);
93
94 static int l_set_formspec_prepend(lua_State *L);
95
96 static int l_get_window_info(lua_State *L);
97
98 static int l_get_active_driver(lua_State *L);
99
100 static int l_get_active_renderer(lua_State *L);
101
102 static int l_get_active_irrlicht_device(lua_State *L);
103
104 static int l_irrlicht_device_supports_touch(lua_State *L);
105
106 //filesystem
107
108 static int l_get_mainmenu_path(lua_State *L);
109
110 static int l_get_user_path(lua_State *L);
111
112 static int l_get_modpath(lua_State *L);
113
114 static int l_get_modpaths(lua_State *L);
115
116 static int l_get_clientmodpath(lua_State *L);
117
118 static int l_get_gamepath(lua_State *L);
119
120 static int l_get_texturepath(lua_State *L);
121
122 static int l_get_texturepath_share(lua_State *L);
123
124 static int l_get_cache_path(lua_State *L);
125
126 static int l_get_temp_path(lua_State *L);
127
128 static int l_create_dir(lua_State *L);
129
130 static int l_delete_dir(lua_State *L);
131
132 static int l_copy_dir(lua_State *L);
133
134 static int l_is_dir(lua_State *L);
135
136 static int l_extract_zip(lua_State *L);
137
138 static int l_may_modify_path(lua_State *L);
139
140 static int l_download_file(lua_State *L);
141
142 static int l_get_video_drivers(lua_State *L);
143
144 //version compatibility
145 static int l_get_min_supp_proto(lua_State *L);
146
147 static int l_get_max_supp_proto(lua_State *L);
148
149 static int l_get_formspec_version(lua_State *L);
150
151 // other
152 static int l_open_url(lua_State *L);
153
154 static int l_open_url_dialog(lua_State *L);
155
156 static int l_open_dir(lua_State *L);
157
158 static int l_share_file(lua_State *L);
159
160 // async
161 static int l_do_async_callback(lua_State *L);
162
163public:
164
170 static void Initialize(lua_State *L, int top);
171
172 static void InitializeAsync(lua_State *L, int top);
173
174};
Definition s_async.h:64
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:1031
static int l_get_textlist_index(lua_State *L)
Definition l_mainmenu.cpp:217
static int l_get_temp_path(lua_State *L)
Definition l_mainmenu.cpp:725
static int l_get_texturepath_share(lua_State *L)
Definition l_mainmenu.cpp:709
static int l_get_cache_path(lua_State *L)
Definition l_mainmenu.cpp:718
static int l_show_keys_menu(lua_State *L)
Definition l_mainmenu.cpp:519
static void InitializeAsync(lua_State *L, int top)
Definition l_mainmenu.cpp:1168
static int l_get_modpath(lua_State *L)
Definition l_mainmenu.cpp:651
static int l_get_mapgen_names(lua_State *L)
Definition l_mainmenu.cpp:626
static int l_share_file(lua_State *L)
Definition l_mainmenu.cpp:1077
static int l_get_active_driver(lua_State *L)
Definition l_mainmenu.cpp:985
static int l_delete_world(lua_State *L)
Definition l_mainmenu.cpp:594
static int l_open_dir(lua_State *L)
Definition l_mainmenu.cpp:1069
static int l_get_modpaths(lua_State *L)
Definition l_mainmenu.cpp:660
static bool mayModifyPath(std::string path)
Checks if a path may be modified.
Definition l_mainmenu.cpp:830
static int l_get_content_info(lua_State *L)
Definition l_mainmenu.cpp:342
static int l_update_formspec(lua_State *L)
Definition l_mainmenu.cpp:78
static int l_get_texturepath(lua_State *L)
Definition l_mainmenu.cpp:700
static int l_open_url(lua_State *L)
Definition l_mainmenu.cpp:1045
static int l_extract_zip(lua_State *L)
Definition l_mainmenu.cpp:801
static int l_copy_dir(lua_State *L)
Definition l_mainmenu.cpp:764
static int l_get_content_translation(lua_State *L)
Definition l_mainmenu.cpp:500
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:46
static int l_check_mod_configuration(lua_State *L)
Definition l_mainmenu.cpp:409
static int l_create_dir(lua_State *L)
Definition l_mainmenu.cpp:735
static int l_set_topleft_text(lua_State *L)
Definition l_mainmenu.cpp:611
static int l_get_mainmenu_path(lua_State *L)
Definition l_mainmenu.cpp:820
static void Initialize(lua_State *L, int top)
initialize this API module
Definition l_mainmenu.cpp:1111
static int l_may_modify_path(lua_State *L)
Definition l_mainmenu.cpp:858
static int l_set_clouds(lua_State *L)
Definition l_mainmenu.cpp:204
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:33
static int l_show_path_select_dialog(lua_State *L)
Definition l_mainmenu.cpp:867
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:62
static int l_start(lua_State *L)
Definition l_mainmenu.cpp:112
static int l_get_active_renderer(lua_State *L)
Definition l_mainmenu.cpp:993
static int l_get_games(lua_State *L)
Definition l_mainmenu.cpp:274
static int l_open_url_dialog(lua_State *L)
Definition l_mainmenu.cpp:1053
static int l_get_clientmodpath(lua_State *L)
Definition l_mainmenu.cpp:682
static int l_gettext(lua_State *L)
Definition l_mainmenu.cpp:944
static int l_download_file(lua_State *L)
Definition l_mainmenu.cpp:890
static int l_set_background(lua_State *L)
Definition l_mainmenu.cpp:159
static int l_get_table_index(lua_State *L)
Definition l_mainmenu.cpp:224
static int l_create_world(lua_State *L)
Definition l_mainmenu.cpp:535
static int l_get_user_path(lua_State *L)
Definition l_mainmenu.cpp:643
static int l_get_gamepath(lua_State *L)
Definition l_mainmenu.cpp:691
static int l_get_window_info(lua_State *L)
Definition l_mainmenu.cpp:954
static int l_get_formspec_version(lua_State *L)
Definition l_mainmenu.cpp:1038
static int l_is_dir(lua_State *L)
Definition l_mainmenu.cpp:792
static int l_irrlicht_device_supports_touch(lua_State *L)
Definition l_mainmenu.cpp:1017
static int l_delete_dir(lua_State *L)
Definition l_mainmenu.cpp:748
static int l_get_min_supp_proto(lua_State *L)
Definition l_mainmenu.cpp:1025
static int l_close(lua_State *L)
Definition l_mainmenu.cpp:149
static int l_get_active_irrlicht_device(lua_State *L)
Definition l_mainmenu.cpp:1000
static int l_get_worlds(lua_State *L)
Definition l_mainmenu.cpp:241
static int l_do_async_callback(lua_State *L)
Definition l_mainmenu.cpp:1090
static int l_set_formspec_prepend(lua_State *L)
Definition l_mainmenu.cpp:97
static int l_get_language(lua_State *L)
Definition l_mainmenu.cpp:933
static int l_get_video_drivers(lua_State *L)
Definition l_mainmenu.cpp:912