void OnMouseLeave(object sender, EventArgs e) { // this event fires when the cursor is over the TOOLTIP (which can show up over an icon) // check to see if the cursor's screen coords converted to client coords is NOT over an icon // only if then, deactivate // UPDATE: f**k that noise. transparent window style on the tooltip's createparams fixes all that sheeeittt //if (GetSkillOnMouse(this.PointToClient(System.Windows.Forms.Cursor.Position)) == null) ToolTip.Deactivate(); // cancel highlighted icon SelectedSkillUI = null; }
void OnMouseMove(object sender, MouseEventArgs e) { SkillUI sUI = GetSkillOnMouse(e.Location); // lovely function already accounts for scrolling if (sUI == null) { SelectedSkillUI = null; ToolTip.Deactivate(); return; // they moused nothing } // the mouse is now officially hovering over a skill Point ptSkillLoc = GetScrolledGridLocation(sUI.XGrid, sUI.YGrid); ptSkillLoc.X += m_nIconSize; ToolTip.Activate(sUI.Skill, ptSkillLoc); // dont redraw for no reason if (SelectedSkillUI != sUI) { SelectedSkillUI = sUI; } }
public void OnPointerExit(PointerEventData eventData) { tooltip.Deactivate(); }