コード例 #1
0
        private void panel_Click(object sender, EventArgs e)
        {
            List <int> selected = new List <int>();

            foreach (var p in players)
            {
                var point = panel.PointToClient(Cursor.Position);
                p.IsSelected = p.IsHovered(point.X, point.Y);
                if (p.IsSelected)
                {
                    selected.Add(p.Index);
                }
            }
            lvActions.Items.Clear();
            lvActions.Items.AddRange(_root.CollectActions(selected).ToArray());
            Draw();
        }