From cef11f53010c28b3f73819ed31be768718ea5631 Mon Sep 17 00:00:00 2001 From: Jean-Patrick Guerrero Date: Sun, 7 Aug 2022 16:34:19 +0200 Subject: [PATCH] Update README --- README.md | 4 +++- src/gui.lua | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index f39d019..ecc3443 100644 --- a/README.md +++ b/README.md @@ -7,7 +7,7 @@ This mod features a modern, powerful inventory menu with a good user experience. **`i3`** provides a rich [**API**](https://github.com/minetest-mods/i3/blob/master/API.md) for mod developers who want to extend it. -This mod requires **Minetest 5.4+** +This mod requires **Minetest 5.6+** #### List of features: - Crafting Guide (survival mode only) @@ -43,6 +43,8 @@ To use this mod in the best conditions: If the inventory's font size is too big on certain setups (namely Windows 10/11 or 144 DPI display), you should lower the value of the setting `display_density_factor` in your `minetest.conf`. Note that the change is applied after restart. +You can also use the font size slider in the inventory, settings window. + #### Notes `i3` uses a larger inventory than the usual inventories in Minetest games. diff --git a/src/gui.lua b/src/gui.lua index 30ab069..1c30d6c 100644 --- a/src/gui.lua +++ b/src/gui.lua @@ -621,7 +621,9 @@ local function show_popup(fs, data) local sign = (data.font_size > 0 and "+") or (data.font_size > 0 and "-") or "" label(5.4, 10.55, ES"Font size" .. fmt(": %s", sign .. data.font_size)) - fs"scrollbaroptions[min=-5;max=5;smallstep=1;largestep=1;thumbsize=2]" + + local range = 5 + fs(fmt("scrollbaroptions[min=-%u;max=%u;smallstep=1;largestep=1;thumbsize=2]", range, range)) fs(fmt("scrollbar[5.4,10.8;2.5,0.25;horizontal;sb_font_size;%d]", data.font_size)) fs(fmt("tooltip[cb_inv_compress;%s;#707070;#fff]",