MCPcopy Create free account
hub / github.com/Meridian59/Meridian59 / EvKeyDown

Method EvKeyDown

roomedit/source/editcli.cpp:1755–1786  ·  view source on GitHub ↗

//////////////////////////////////////////////////////////////// TEditorClient ------------- Move the map using cursor keys

Source from the content-addressed store, hash-verified

1753// Move the map using cursor keys
1754//
1755void TEditorClient::EvKeyDown (UINT key, UINT repeatCount, UINT flags)
1756{
1757 switch (key)
1758 {
1759 case VK_LEFT:
1760 // repeatCount is UNSIGNED, be careful
1761 Scroller->ScrollBy(-(long)repeatCount, 0);
1762 break;
1763 case VK_RIGHT:
1764 // repeatCount is UNSIGNED, be careful
1765 Scroller->ScrollBy((long)repeatCount, 0);
1766 break;
1767 case VK_DOWN:
1768 // repeatCount is UNSIGNED, be careful
1769 Scroller->ScrollBy(0, (long)repeatCount);
1770 break;
1771 case VK_UP:
1772 // repeatCount is UNSIGNED, be careful
1773 Scroller->ScrollBy(0, -(long)repeatCount);
1774 break;
1775 case VK_ESCAPE:
1776 {
1777 // Unselect everything
1778 TMapDC dc (this);
1779 HighlightSelection (dc, EditMode, Selected);
1780 ForgetSelection (&Selected);
1781 break;
1782 }
1783 }
1784
1785 TLayoutWindow::EvKeyDown(key, repeatCount, flags);
1786}
1787
1788
1789/////////////////////////////////////////////////////////////////////

Callers

nothing calls this directly

Calls 3

HighlightSelectionFunction · 0.85
ForgetSelectionFunction · 0.85
ScrollByMethod · 0.80

Tested by

no test coverage detected