Exemplo n.º 1
0
        public override void OnKeyPressed(EKeyboardKey key)
        {
            // check if the pressed key is already handled
            // by the selection handler (if yes returns true)
            // don't check for other buttons if it's handled
            // just update the screen
            if (_selectionHandler.HandleKeypress(key))
            {
                UpdateScreen();
                return;
            }

            // check if the pressed key is adjusting a setting
            if (key == EKeyboardKey.Left || key == EKeyboardKey.Right)
            {
                OnEntryAdjusted(_selectionHandler.CurrentSelectionIndex, key == EKeyboardKey.Right);
                UpdateScreen();
            }

            switch (key)
            {
            case EKeyboardKey.Back:
                ReturnView();
                break;
            }
        }
Exemplo n.º 2
0
        public override void OnKeyPressed(EKeyboardKey key)
        {
            // check if the pressed key is already handled
            // by the selection handler (if yes returns true)
            // don't check for other buttons if it's handled
            // just update the screen
            if (_selectionHandler.HandleKeypress(key))
            {
                UpdateScreen();
                return;
            }

            switch (key)
            {
            case EKeyboardKey.Back:
                ReturnView();
                break;
            }
        }
Exemplo n.º 3
0
        public override void OnKeyPressed(EKeyboardKey key)
        {
            if (_isFirstView)
            {
                _isFirstView = false;
                RefreshMapList();
                return;
            }

            if (_isError)
            {
                _isError = false;
                ReturnToMainMenu();
                return;
            }

            if (_selectionHandler.HandleKeypress(key))
            {
                DrawList();
                return;
            }

            if (_pageHandler.HandleKeyPress(key))
            {
                _selectionHandler.CurrentSelectionIndex = 0;
                DrawList();
                return;
            }

            switch (key)
            {
            case EKeyboardKey.Back:
                PreviewOrb.HideOrb();
                MapLoader.HideTreeTeleporter();
                ReturnToMainMenu();
                break;

            case EKeyboardKey.Option1:
                RefreshMapList(true);
                break;
            }
        }