summaryrefslogtreecommitdiff
path: root/src/gui/widgets/tabbedarea.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/widgets/tabbedarea.cpp')
-rw-r--r--src/gui/widgets/tabbedarea.cpp19
1 files changed, 7 insertions, 12 deletions
diff --git a/src/gui/widgets/tabbedarea.cpp b/src/gui/widgets/tabbedarea.cpp
index bb8ea063b..b24ae32e5 100644
--- a/src/gui/widgets/tabbedarea.cpp
+++ b/src/gui/widgets/tabbedarea.cpp
@@ -22,6 +22,9 @@
#include "gui/widgets/tabbedarea.h"
+#include "keydata.h"
+#include "keyevent.h"
+
#include "gui/widgets/scrollarea.h"
#include "gui/widgets/tab.h"
@@ -482,7 +485,9 @@ void TabbedArea::keyPressed(gcn::KeyEvent& keyEvent)
if (keyEvent.isConsumed() || !isFocused())
return;
- if (keyEvent.getKey().getValue() == gcn::Key::LEFT)
+ int actionId = static_cast<KeyEvent*>(&keyEvent)->getActionId();
+
+ if (actionId == Input::KEY_GUI_LEFT)
{
int index = getSelectedTabIndex();
index--;
@@ -494,7 +499,7 @@ void TabbedArea::keyPressed(gcn::KeyEvent& keyEvent)
keyEvent.consume();
}
- else if (keyEvent.getKey().getValue() == gcn::Key::RIGHT)
+ else if (actionId == Input::KEY_GUI_RIGHT)
{
int index = getSelectedTabIndex();
index++;
@@ -507,13 +512,3 @@ void TabbedArea::keyPressed(gcn::KeyEvent& keyEvent)
keyEvent.consume();
}
}
-
-/*
-void TabbedArea::moveLeft(gcn::Tab *tab)
-{
-}
-
-void TabbedArea::moveRight(gcn::Tab *tab)
-{
-}
-*/