From: terencehill Date: Mon, 13 Apr 2015 18:09:36 +0000 (+0200) Subject: Make work focus on preferred controls on dialog open (only root dialogs!). You can... X-Git-Tag: xonotic-v0.8.1~82^2 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=a672300966ba1804b2eb93574a2fdfdc3ecc550a;p=xonotic%2Fxonotic-data.pk3dir.git 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). --- diff --git a/qcsrc/menu/menu.qc b/qcsrc/menu/menu.qc index e348796a0..a2c2c9413 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); } }