NScumm.Scumm.ScummEngine2.CheckV2Inventory C# (CSharp) Метод

CheckV2Inventory() защищенный Метод

protected CheckV2Inventory ( int x, int y ) : int
x int
y int
Результат int
        protected int CheckV2Inventory(int x, int y)
        {
            int inventoryArea = /*(_game.platform == Common::kPlatformNES) ? 48: */32;
            int obj = 0;

            y -= VerbVirtScreen.TopLine;

            if ((y < inventoryArea) || !((mouseAndKeyboardStat & (KeyCode)ScummMouseButtonState.LeftClick) != 0))
                return 0;

            if (_mouseOverBoxesV2[InventoryUpArrow].rect.Contains(x, y))
            {
                if (_inventoryOffset >= 2)
                {
                    _inventoryOffset -= 2;
                    RedrawV2Inventory();
                }
            }
            else if (_mouseOverBoxesV2[InventoryDownArrow].rect.Contains(x, y))
            {
                if (_inventoryOffset + 4 < GetInventoryCountCore(Variables[VariableEgo.Value]))
                {
                    _inventoryOffset += 2;
                    RedrawV2Inventory();
                }
            }

            for (obj = 0; obj < 4; obj++)
            {
                if (_mouseOverBoxesV2[obj].rect.Contains(x, y))
                {
                    break;
                }
            }

            if (obj >= 4)
                return 0;

            return FindInventoryCore(Variables[VariableEgo.Value], obj + 1 + _inventoryOffset);
        }
ScummEngine2