debug
This commit is contained in:
parent
4ed3ee2435
commit
554b10a8f7
@ -72,6 +72,8 @@ class VoiceMachineApp : public App {
|
|||||||
std::map<uint64_t, protocol::endpoint> _connections;
|
std::map<uint64_t, protocol::endpoint> _connections;
|
||||||
std::mutex _command_mutex;
|
std::mutex _command_mutex;
|
||||||
|
|
||||||
|
bool _debug = false;
|
||||||
|
|
||||||
// VoiceAloud audio = VoiceAloud(100, 0.5f);
|
// VoiceAloud audio = VoiceAloud(100, 0.5f);
|
||||||
|
|
||||||
};
|
};
|
||||||
@ -128,7 +130,10 @@ void VoiceMachineApp::stage_config()
|
|||||||
console() << "command: " << cmd << endl;
|
console() << "command: " << cmd << endl;
|
||||||
|
|
||||||
if(cmd == "save") save_config();
|
if(cmd == "save") save_config();
|
||||||
else if (cmd == "clear") clear();
|
else if(cmd == "clear") clear();
|
||||||
|
else if(cmd == "DEBUG") {
|
||||||
|
_debug = m[1].boolean();
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
} catch (ci::Exception &exc) {
|
} catch (ci::Exception &exc) {
|
||||||
@ -240,6 +245,10 @@ void VoiceMachineApp::draw()
|
|||||||
if(_current_voice){
|
if(_current_voice){
|
||||||
Rectf bounds( 40, _current_voice->_tex->getAscent() + 40, getWindowWidth() - 40, getWindowHeight() - 40 );
|
Rectf bounds( 40, _current_voice->_tex->getAscent() + 40, getWindowWidth() - 40, getWindowHeight() - 40 );
|
||||||
_current_voice->draw(bounds);
|
_current_voice->draw(bounds);
|
||||||
|
if(_debug){
|
||||||
|
gl::color(Color(1, 0, 0));
|
||||||
|
gl::drawStrokedRect(bounds);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user