]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Make work focus on preferred controls on dialog open (only root dialogs!). You can...
authorterencehill <piuntn@gmail.com>
Mon, 13 Apr 2015 18:09:36 +0000 (20:09 +0200)
committerterencehill <piuntn@gmail.com>
Mon, 13 Apr 2015 18:09:36 +0000 (20:09 +0200)
qcsrc/menu/menu.qc

index e348796a0f89747b89e16fa315684d4ae0edddc7..a2c2c941320c1ff6dbb2bc80cc024b64b34c05fb 100644 (file)
@@ -960,7 +960,10 @@ void m_setpointerfocus(entity wnd)
                        menuMousePos = focus.origin + 0.5 * focus.size;
                        menuMousePos.x *= 1 / conwidth;
                        menuMousePos.y *= 1 / conheight;
-                       if(wnd.focused) // why does this never happen?
+                       entity par = wnd.parent;
+                       if(par.focused)
+                               par.setFocus(par, wnd);
+                       if(wnd.focused)
                                m_focus_item_chain(wnd, focus);
                }
        }