소스 검색

move focus by key arrows only to focusable controls

Andrew Karpushin 12 년 전
부모
커밋
9829cc6143
1개의 변경된 파일2개의 추가작업 그리고 1개의 파일을 삭제
  1. 2 1
      gameplay/src/Container.cpp

+ 2 - 1
gameplay/src/Container.cpp

@@ -916,7 +916,8 @@ bool Container::moveFocus(Direction direction, Control* outsideControl)
         for (itt = _controls.begin(); itt < _controls.end(); itt++)
         for (itt = _controls.begin(); itt < _controls.end(); itt++)
         {
         {
             Control* nextControl = *itt;
             Control* nextControl = *itt;
-            if (nextControl->getFocusIndex() == focusIndex)
+            if (nextControl->getFocusIndex() == focusIndex &&
+                nextControl->isEnabled() && nextControl->isVisible())
             {
             {
                 next = nextControl;
                 next = nextControl;
                 break;
                 break;