diff options
author | Chris Xiong <chirs241097@gmail.com> | 2016-05-02 23:51:25 +0800 |
---|---|---|
committer | Chris Xiong <chirs241097@gmail.com> | 2016-05-02 23:51:25 +0800 |
commit | bb82e7dfe2c6f3ee40a79f949db68cdd2c28456b (patch) | |
tree | 1b68efe784c44f7ce661c65adb7db2e80eb74380 /visualization | |
parent | 85ccf22f3d2340e80ce2a109bbe610da1b92ca7d (diff) | |
download | QMidiPlayer-bb82e7dfe2c6f3ee40a79f949db68cdd2c28456b.tar.xz |
Finally finished the option proxying infrastructure...
Diffstat (limited to 'visualization')
-rw-r--r-- | visualization/qmpvisualization.cpp | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/visualization/qmpvisualization.cpp b/visualization/qmpvisualization.cpp index 28a10d4..30d2437 100644 --- a/visualization/qmpvisualization.cpp +++ b/visualization/qmpvisualization.cpp @@ -5,9 +5,9 @@ #include <algorithm> #include "qmpvisualization.hpp" -const int viewdist=100; -const int notestretch=100;//length of quarter note -const int minnotelength=100; +int viewdist=100; +int notestretch=100;//length of quarter note +int minnotelength=100; const int noteappearance=1; DWORD iccolors[]={0XFFFF0000,0XFFFF8000,0XFFFFBF00,0XFFFFFF00, 0XFFBFFF00,0XFF80FF00,0XFF00FF00,0XFF00FFBF, @@ -60,6 +60,9 @@ void qmpVisualization::showThread() printf("W: Font load failed.\n"); pos[0]=-0;pos[1]=70;pos[2]=20; rot[0]=0;rot[1]=90;rot[2]=90;ctk=0; + viewdist=api->getOptionInt("Visualization/viewdist"); + notestretch=api->getOptionInt("Visualization/notestretch"); + minnotelength=api->getOptionInt("Visualization/minnotelen"); sm->smMainLoop(); } void qmpVisualization::show() @@ -244,6 +247,12 @@ void qmpVisualization::init() hvif=api->registerVisualizationIntf(vi); herif=api->registerEventReaderIntf(cb,NULL); hehif=api->registerEventHandlerIntf(hcb,NULL); + api->registerOptionInt("Visualization","View distance","Visualization/viewdist",20,1000,100); + api->registerOptionInt("Visualization","Note stretch","Visualization/notestretch",20,500,100); + api->registerOptionInt("Visualization","Minimum note length","Visualization/minnotelen",20,500,100); + viewdist=api->getOptionInt("Visualization/viewdist"); + notestretch=api->getOptionInt("Visualization/notestretch"); + minnotelength=api->getOptionInt("Visualization/minnotelen"); } void qmpVisualization::deinit() { |