mirror of
https://github.com/luanti-org/luanti.git
synced 2025-06-27 16:36:03 +00:00
In-game settings menu using separate Lua environment (#15614)
This commit is contained in:
parent
3cb07d5fb6
commit
eeb6cab4c4
48 changed files with 652 additions and 290 deletions
12
builtin/pause_menu/init.lua
Normal file
12
builtin/pause_menu/init.lua
Normal file
|
@ -0,0 +1,12 @@
|
|||
local scriptpath = core.get_builtin_path()
|
||||
local pausepath = scriptpath.."pause_menu"..DIR_DELIM
|
||||
local commonpath = scriptpath.."common"..DIR_DELIM
|
||||
|
||||
-- we're in-game, so no absolute paths are needed
|
||||
defaulttexturedir = ""
|
||||
|
||||
local builtin_shared = {}
|
||||
|
||||
assert(loadfile(commonpath .. "register.lua"))(builtin_shared)
|
||||
assert(loadfile(pausepath .. "register.lua"))(builtin_shared)
|
||||
dofile(commonpath .. "settings" .. DIR_DELIM .. "init.lua")
|
5
builtin/pause_menu/register.lua
Normal file
5
builtin/pause_menu/register.lua
Normal file
|
@ -0,0 +1,5 @@
|
|||
local builtin_shared = ...
|
||||
|
||||
local make_registration = builtin_shared.make_registration
|
||||
|
||||
core.registered_on_formspec_input, core.register_on_formspec_input = make_registration()
|
Loading…
Add table
Add a link
Reference in a new issue