aboutsummaryrefslogtreecommitdiff
path: root/builtin
diff options
context:
space:
mode:
authorrubenwardy <rw@rubenwardy.com>2019-02-03 01:14:15 +0000
committerrubenwardy <rw@rubenwardy.com>2019-02-03 01:14:15 +0000
commit3c7e92049d233053a659e5665b121bea67baa69e (patch)
treefb1f879609e08553e9cf85985d65baa27a99f208 /builtin
parentcf8b0ed8a83dbeba1a7bfdc82a9fb100b3c3daa0 (diff)
downloadminetest-3c7e92049d233053a659e5665b121bea67baa69e.tar.gz
minetest-3c7e92049d233053a659e5665b121bea67baa69e.tar.bz2
minetest-3c7e92049d233053a659e5665b121bea67baa69e.zip
Content store: Fix overlapping labels
Diffstat (limited to 'builtin')
-rw-r--r--builtin/mainmenu/dlg_contentstore.lua14
1 files changed, 7 insertions, 7 deletions
diff --git a/builtin/mainmenu/dlg_contentstore.lua b/builtin/mainmenu/dlg_contentstore.lua
index a9164091a..ab55e3848 100644
--- a/builtin/mainmenu/dlg_contentstore.lua
+++ b/builtin/mainmenu/dlg_contentstore.lua
@@ -430,11 +430,17 @@ function store.get_formspec()
"button[11.1,0;1,1;pend;>>]",
"container_end[]",
}
+
+ if #store.packages == 0 then
+ formspec[#formspec + 1] = "label[4,3;"
+ formspec[#formspec + 1] = fgettext("No results")
+ formspec[#formspec + 1] = "]"
+ end
else
formspec = {
"size[12,7;true]",
"position[0.5,0.55]",
- "label[4,3;No packages could be retrieved]",
+ "label[4,3;", fgettext("No packages could be retrieved"), "]",
"button[-0.1,",
num_per_page + 1.5,
";3,1;back;",
@@ -442,12 +448,6 @@ function store.get_formspec()
}
end
- if #store.packages == 0 then
- formspec[#formspec + 1] = "label[4,3;"
- formspec[#formspec + 1] = fgettext("No results")
- formspec[#formspec + 1] = "]"
- end
-
local start_idx = (cur_page - 1) * num_per_page + 1
for i=start_idx, math.min(#store.packages, start_idx+num_per_page-1) do
local package = store.packages[i]