From 4d8bfa6003998ceb6e3eef797f226b02937c97b9 Mon Sep 17 00:00:00 2001 From: GreenBlob <88883098+a-blob@users.noreply.github.com> Date: Tue, 21 Nov 2023 01:30:31 +0800 Subject: [PATCH] Improve settings GUI (#1238) * Improve settings GUI * Edit `FORMSIZE.y` instead * What happened to the formatting? * Fix code editor's auto formatting --- mods/apis/ctf_settings/init.lua | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/mods/apis/ctf_settings/init.lua b/mods/apis/ctf_settings/init.lua index 2a00f9c3ad..a5277b083f 100644 --- a/mods/apis/ctf_settings/init.lua +++ b/mods/apis/ctf_settings/init.lua @@ -3,7 +3,7 @@ ctf_settings = { settings_list = {}, } -local FORMSIZE = {x = 8, y = 5} +local FORMSIZE = {x = 8, y = 9.4} local SCROLLBAR_W = 0.4 minetest.after(0, function() @@ -84,7 +84,7 @@ minetest.register_on_mods_loaded(function() local form = { {"box[-0.1,-0.1;%f,%f;#00000055]", FORMSIZE.x - SCROLLBAR_W, FORMSIZE.y}, {"scroll_container[-0.1,0.3;%f,%f;settings_scrollbar;vertical;0.1]", - FORMSIZE.x - SCROLLBAR_W, + FORMSIZE.x - SCROLLBAR_W + 2, FORMSIZE.y + 0.7 }, ctf_gui.list_to_formspec_str(setting_list), @@ -98,7 +98,7 @@ minetest.register_on_mods_loaded(function() }, } - return sfinv.make_formspec(player, context, ctf_gui.list_to_formspec_str(form), true) + return sfinv.make_formspec(player, context, ctf_gui.list_to_formspec_str(form), false) end, on_player_receive_fields = function(self, player, context, fields) local refresh = false