Merge fixes

This commit is contained in:
Lynix 2020-05-27 16:58:02 +02:00
parent ab6227cf1a
commit 7d23cafa35
1 changed files with 12 additions and 12 deletions

View File

@ -151,9 +151,9 @@ namespace Ndk
{ {
const Nz::AbstractTextDrawer& textDrawer = GetTextDrawer(); const Nz::AbstractTextDrawer& textDrawer = GetTextDrawer();
switch (key.code) switch (key.virtualKey)
{ {
case Nz::Keyboard::Backspace: case Nz::Keyboard::VKey::Backspace:
{ {
bool ignoreDefaultAction = false; bool ignoreDefaultAction = false;
OnTextAreaKeyBackspace(this, &ignoreDefaultAction); OnTextAreaKeyBackspace(this, &ignoreDefaultAction);
@ -175,7 +175,7 @@ namespace Ndk
return true; return true;
} }
case Nz::Keyboard::Delete: case Nz::Keyboard::VKey::Delete:
{ {
if (HasSelection()) if (HasSelection())
EraseSelection(); EraseSelection();
@ -185,7 +185,7 @@ namespace Ndk
return true; return true;
} }
case Nz::Keyboard::Down: case Nz::Keyboard::VKey::Down:
{ {
bool ignoreDefaultAction = false; bool ignoreDefaultAction = false;
OnTextAreaKeyDown(this, &ignoreDefaultAction); OnTextAreaKeyDown(this, &ignoreDefaultAction);
@ -200,7 +200,7 @@ namespace Ndk
return true; return true;
} }
case Nz::Keyboard::End: case Nz::Keyboard::VKey::End:
{ {
bool ignoreDefaultAction = false; bool ignoreDefaultAction = false;
OnTextAreaKeyEnd(this, &ignoreDefaultAction); OnTextAreaKeyEnd(this, &ignoreDefaultAction);
@ -217,7 +217,7 @@ namespace Ndk
return true; return true;
} }
case Nz::Keyboard::Home: case Nz::Keyboard::VKey::Home:
{ {
bool ignoreDefaultAction = false; bool ignoreDefaultAction = false;
OnTextAreaKeyHome(this, &ignoreDefaultAction); OnTextAreaKeyHome(this, &ignoreDefaultAction);
@ -229,7 +229,7 @@ namespace Ndk
return true; return true;
} }
case Nz::Keyboard::Left: case Nz::Keyboard::VKey::Left:
{ {
bool ignoreDefaultAction = false; bool ignoreDefaultAction = false;
OnTextAreaKeyLeft(this, &ignoreDefaultAction); OnTextAreaKeyLeft(this, &ignoreDefaultAction);
@ -247,7 +247,7 @@ namespace Ndk
return true; return true;
} }
case Nz::Keyboard::Return: case Nz::Keyboard::VKey::Return:
{ {
bool ignoreDefaultAction = false; bool ignoreDefaultAction = false;
OnTextAreaKeyReturn(this, &ignoreDefaultAction); OnTextAreaKeyReturn(this, &ignoreDefaultAction);
@ -265,7 +265,7 @@ namespace Ndk
return true;; return true;;
} }
case Nz::Keyboard::Right: case Nz::Keyboard::VKey::Right:
{ {
bool ignoreDefaultAction = false; bool ignoreDefaultAction = false;
OnTextAreaKeyRight(this, &ignoreDefaultAction); OnTextAreaKeyRight(this, &ignoreDefaultAction);
@ -283,7 +283,7 @@ namespace Ndk
return true; return true;
} }
case Nz::Keyboard::Up: case Nz::Keyboard::VKey::Up:
{ {
bool ignoreDefaultAction = false; bool ignoreDefaultAction = false;
OnTextAreaKeyUp(this, &ignoreDefaultAction); OnTextAreaKeyUp(this, &ignoreDefaultAction);
@ -298,7 +298,7 @@ namespace Ndk
return true; return true;
} }
case Nz::Keyboard::Tab: case Nz::Keyboard::VKey::Tab:
{ {
if (!m_tabEnabled) if (!m_tabEnabled)
return false; return false;
@ -331,7 +331,7 @@ namespace Ndk
Nz::Vector2ui hoveredGlyph = GetHoveredGlyph(float(x), float(y)); Nz::Vector2ui hoveredGlyph = GetHoveredGlyph(float(x), float(y));
// Shift extends selection // Shift extends selection
if (Nz::Keyboard::IsKeyPressed(Nz::Keyboard::LShift) || Nz::Keyboard::IsKeyPressed(Nz::Keyboard::RShift)) if (Nz::Keyboard::IsKeyPressed(Nz::Keyboard::VKey::LShift) || Nz::Keyboard::IsKeyPressed(Nz::Keyboard::VKey::RShift))
SetSelection(hoveredGlyph, m_selectionCursor); SetSelection(hoveredGlyph, m_selectionCursor);
else else
{ {