diff options
author | Chris Xiong <chirs241097@gmail.com> | 2016-05-24 19:52:08 +0800 |
---|---|---|
committer | Chris Xiong <chirs241097@gmail.com> | 2016-05-24 19:52:08 +0800 |
commit | ded6dd1c8f7cbe2991e90f69f95730b39eaa95cf (patch) | |
tree | 46f55ade709960f4407b836432b76901d00aa693 /visualization | |
parent | b059dd6fa25ad50f549cb1384042b07b6cfe06bf (diff) | |
download | QMidiPlayer-ded6dd1c8f7cbe2991e90f69f95730b39eaa95cf.tar.xz |
Add seeking with arrow buttons in visualization.
Diffstat (limited to 'visualization')
-rw-r--r-- | visualization/qmpvisualization.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/visualization/qmpvisualization.cpp b/visualization/qmpvisualization.cpp index 4042a24..e9d1977 100644 --- a/visualization/qmpvisualization.cpp +++ b/visualization/qmpvisualization.cpp @@ -247,6 +247,10 @@ bool qmpVisualization::update() if(sm->smGetKeyState(SMK_O))rot[2]-=1; //printf("pos: %f %f %f\n",pos[0],pos[1],pos[2]); //printf("rot: %f %f %f\n",rot[0],rot[1],rot[2]); + if(sm->smGetKeyState(SMK_RIGHT)==SMKST_HIT) + api->playerSeek(api->getCurrentPlaybackPercentage()+(sm->smGetKeyState(SMK_SHIFT)?5:1)); + if(sm->smGetKeyState(SMK_LEFT)==SMKST_HIT) + api->playerSeek(api->getCurrentPlaybackPercentage()-(sm->smGetKeyState(SMK_SHIFT)?5:1)); double lpt=(double)notestretch/api->getDivision()/10.*(horizontal?0.25:1); memset(notestatus,0,sizeof(notestatus)); for(uint32_t i=elb;i<pool.size();++i) |