summaryrefslogtreecommitdiff
path: root/src/search
diff options
context:
space:
mode:
Diffstat (limited to 'src/search')
-rw-r--r--src/search/SearchView.cpp16
-rw-r--r--src/search/SearchView.h3
2 files changed, 19 insertions, 0 deletions
diff --git a/src/search/SearchView.cpp b/src/search/SearchView.cpp
index 5bcbe06..4b9b6b2 100644
--- a/src/search/SearchView.cpp
+++ b/src/search/SearchView.cpp
@@ -241,3 +241,19 @@ void SearchView::OnTick(float dt)
{
c->Update();
}
+
+void SearchView::OnMouseWheel(int x, int y, int d)
+{
+ if(!d)
+ return;
+ if(d<0)
+ c->NextPage();
+ else
+ c->PrevPage();
+}
+void SearchView::OnKeyPress(int key, Uint16 character, bool shift, bool ctrl, bool alt)
+{
+ if(key==KEY_ESCAPE)
+ c->Exit();
+}
+
diff --git a/src/search/SearchView.h b/src/search/SearchView.h
index 0103419..af43a8c 100644
--- a/src/search/SearchView.h
+++ b/src/search/SearchView.h
@@ -37,6 +37,9 @@ public:
virtual ~SearchView();
void AttachController(SearchController * _c) { c = _c; }
virtual void OnTick(float dt);
+ virtual void OnMouseWheel(int x, int y, int d);
+ virtual void OnKeyPress(int key, Uint16 character, bool shift, bool ctrl, bool alt);
+
};
#endif // SEARCHVIEW_H