Esempio n. 1
0
    public override void OnSideKeyPressed(Utils.EnumDirection direction)
    {
        base.OnSideKeyPressed(direction);

        switch (direction)
        {
        case Utils.EnumDirection.UP:
            if (itemCursor.selectedIndex - 2 >= 0)
            {
                itemCursor.CursorMoved(-2);
            }
            manager.ScrollItemList(itemCursor.selectedIndex);
            break;

        case Utils.EnumDirection.DOWN:
            if (itemCursor.selectedIndex + 2 < itemCursor.optionObjects.Count)
            {
                itemCursor.CursorMoved(2);
            }
            manager.ScrollItemList(itemCursor.selectedIndex);
            break;

        case Utils.EnumDirection.LEFT:
            manager.ScrollItemList(itemCursor.selectedIndex);
            break;

        case Utils.EnumDirection.RIGHT:
            manager.ScrollItemList(itemCursor.selectedIndex);
            break;
        }
    }