Add support for statbar “off state” icons (#9462)

This adds support for optional “off state” icons for statbars. “off state icons” can be used to denote the lack of something, like missing hearts or bubbles.

Add "off state" textures to the builtin statbars.

Co-authored-by: SmallJoker <mk939@ymail.com>
This commit is contained in:
Wuzzy 2020-05-11 21:40:45 +02:00 committed by Nils Dagsson Moskopp
parent e97eab644a
commit 143f59d4ad
Signed by: erle
GPG Key ID: A3BC671C35191080
1 changed files with 4 additions and 0 deletions

View File

@ -5,7 +5,9 @@ local health_bar_definition = {
hud_elem_type = "statbar", hud_elem_type = "statbar",
position = {x = 0.5, y = 1}, position = {x = 0.5, y = 1},
text = "heart.png", text = "heart.png",
text2 = "heart_gone.png",
number = core.PLAYER_MAX_HP_DEFAULT, number = core.PLAYER_MAX_HP_DEFAULT,
item = core.PLAYER_MAX_HP_DEFAULT,
direction = 0, direction = 0,
size = {x = 24, y = 24}, size = {x = 24, y = 24},
offset = {x = (-10 * 24) - 25, y = -(48 + 24 + 16)}, offset = {x = (-10 * 24) - 25, y = -(48 + 24 + 16)},
@ -15,7 +17,9 @@ local breath_bar_definition = {
hud_elem_type = "statbar", hud_elem_type = "statbar",
position = {x = 0.5, y = 1}, position = {x = 0.5, y = 1},
text = "bubble.png", text = "bubble.png",
text2 = "bubble_gone.png",
number = core.PLAYER_MAX_BREATH_DEFAULT, number = core.PLAYER_MAX_BREATH_DEFAULT,
item = core.PLAYER_MAX_BREATH_DEFAULT * 2,
direction = 0, direction = 0,
size = {x = 24, y = 24}, size = {x = 24, y = 24},
offset = {x = 25, y= -(48 + 24 + 16)}, offset = {x = 25, y= -(48 + 24 + 16)},