Example #1
0
        private void TalentTree_MouseMove(object sender, MouseEventArgs e)
        {
            int row = ((e.Y - 8) % 65 > 48 || e.Y < 8) ? -1 : (e.Y - 8) / 65;
            int col = ((e.X - 8) % 65 > 47 || e.X < 8) ? -1 : (e.X - 8) / 65;

            if (row >= 0 && row <= 10 && col >= 0 && col <= 3)
            {
                if (row != _mouseRow || col != _mouseCol)
                {
                    TalentItem talent = _talents[row, col];
                    if (talent != null)
                    {
                        _toolTip.Show(talent.TooltipText(), this, col * 65 + 65, row * 65 + 24);
                    }
                    else
                    {
                        _toolTip.Hide(this);
                    }
                }
            }
            else
            {
                _toolTip.Hide(this);
            }
            _mouseRow = row;
            _mouseCol = col;
        }
Example #2
0
        void item_CurrentRankChanged(object sender, EventArgs e)
        {
            TalentItem item = sender as TalentItem;

            if (_mouseRow == item.Row && _mouseCol == item.Col)
            {
                _toolTip.Show(item.TooltipText(), this, _mouseCol * 65 + 65, _mouseRow * 65 + 24);
            }
        }