Quantcast
Channel: beginners - openFrameworks
Viewing all articles
Browse latest Browse all 4929

Help with ofxDatGui dropdown Menu

$
0
0

@cyrstem wrote:

hey just need a little help im building a dropdown list that will load music files
and they play when selected i will like them to stop playing when other files is selected in the same dropdown
so the code is like this
void ofApp::onDropdownEvent(ofxDatGuiDropdownEvent e){
if (e.target->getEnabled()==true){

        sounds[e.child].play();

         cout<<"numero"<<e.target->getIndex()<<endl;

     }

how can i make the selected sound to stop
i try this way but can't make it work

if (e.target->getEnabled()==false) {
         sounds[e.child].stop();
     }

Posts: 4

Participants: 3

Read full topic


Viewing all articles
Browse latest Browse all 4929