Histogram: Fix overlap

This commit is contained in:
Wuzzy 2022-04-19 12:52:11 +02:00
parent 1335d4ffcb
commit 3e693243cd

View File

@ -824,8 +824,8 @@ end
local show_histogram_formspec = function(player, stats)
local txt = ""
local maxh = 6.0
local boxes = ""
boxes = boxes .. "label[0,7.0;"..F(S("Max.")).."\n"..F(S("Min.")).."]"
local histogram = ""
histogram = histogram .. "label[0,7.0;"..F(S("Max.")).."\n"..F(S("Min.")).."]"
local hstart = 1
-- Special case: If bucket sizes are equal, only show the last bucket
-- (can happen if scale=0)
@ -873,7 +873,7 @@ local show_histogram_formspec = function(player, stats)
end
box = box .. "tooltip["..x..",6.8;0.9,1;"..tt.."]"
boxes = boxes .. box
histogram = histogram .. box
end
local vmin, vmax
if current_perlin.dimensions == 2 then
@ -894,7 +894,9 @@ local show_histogram_formspec = function(player, stats)
label[0.25,0.2;]]..F(S("Noise Value Histogram"))..[[]
container[0.25,0.8]
]]..labels..[[
]]..boxes..[[
container_end[]
container[0.25,1.75]
]]..histogram..[[
container_end[]
container_end[]
]]