summaryrefslogtreecommitdiff
path: root/LibGUI/GTextBox.cpp
diff options
context:
space:
mode:
authorAndreas Kling <awesomekling@gmail.com>2019-01-26 06:39:13 +0100
committerAndreas Kling <awesomekling@gmail.com>2019-01-26 06:39:13 +0100
commitd72575d1967060b691e94f462997fdc43e5cd384 (patch)
treea108dacc4113b8ddd5e58dc7faf0de79aa585ebf /LibGUI/GTextBox.cpp
parent57fb0272168371de0fac1d54d0f5830b1565aa94 (diff)
downloadserenity-d72575d1967060b691e94f462997fdc43e5cd384.zip
LibGUI: Start bringing up GTextBox in the standalone world.
Diffstat (limited to 'LibGUI/GTextBox.cpp')
-rw-r--r--LibGUI/GTextBox.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/LibGUI/GTextBox.cpp b/LibGUI/GTextBox.cpp
index cad25e171a..74a11324ea 100644
--- a/LibGUI/GTextBox.cpp
+++ b/LibGUI/GTextBox.cpp
@@ -3,6 +3,7 @@
#include <SharedGraphics/CharacterBitmap.h>
#include <SharedGraphics/Font.h>
#include <SharedGraphics/Painter.h>
+#include <Kernel/KeyCode.h>
GTextBox::GTextBox(GWidget* parent)
: GWidget(parent)
@@ -91,21 +92,21 @@ void GTextBox::handle_backspace()
void GTextBox::keydown_event(GKeyEvent& event)
{
switch (event.key()) {
- case GKeyboardKey::LeftArrow:
+ case KeyCode::Key_Left:
if (m_cursorPosition)
--m_cursorPosition;
m_cursorBlinkState = true;
update();
return;
- case GKeyboardKey::RightArrow:
+ case KeyCode::Key_Right:
if (m_cursorPosition < m_text.length())
++m_cursorPosition;
m_cursorBlinkState = true;
update();
return;
- case GKeyboardKey::Backspace:
+ case KeyCode::Key_Backspace:
return handle_backspace();
- case GKeyboardKey::Return:
+ case KeyCode::Key_Return:
if (onReturnPressed)
onReturnPressed(*this);
return;