From a672300966ba1804b2eb93574a2fdfdc3ecc550a Mon Sep 17 00:00:00 2001 From: terencehill Date: Mon, 13 Apr 2015 20:09:36 +0200 Subject: [PATCH] Make work focus on preferred controls on dialog open (only root dialogs!). You can now join a team game by just pressing SPACE twice, as the auto-join button is initially focused in the team selection dialog (with menu_mouse_absolute 0 the cursor is also moved over the button). --- qcsrc/menu/menu.qc | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/qcsrc/menu/menu.qc b/qcsrc/menu/menu.qc index e348796a0f..a2c2c94132 100644 --- a/qcsrc/menu/menu.qc +++ b/qcsrc/menu/menu.qc @@ -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); } } -- 2.39.2