mirror of
https://github.com/GreenComfyTea/MHR-Overlay.git
synced 2026-01-24 12:28:03 -08:00
?
This commit is contained in:
@@ -2,9 +2,10 @@ local stamina_UI_entity = {};
|
||||
local table_helpers;
|
||||
local drawing;
|
||||
|
||||
function stamina_UI_entity.new(bar, text_label, value_label, percentage_label)
|
||||
function stamina_UI_entity.new(visibility, bar, text_label, value_label, percentage_label)
|
||||
local entity = {};
|
||||
|
||||
entity.visibility = visibility;
|
||||
entity.bar = table_helpers.deep_copy(bar);
|
||||
entity.text_label = table_helpers.deep_copy(text_label);
|
||||
entity.value_label = table_helpers.deep_copy(value_label);
|
||||
@@ -14,6 +15,10 @@ function stamina_UI_entity.new(bar, text_label, value_label, percentage_label)
|
||||
end
|
||||
|
||||
function stamina_UI_entity.draw(monster, stamina_UI, position_on_screen, opacity_scale)
|
||||
if not stamina_UI.visibility then
|
||||
return;
|
||||
end
|
||||
|
||||
drawing.draw_bar(stamina_UI.bar, position_on_screen, opacity_scale, monster.stamina_percentage);
|
||||
|
||||
drawing.draw_label(stamina_UI.text_label, position_on_screen, opacity_scale);
|
||||
|
||||
Reference in New Issue
Block a user