Exemplo n.º 1
0
 public static void Update()
 {
     if (m_Instance != null)
     {
         m_Instance.InternalUpdate();
     }
     GAbilityIcon.Update();
 }
Exemplo n.º 2
0
 public static void Update()
 {
     for (int i = 0; i < m_Instances.Count; i++)
     {
         GAbilityIcon icon = (GAbilityIcon)m_Instances[i];
         AbilityInfo  info = icon.m_Primary ? AbilityInfo.Primary : AbilityInfo.Secondary;
         icon.GumpID        = info.Icon;
         icon.Hue           = (info == AbilityInfo.Active) ? Hues.Load(0x8026) : Hues.Default;
         icon.Tooltip       = new Tooltip(Localization.GetString(info.Name), true);
         icon.Tooltip.Delay = 0.25f;
     }
 }
Exemplo n.º 3
0
        public GCombatGump() : base(0x2b02, 50, 50)
        {
            AbilityInfo[] abilities = AbilityInfo.Abilities;
            AbilityInfo   active    = AbilityInfo.Active;
            AbilityInfo   primary   = AbilityInfo.Primary;
            AbilityInfo   secondary = AbilityInfo.Secondary;
            IFont         uniFont   = Engine.GetUniFont(1);
            OnClick       onClick   = new OnClick(this.Name_OnClick);
            GLabel        toAdd     = new GLabel("INDEX", Engine.GetFont(6), Hues.Default, 100, 4);

            base.m_Children.Add(toAdd);
            toAdd = new GLabel("INDEX", Engine.GetFont(6), Hues.Default, 0x106, 4);
            base.m_Children.Add(toAdd);
            for (int i = 0; i < abilities.Length; i++)
            {
                AbilityInfo a      = abilities[i];
                IHue        hueFor = GetHueFor(a);
                toAdd       = new GTextButton(Localization.GetString(a.Name), uniFont, hueFor, hueFor, 0x38 + ((i / 9) * 0xa2), 0x26 + ((i % 9) * 15), onClick);
                a.NameLabel = (GTextButton)toAdd;
                toAdd.SetTag("Ability", a);
                toAdd.Tooltip       = new Tooltip(Localization.GetString(a.Tooltip), true, 240);
                toAdd.Tooltip.Delay = 0.25f;
                base.m_Children.Add(toAdd);
            }
            this.m_PrimaryIcon               = new GAbilityIcon(true, true, primary.Icon, 0xda, 0x69);
            this.m_PrimaryIcon.Tooltip       = new Tooltip(Localization.GetString(primary.Name), true);
            this.m_PrimaryIcon.Tooltip.Delay = 0.25f;
            this.m_PrimaryIcon.Hue           = (primary == AbilityInfo.Active) ? Hues.Load(0x8026) : Hues.Default;
            base.m_Children.Add(this.m_PrimaryIcon);
            toAdd = new GLabel("Primary", Engine.GetFont(6), Hues.Default, 0x10c, 0x69);
            base.m_Children.Add(toAdd);
            toAdd = new GLabel("Ability Icon", Engine.GetFont(6), Hues.Default, 0x10c, 0x77);
            base.m_Children.Add(toAdd);
            this.m_SecondaryIcon               = new GAbilityIcon(true, false, secondary.Icon, 0xda, 150);
            this.m_SecondaryIcon.Tooltip       = new Tooltip(Localization.GetString(secondary.Name), true);
            this.m_SecondaryIcon.Tooltip.Delay = 0.25f;
            this.m_SecondaryIcon.Hue           = (secondary == AbilityInfo.Active) ? Hues.Load(0x8026) : Hues.Default;
            base.m_Children.Add(this.m_SecondaryIcon);
            toAdd = new GLabel("Secondary", Engine.GetFont(6), Hues.Default, 0x10c, 150);
            base.m_Children.Add(toAdd);
            toAdd = new GLabel("Ability Icon", Engine.GetFont(6), Hues.Default, 0x10c, 0xa4);
            base.m_Children.Add(toAdd);
        }
Exemplo n.º 4
0
 public GCombatGump()
     : base(0x2b02, 50, 50)
 {
     AbilityInfo[] abilities = AbilityInfo.Abilities;
     AbilityInfo active = AbilityInfo.Active;
     AbilityInfo primary = AbilityInfo.Primary;
     AbilityInfo secondary = AbilityInfo.Secondary;
     IFont uniFont = Engine.GetUniFont(1);
     OnClick onClick = new OnClick(this.Name_OnClick);
     GLabel toAdd = new GLabel("INDEX", Engine.GetFont(6), Hues.Default, 100, 4);
     base.m_Children.Add(toAdd);
     toAdd = new GLabel("INDEX", Engine.GetFont(6), Hues.Default, 0x106, 4);
     base.m_Children.Add(toAdd);
     for (int i = 0; i < abilities.Length; i++)
     {
         AbilityInfo a = abilities[i];
         IHue hueFor = GetHueFor(a);
         toAdd = new GTextButton(Localization.GetString(a.Name), uniFont, hueFor, hueFor, 0x38 + ((i / 9) * 0xa2), 0x26 + ((i % 9) * 15), onClick);
         a.NameLabel = (GTextButton) toAdd;
         toAdd.SetTag("Ability", a);
         toAdd.Tooltip = new Tooltip(Localization.GetString(a.Tooltip), true, 240);
         toAdd.Tooltip.Delay = 0.25f;
         base.m_Children.Add(toAdd);
     }
     this.m_PrimaryIcon = new GAbilityIcon(true, true, primary.Icon, 0xda, 0x69);
     this.m_PrimaryIcon.Tooltip = new Tooltip(Localization.GetString(primary.Name), true);
     this.m_PrimaryIcon.Tooltip.Delay = 0.25f;
     this.m_PrimaryIcon.Hue = (primary == AbilityInfo.Active) ? Hues.Load(0x8026) : Hues.Default;
     base.m_Children.Add(this.m_PrimaryIcon);
     toAdd = new GLabel("Primary", Engine.GetFont(6), Hues.Default, 0x10c, 0x69);
     base.m_Children.Add(toAdd);
     toAdd = new GLabel("Ability Icon", Engine.GetFont(6), Hues.Default, 0x10c, 0x77);
     base.m_Children.Add(toAdd);
     this.m_SecondaryIcon = new GAbilityIcon(true, false, secondary.Icon, 0xda, 150);
     this.m_SecondaryIcon.Tooltip = new Tooltip(Localization.GetString(secondary.Name), true);
     this.m_SecondaryIcon.Tooltip.Delay = 0.25f;
     this.m_SecondaryIcon.Hue = (secondary == AbilityInfo.Active) ? Hues.Load(0x8026) : Hues.Default;
     base.m_Children.Add(this.m_SecondaryIcon);
     toAdd = new GLabel("Secondary", Engine.GetFont(6), Hues.Default, 0x10c, 150);
     base.m_Children.Add(toAdd);
     toAdd = new GLabel("Ability Icon", Engine.GetFont(6), Hues.Default, 0x10c, 0xa4);
     base.m_Children.Add(toAdd);
 }
Exemplo n.º 5
0
 protected internal override void OnDragStart()
 {
     if (this.m_InBook)
     {
         GAbilityIcon icon;
         base.m_IsDragging = false;
         Gumps.Drag = null;
         icon = new GAbilityIcon(false, this.m_Primary, base.GumpID, Engine.m_xMouse, Engine.m_yMouse) {
             Hue = base.Hue,
             m_OffsetX = icon.Width / 2,
             m_OffsetY = icon.Height / 2,
             X = Engine.m_xMouse - icon.m_OffsetX,
             Y = Engine.m_yMouse - icon.m_OffsetY,
             m_IsDragging = true
         };
         Gumps.Desktop.Children.Add(icon);
         Gumps.Drag = icon;
     }
     else
     {
         base.OnDragStart();
     }
 }
Exemplo n.º 6
0
 protected internal override void OnDragStart()
 {
     if (this.m_InBook)
     {
         GAbilityIcon icon;
         base.m_IsDragging = false;
         Gumps.Drag        = null;
         icon = new GAbilityIcon(false, this.m_Primary, base.GumpID, Engine.m_xMouse, Engine.m_yMouse)
         {
             Hue          = base.Hue,
             m_OffsetX    = icon.Width / 2,
             m_OffsetY    = icon.Height / 2,
             X            = Engine.m_xMouse - icon.m_OffsetX,
             Y            = Engine.m_yMouse - icon.m_OffsetY,
             m_IsDragging = true
         };
         Gumps.Desktop.Children.Add(icon);
         Gumps.Drag = icon;
     }
     else
     {
         base.OnDragStart();
     }
 }