Basic mousewheel support

This commit is contained in:
Henrik Rydgård committed 2013-07-08 11:04:03 +02:00
1 parent 864457219d
commit 183740a5fa
3 files changed
+15 -2

No files matched your search

+13 -1
View File
@@ -1781,6 +1781,19 @@ FileSelectScreen::FileSelectScreen(const FileSelectScreenOptions &options) : opt
updateListing();
}
void FileSelectScreen::key(const KeyInput &key) {
if (key.flags & KEY_DOWN) {
switch (key.keyCode) {
case KEYCODE_EXT_MOUSEWHEEL_UP:
list_.scrollRelative(-50);
break;
case KEYCODE_EXT_MOUSEWHEEL_DOWN:
list_.scrollRelative(50);
break;
}
}
}
void FileSelectScreen::updateListing() {
listing_.clear();
getFilesInDir(currentDirectory_.c_str(), &listing_, options_.filter);
@@ -1850,7 +1863,6 @@ void CreditsScreen::update(InputState &input_state) {
void CreditsScreen::render() {
I18NCategory *c = GetI18NCategory("PSPCredits");
const char * credits[] = {