Add tooltips to options

This commit is contained in:
Jean-Patrick Guerrero 2021-11-15 03:29:21 +01:00
parent e60f986484
commit 09b34f0274

View File

@ -470,7 +470,7 @@ local function show_popup(fs, data)
str = data.home:gsub(",", " "):sub(2,-2):gsub("%.%d", ""):gsub( str = data.home:gsub(",", " "):sub(2,-2):gsub("%.%d", ""):gsub(
"(%-?%d+)", function(a) "(%-?%d+)", function(a)
c = c + 1 c = c + 1
return fmt("<b>%s:</b> <style color=%s font=mono>%s</style>", return fmt("<b>%s: <style color=%s font=mono>%s</style></b>",
coords[c], colors.black, a) coords[c], colors.black, a)
end) end)
end end
@ -511,9 +511,18 @@ local function show_popup(fs, data)
fs(fmt("field[5.4,10.68;2.4,0.45;drop_items;Drop items:;%s]", fs(fmt("field[5.4,10.68;2.4,0.45;drop_items;Drop items:;%s]",
ESC(concat(data.drop_items or {}, ",")))) ESC(concat(data.drop_items or {}, ","))))
fs("field_close_on_enter[drop_items;false]") fs("field_close_on_enter[drop_items;false]")
fs(fmt("tooltip[drop_items;%s;#707070;#fff]",
ES"Format:" .. "\n" .. fs(fmt("tooltip[cb_inv_compress;%s;#707070;#fff]",
("mod:item,mod:item, ..."):gsub("(%a+:%a+)", clr("#bddeff", "%1")))) ES"Enable this option to compress your inventory"),
fmt("tooltip[cb_reverse_sorting;%s;#707070;#fff]",
ES"Enable this option to sort your inventory in reverse order"),
fmt("tooltip[cb_ignore_hotbar;%s;#707070;#fff]",
ES"Enable this option to sort your inventory except the hotbar slots"),
fmt("tooltip[cb_auto_sorting;%s;#707070;#fff]",
ES"Enable this option to sort your inventory automatically"),
fmt("tooltip[drop_items;%s;#707070;#fff]",
"Add a comma-separated list of items to drop on inventory sorting.\n" ..
"Format: " .. ("mod:item,mod:item, ..."):gsub("(%a+:%a+)", clr("#bddeff", "%1"))))
end end
end end
end end