summaryrefslogtreecommitdiff
path: root/src/guichan/widgets/tabbedarea.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2012-04-17 11:31:47 +0300
committerAndrei Karas <akaras@inbox.ru>2012-04-17 11:31:47 +0300
commit693879649420c0997bfb29bea7f5752f6d9ac526 (patch)
tree01d6c56532d561385edbfe2ad0235df6c5a58c5f /src/guichan/widgets/tabbedarea.cpp
parent8df35828d69f3debd89557a74c26359a8b249f87 (diff)
downloadplus-693879649420c0997bfb29bea7f5752f6d9ac526.tar.gz
plus-693879649420c0997bfb29bea7f5752f6d9ac526.tar.bz2
plus-693879649420c0997bfb29bea7f5752f6d9ac526.tar.xz
plus-693879649420c0997bfb29bea7f5752f6d9ac526.zip
Move keyboard handling from guichan to own classes.
Diffstat (limited to 'src/guichan/widgets/tabbedarea.cpp')
-rw-r--r--src/guichan/widgets/tabbedarea.cpp29
1 files changed, 1 insertions, 28 deletions
diff --git a/src/guichan/widgets/tabbedarea.cpp b/src/guichan/widgets/tabbedarea.cpp
index 3e7178548..fb6619bed 100644
--- a/src/guichan/widgets/tabbedarea.cpp
+++ b/src/guichan/widgets/tabbedarea.cpp
@@ -298,35 +298,8 @@ namespace gcn
adjustSize();
}
- void TabbedArea::keyPressed(KeyEvent& keyEvent)
+ void TabbedArea::keyPressed(KeyEvent& keyEvent A_UNUSED)
{
- if (keyEvent.isConsumed() || !isFocused())
- return;
-
- if (keyEvent.getKey().getValue() == Key::LEFT)
- {
- int index = getSelectedTabIndex();
- index--;
-
- if (index < 0)
- return;
- else
- setSelectedTab(mTabs[index].first);
-
- keyEvent.consume();
- }
- else if (keyEvent.getKey().getValue() == Key::RIGHT)
- {
- int index = getSelectedTabIndex();
- index++;
-
- if (index >= static_cast<int>(mTabs.size()))
- return;
- else
- setSelectedTab(mTabs[index].first);
-
- keyEvent.consume();
- }
}
void TabbedArea::death(const Event& event)