Add files via upload

master
AiTechEye 2022-07-13 18:37:28 +02:00 committed by GitHub
parent 62234d75d7
commit 81f6510f24
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 9 additions and 7 deletions

View File

@ -53,13 +53,15 @@ maps.show=function(player)
local x,y = 0,0
local form = "size[8,8]listcolors[#77777777;#777777aa;#000000ff]"
for i,v in pairs(maps.maps) do
form = form
.. "image_button["..x..","..y..";1,1;"..(v.image or "map_map.png")..(v.locked and "^default_lock_icon.png" or "")..(v.unable and "^default_cross.png" or "")..";mapsbut_"..i..";]"
.. (v.info and "tooltip[mapsbut_"..i..";"..v.info.."]" or "")
x = x + 1
if x >= 8 then
x = 0
y = y +1
if not (v.singleplayer and minetest.is_singleplayer() == false) then
form = form
.. "image_button["..x..","..y..";1,1;"..(v.image or "map_map.png")..(v.locked and "^default_lock_icon.png" or "")..(v.unable and "^default_cross.png" or "")..";mapsbut_"..i..";]"
.. (v.info and "tooltip[mapsbut_"..i..";"..v.info..(v.singleplayer and "\n(Singleplayer only)" or "").."]" or "")
x = x + 1
if x >= 8 then
x = 0
y = y +1
end
end
end
return minetest.show_formspec(name, "maps",form)