aboutsummaryrefslogtreecommitdiff
path: root/visualization/qmpvisualization.cpp
diff options
context:
space:
mode:
authorGravatar Chris Xiong <chirs241097@gmail.com> 2016-06-02 23:38:43 +0800
committerGravatar Chris Xiong <chirs241097@gmail.com> 2016-06-02 23:38:43 +0800
commit8aa8574504acdab46ee378d9c6eaaf3f641c2bac (patch)
tree7dcbd9a4076786b025d2ef05aeae73ebcf4f6ba7 /visualization/qmpvisualization.cpp
parentd97a417012d7e510b08c2e7d9a71997605c48e88 (diff)
downloadQMidiPlayer-8aa8574504acdab46ee378d9c6eaaf3f641c2bac.tar.xz
Add option to change note colors.
Diffstat (limited to 'visualization/qmpvisualization.cpp')
-rw-r--r--visualization/qmpvisualization.cpp15
1 files changed, 15 insertions, 0 deletions
diff --git a/visualization/qmpvisualization.cpp b/visualization/qmpvisualization.cpp
index 106c6c9..2ba091b 100644
--- a/visualization/qmpvisualization.cpp
+++ b/visualization/qmpvisualization.cpp
@@ -73,6 +73,11 @@ void qmpVisualization::showThread()
notestretch=api->getOptionInt("Visualization/notestretch");
minnotelength=api->getOptionInt("Visualization/minnotelen");
chkrtint=api->getOptionUint("Visualization/chkrtint");
+ for(int i=0;i<16;++i)
+ {
+ accolors[i]=api->getOptionUint("Visualization/chActiveColor"+std::to_string(i));
+ iccolors[i]=api->getOptionUint("Visualization/chInactiveColor"+std::to_string(i));
+ }
sm=smGetInterface(SMELT_APILEVEL);
sm->smVidMode(wwidth,wheight,true);
sm->smUpdateFunc(h);sm->smQuitFunc(closeh);
@@ -640,6 +645,11 @@ void qmpVisualization::init()
api->registerOptionDouble("","","Visualization/rx",-999999999,999999999,0);
api->registerOptionDouble("","","Visualization/ry",-999999999,999999999,75);
api->registerOptionDouble("","","Visualization/rz",-999999999,999999999,90);
+ for(int i=0;i<16;++i)
+ {
+ api->registerOptionUint("","","Visualization/chActiveColor"+std::to_string(i),0,0xFFFFFFFF,accolors[i]);
+ api->registerOptionUint("","","Visualization/chInactiveColor"+std::to_string(i),0,0xFFFFFFFF,iccolors[i]);
+ }
wwidth=api->getOptionInt("Visualization/wwidth");
wheight=api->getOptionInt("Visualization/wheight");
wsupersample=api->getOptionInt("Visualization/supersampling");
@@ -661,6 +671,11 @@ void qmpVisualization::init()
notestretch=api->getOptionInt("Visualization/notestretch");
minnotelength=api->getOptionInt("Visualization/minnotelen");
chkrtint=api->getOptionUint("Visualization/chkrtint");
+ for(int i=0;i<16;++i)
+ {
+ accolors[i]=api->getOptionUint("Visualization/chActiveColor"+std::to_string(i));
+ iccolors[i]=api->getOptionUint("Visualization/chInactiveColor"+std::to_string(i));
+ }
}
void qmpVisualization::deinit()
{