local HudTexture bread hud hud_gaz local XmlName hud_static -- Тег ста

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
local HudTexture = {
["bread"] = "hud\\hud_gaz"
}
local XmlName = "hud_static" --'# Тег статика из ui_custom_msgs
function AddHudStatic( Item, Remove)
local Section,Hud = Item:section(),get_hud();
if not Remove and Hud:GetCustomStatic(XmlName) then
Hud:RemoveCustomStatic( XmlName); return;
end
if not HudTexture[ Section] then return; end
Hud:AddCustomStatic( XmlName, true);
Hud:GetCustomStatic( XmlName):wnd():InitTexture( HudTexture[ Section]);
end