Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using SharpDX;
- using System;
- using Turbo.Plugins.Default;
- namespace Turbo.Plugins.Csavo
- {
- public class CustomSkillBarPlugin : BasePlugin, IInGameTopPainter, ICustomizer // Modified Skill Bar Plugin for showing Cooldown and Resource Cost values for skills. Credits to KillerJohn (http://www.ownedcore.com/forums/members/863466-killerjohn.html) for the OriginalSkillBarPlugin
- {
- public CustomSkillPainter CustomSkillPainter { get; set; } // version 1.0 - April 10th 2017
- public CustomSkillBarPlugin()
- {
- Enabled = true;
- }
- public override void Load(IController hud)
- {
- base.Load(hud);
- CustomSkillPainter = new CustomSkillPainter(Hud, true)
- {
- TextureOpacity = 0.0f,
- };
- }
- public void Customize()
- {
- Hud.TogglePlugin<OriginalSkillBarPlugin>(false);
- }
- public void PaintTopInGame(ClipState clipState)
- {
- if (Hud.Render.UiHidden) return;
- if (clipState != ClipState.BeforeClip) return;
- var uiSkill1 = Hud.Render.GetPlayerSkillUiElement(ActionKey.Skill1);
- foreach (var skill in Hud.Game.Me.Powers.UsedSkills)
- {
- var ui = Hud.Render.GetPlayerSkillUiElement(skill.Key);
- var rect = new RectangleF((float)Math.Round(ui.Rectangle.X) + 0.5f, (float)Math.Round(uiSkill1.Rectangle.Y) + 0.5f, (float)Math.Round(ui.Rectangle.Width), (float)Math.Round(uiSkill1.Rectangle.Height));
- CustomSkillPainter.Paint(skill, rect);
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement