문제

We are using Sun Java Wireless Toolkit 2.5.2 and lcdui package for our j2me application. We want to disable the navigation keys (UP, DOWN, LEFT, RIGHT) programmatically. How can I do it?

도움이 되었습니까?

해결책

public void keyPressed(int keyCode) {
        int action = getGameAction(keyCode);
        if (action == UP || action == DOWN || action == LEFT || action == RIGHT)
        {}
        else
            super.keyPressed(keyCode);
}
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top