1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-08-31 18:31:04 +00:00

In-game settings menu using separate Lua environment (#15614)

This commit is contained in:
grorp 2025-01-19 13:07:04 -05:00 committed by GitHub
parent 3cb07d5fb6
commit eeb6cab4c4
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
48 changed files with 652 additions and 290 deletions

View file

@ -0,0 +1,28 @@
// Luanti
// SPDX-License-Identifier: LGPL-2.1-or-later
// Copyright (C) 2025 grorp
#pragma once
#include "cpp_api/s_base.h"
#include "cpp_api/s_client_common.h"
#include "cpp_api/s_pause_menu.h"
#include "cpp_api/s_security.h"
class PauseMenuScripting:
virtual public ScriptApiBase,
public ScriptApiPauseMenu,
public ScriptApiClientCommon,
public ScriptApiSecurity
{
public:
PauseMenuScripting(Client *client);
void loadBuiltin();
protected:
bool checkPathInternal(const std::string &abs_path, bool write_required,
bool *write_allowed) override;
private:
void initializeModApi(lua_State *L, int top);
};