public void OnMouseHover( dfControl control, dfMouseEventArgs mouseEvent ) { if( isTooltipVisible ) return; var isSpellSlot = actionBar.Controls.Contains( mouseEvent.Source ); if( isSpellSlot ) { target = mouseEvent.Source; if( target == lastTarget ) return; lastTarget = target; isTooltipVisible = true; var slot = target.GetComponentInChildren<SpellSlot>(); if( string.IsNullOrEmpty( slot.Spell ) ) return; var spell = SpellDefinition.FindByName( slot.Spell ); if( spell == null ) return; ActionbarsTooltip.Show( spell ); } else { lastTarget = null; } }
public void OnMouseHover(dfControl control, dfMouseEventArgs mouseEvent) { if (isTooltipVisible) { return; } var isSpellSlot = actionBar.Controls.Contains(mouseEvent.Source); if (isSpellSlot) { target = mouseEvent.Source; if (target == lastTarget) { return; } lastTarget = target; isTooltipVisible = true; var slot = target.GetComponentInChildren <SpellSlot>(); if (string.IsNullOrEmpty(slot.Spell)) { return; } var spell = SpellDefinition.FindByName(slot.Spell); if (spell == null) { return; } ActionbarsTooltip.Show(spell); } else { lastTarget = null; } }