示例#1
0
        protected internal override void MouseMove(GUIMouseMoveEventArgs args)
        {
            base.MouseMove(args);

            for (var idx = 0; idx < _itemList.Count; idx++)
            {
                var item = _itemList[idx];
                if (item.Region == null)
                {
                    continue;
                }
                if (!item.Region.Value.Contains(args.RelativePosition))
                {
                    continue;
                }
                OnItemHover?.Invoke(new ItemListHoverEventArgs(idx, this));
                break;
            }
        }
示例#2
0
 public void ItemHoverEvent(ItemInstance itemInstance) => OnItemHover?.Invoke(itemInstance);
示例#3
0
 private async Task OnHover(bool isHalf)
 {
     await OnItemHover.InvokeAsync(isHalf && this.AllowHalf);
 }