Last active
October 24, 2016 22:07
-
-
Save frame/71e1934016080d8e45a377de8d568e27 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function DefaultKeyDownHandler( uiKey:number ) | |
local keyPanChanged :boolean = false; | |
if uiKey == Keys.VK_ALT then | |
if m_isALTDown == false then | |
m_isALTDown = true; | |
EndDragMap(); | |
ReadyForDragMap(); | |
end | |
end | |
if( uiKey == Keys.VK_UP ) then | |
keyPanChanged = true; | |
m_isUPpressed = true; | |
end | |
if( uiKey == Keys.VK_RIGHT ) then | |
keyPanChanged = true; | |
m_isRIGHTpressed = true; | |
end | |
if( uiKey == Keys.VK_DOWN ) then | |
keyPanChanged = true; | |
m_isDOWNpressed = true; | |
end | |
if( uiKey == Keys.VK_LEFT ) then | |
keyPanChanged = true; | |
m_isLEFTpressed = true; | |
end | |
if( keyPanChanged == true ) then | |
ProcessPan(m_edgePanX,m_edgePanY); | |
end | |
-- START: next unit | |
if (uiKey == Keys.N) then | |
OnCycleUnitSelectionRequest(); | |
end | |
-- END: next unit | |
return false; | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment