mirror of
https://repo.or.cz/minetest_hudbars.git
synced 2024-12-02 20:03:51 +01:00
Set bar_size to nil in progress_bar again
See the lengthy comment to learn why
This commit is contained in:
parent
48d9fd6a12
commit
1e3def3cfa
8
init.lua
8
init.lua
@ -228,7 +228,13 @@ function hb.register_hudbar(identifier, text_color, label, textures, default_sta
|
||||
local bar_image, bar_size
|
||||
if hb.settings.bar_type == "progress_bar" then
|
||||
bar_image = textures.bar
|
||||
bar_size = {x=2, y=16}
|
||||
-- NOTE: Intentionally set to nil. For some reason, on some systems,
|
||||
-- the progress bar is displaced when the bar_size is set explicitly here.
|
||||
-- On the other hand, setting this to nil is deprecated in MT 5.0.0 due to
|
||||
-- a debug log warning, but nothing is explained in lua_api.txt.
|
||||
-- This section is a potential bug magnet, please watch with care!
|
||||
-- The size of the bar image is expected to be exactly 2×16 pixels.
|
||||
bar_size = nil
|
||||
elseif hb.settings.bar_type == "statbar_classic" or hb.settings.bar_type == "statbar_modern" then
|
||||
bar_image = textures.icon
|
||||
bar_size = {x=24, y=24}
|
||||
|
Loading…
Reference in New Issue
Block a user