diff --git a/src/game/client/components/console.cpp b/src/game/client/components/console.cpp index 046711cea..6aa6ad1d4 100644 --- a/src/game/client/components/console.cpp +++ b/src/game/client/components/console.cpp @@ -4,6 +4,7 @@ #include #include +#include #include @@ -223,6 +224,14 @@ void CGameConsole::CInstance::OnInput(IInput::CEvent Event) if(m_BacklogActPage < 0) m_BacklogActPage = 0; } + else if(Event.m_Key == KEY_HOME) + { + m_BacklogActPage = INT_MAX; + } + else if(Event.m_Key == KEY_END) + { + m_BacklogActPage = 0; + } else if(Event.m_Key == KEY_LSHIFT) { m_ReverseTAB = true; diff --git a/src/game/client/components/menus_browser.cpp b/src/game/client/components/menus_browser.cpp index 0b906019d..dec7d12a2 100644 --- a/src/game/client/components/menus_browser.cpp +++ b/src/game/client/components/menus_browser.cpp @@ -189,7 +189,11 @@ void CMenus::RenderServerbrowserServerList(CUIRect View) if(m_aInputEvents[i].m_Flags&IInput::FLAG_PRESS) { if(m_aInputEvents[i].m_Key == KEY_DOWN) NewIndex = m_SelectedIndex + 1; - if(m_aInputEvents[i].m_Key == KEY_UP) NewIndex = m_SelectedIndex - 1; + else if(m_aInputEvents[i].m_Key == KEY_UP) NewIndex = m_SelectedIndex - 1; + else if(m_aInputEvents[i].m_Key == KEY_PAGEUP) NewIndex = max(m_SelectedIndex - 25, 0); + else if(m_aInputEvents[i].m_Key == KEY_PAGEDOWN) NewIndex = min(m_SelectedIndex + 25, NumServers - 1); + else if(m_aInputEvents[i].m_Key == KEY_HOME) NewIndex = 0; + else if(m_aInputEvents[i].m_Key == KEY_END) NewIndex = NumServers - 1; } if(NewIndex > -1 && NewIndex < NumServers) { diff --git a/src/game/client/components/menus_demo.cpp b/src/game/client/components/menus_demo.cpp index f3c8ecce0..f7132ed8e 100644 --- a/src/game/client/components/menus_demo.cpp +++ b/src/game/client/components/menus_demo.cpp @@ -590,7 +590,11 @@ CMenus::CListboxItem CMenus::UiDoListboxNextItem(const void *pId, bool Selected, if(m_aInputEvents[i].m_Flags&IInput::FLAG_PRESS) { if(m_aInputEvents[i].m_Key == KEY_DOWN) NewIndex = gs_ListBoxNewSelected + 1; - if(m_aInputEvents[i].m_Key == KEY_UP) NewIndex = gs_ListBoxNewSelected - 1; + else if(m_aInputEvents[i].m_Key == KEY_UP) NewIndex = gs_ListBoxNewSelected - 1; + else if(m_aInputEvents[i].m_Key == KEY_PAGEUP) NewIndex = max(gs_ListBoxNewSelected - 20, 0); + else if(m_aInputEvents[i].m_Key == KEY_PAGEDOWN) NewIndex = min(gs_ListBoxNewSelected + 20, gs_ListBoxNumItems - 1); + else if(m_aInputEvents[i].m_Key == KEY_HOME) NewIndex = 0; + else if(m_aInputEvents[i].m_Key == KEY_END) NewIndex = gs_ListBoxNumItems - 1; } if(NewIndex > -1 && NewIndex < gs_ListBoxNumItems) { @@ -959,7 +963,11 @@ void CMenus::RenderDemoList(CUIRect MainView) if(m_aInputEvents[i].m_Flags&IInput::FLAG_PRESS) { if(m_aInputEvents[i].m_Key == KEY_DOWN) NewIndex = m_DemolistSelectedIndex + 1; - if(m_aInputEvents[i].m_Key == KEY_UP) NewIndex = m_DemolistSelectedIndex - 1; + else if(m_aInputEvents[i].m_Key == KEY_UP) NewIndex = m_DemolistSelectedIndex - 1; + else if(m_aInputEvents[i].m_Key == KEY_PAGEUP) NewIndex = max(m_DemolistSelectedIndex - 20, 0); + else if(m_aInputEvents[i].m_Key == KEY_PAGEDOWN) NewIndex = min(m_DemolistSelectedIndex + 20, m_lDemos.size() - 1); + else if(m_aInputEvents[i].m_Key == KEY_HOME) NewIndex = 0; + else if(m_aInputEvents[i].m_Key == KEY_END) NewIndex = m_lDemos.size() - 1; } if(NewIndex > -1 && NewIndex < m_lDemos.size()) {