Procházet zdrojové kódy

move focus by key arrows only to focusable controls

Andrew Karpushin před 12 roky
rodič
revize
9829cc6143
1 změnil soubory, kde provedl 2 přidání a 1 odebrání
  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++)
         {
             Control* nextControl = *itt;
-            if (nextControl->getFocusIndex() == focusIndex)
+            if (nextControl->getFocusIndex() == focusIndex &&
+                nextControl->isEnabled() && nextControl->isVisible())
             {
                 next = nextControl;
                 break;