//################################################################################
//# ..:: created with TCT Version 4.5 for THUD v7.1 (17.2.19.0) ::.. by RealGsus #
//################################################################################

using Turbo.Plugins.Default;

namespace Turbo.Plugins.User
{

    public class TCTAttributLabelListPlugin : BasePlugin, ICustomizer
    {

        public TCTAttributLabelListPlugin()
        {
            Enabled = true;
        }

        public override void Load(IController hud)
        {
            base.Load(hud);
        }

        public void Customize()
        {
            //##### AttributLabeList Position: 10 #####
            Hud.RunOnPlugin<AttributeLabelListPlugin>(plugin =>
            {
                var index = 9;
                if (index < plugin.LabelList.LabelDecorators.Count && index >= 0) {
                    plugin.LabelList.LabelDecorators[index].TextFont = Hud.Render.CreateFont("tahoma", 7, 191, 255, 255, 255, true, false, true);
                    plugin.LabelList.LabelDecorators[index].BackgroundTexture1 = Hud.Texture.ButtonTextureBlue;
                    plugin.LabelList.LabelDecorators[index].BackgroundTexture2 = Hud.Texture.BackgroundTextureGreen;
                    plugin.LabelList.LabelDecorators[index].BackgroundTextureOpacity2 = 0.7f;
                    plugin.LabelList.LabelDecorators[index].TextFunc = () => (Hud.Game.Me.Stats.MoveSpeed).ToString("F0") + "%";
                    plugin.LabelList.LabelDecorators[index].HintFunc = () => "Скорость";
                }
            });
        }

    }

}
