summaryrefslogtreecommitdiff
path: root/builtin/mainmenu/tab_settings.lua
diff options
context:
space:
mode:
authorest31 <MTest31@outlook.com>2015-11-08 21:07:41 +0100
committerest31 <MTest31@outlook.com>2015-11-08 21:19:21 +0100
commit9a91f58e66e84bfba13c967753d537996e4c5d6d (patch)
tree77e0314a506ea81ebeefa48d3726ca5bb5e9af7f /builtin/mainmenu/tab_settings.lua
parentd657dce61b7526a097d97885b7bba9be849e302e (diff)
downloadminetest-9a91f58e66e84bfba13c967753d537996e4c5d6d.tar.gz
minetest-9a91f58e66e84bfba13c967753d537996e4c5d6d.tar.bz2
minetest-9a91f58e66e84bfba13c967753d537996e4c5d6d.zip
Settings tab: add v3f type
Add the v3f type, currently is just a nice placeholder for string. Currently undocumented, on wish of @PilzAdam, to support future changes.
Diffstat (limited to 'builtin/mainmenu/tab_settings.lua')
-rw-r--r--builtin/mainmenu/tab_settings.lua7
1 files changed, 5 insertions, 2 deletions
diff --git a/builtin/mainmenu/tab_settings.lua b/builtin/mainmenu/tab_settings.lua
index 6d71904cd..db8d08d5e 100644
--- a/builtin/mainmenu/tab_settings.lua
+++ b/builtin/mainmenu/tab_settings.lua
@@ -112,7 +112,7 @@ local function parse_setting_line(settings, line, read_all, base_level, allow_se
end
if setting_type == "string" or setting_type == "noise_params"
- or setting_type == "key" then
+ or setting_type == "key" or setting_type == "v3f" then
local default = remaining_line:match("^(.*)$")
if not default then
@@ -381,6 +381,9 @@ local function create_change_setting_formspec(dialogdata)
formspec = formspec .. ",,"
.. "," .. fgettext("Format: <offset>, <scale>, (<spreadX>, <spreadY>, <spreadZ>), <seed>, <octaves>, <persistence>") .. ","
.. "," .. fgettext("Optionally the lacunarity can be appended with a leading comma.") .. ","
+ elseif setting.type == "v3f" then
+ formspec = formspec .. ",,"
+ .. "," .. fgettext_ne("Format is 3 numbers separated by commas and inside brackets.") .. ","
end
formspec = formspec:sub(1, -2) -- remove trailing comma
@@ -424,7 +427,7 @@ local function create_change_setting_formspec(dialogdata)
.. "button[8,3.75;2,1;btn_browser_path;" .. fgettext("Browse") .. "]"
else
- -- TODO: fancy input for float, int, flags, noise_params
+ -- TODO: fancy input for float, int, flags, noise_params, v3f
local width = 10
local text = get_current_value(setting)
if dialogdata.error_message then