Exemple #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;
        }
    }