mirror of
https://gitea.wildfiregames.com/0ad/0ad.git
synced 2026-09-21 20:06:40 +00:00
Ctrl+home, ctrl+end go to top/bottom of console
This was SVN commit r1609.
This commit is contained in:
+17
-2
@@ -334,11 +334,26 @@ void CConsole::InsertChar(const int szChar, const wchar_t cooked )
|
||||
return;
|
||||
|
||||
case SDLK_HOME:
|
||||
m_iBufferPos = 0;
|
||||
if (keys[SDLK_RCTRL] || keys[SDLK_LCTRL])
|
||||
{
|
||||
int linesShown = (int)m_fHeight/m_iFontHeight - 4;
|
||||
m_iMsgHistPos = clamp((int)m_deqMsgHistory.size() - linesShown, 1, (int)m_deqMsgHistory.size());
|
||||
}
|
||||
else
|
||||
{
|
||||
m_iBufferPos = 0;
|
||||
}
|
||||
return;
|
||||
|
||||
case SDLK_END:
|
||||
m_iBufferPos = m_iBufferLength;
|
||||
if (keys[SDLK_RCTRL] || keys[SDLK_LCTRL])
|
||||
{
|
||||
m_iMsgHistPos = 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
m_iBufferPos = m_iBufferLength;
|
||||
}
|
||||
return;
|
||||
|
||||
case SDLK_LEFT:
|
||||
|
||||
Reference in New Issue
Block a user