virtual ports working - ui needs some work
This commit is contained in:
+12
-1
@@ -9,6 +9,7 @@
|
||||
|
||||
#include <memory>
|
||||
#include <ranges>
|
||||
#include <sstream>
|
||||
|
||||
namespace VISEQ::APP::UI{
|
||||
void AppUI::init(){
|
||||
@@ -37,6 +38,11 @@ namespace VISEQ::APP::UI{
|
||||
if(GuiButton((Rectangle){200, (float)s_midi, 60, 20}, "RELOAD")) sm->midi.enumerate();
|
||||
|
||||
int i = 0;
|
||||
for(auto& vo : sm->midi.virtual_midi_out_ports){
|
||||
GuiCheckBox((Rectangle){20, (float)s_midi + 25 + i*20.0f, 20, 20}, vo.name.substr(0,32).c_str(), &vo.enabled);
|
||||
i++;
|
||||
}
|
||||
i++;
|
||||
for(auto& mo : sm->midi.midi_out_ports){
|
||||
GuiCheckBox((Rectangle){20, (float)s_midi + 25 + i*20.0f, 20, 20}, mo.port.port_name.substr(0,32).c_str(), &mo.enabled);
|
||||
i++;
|
||||
@@ -48,6 +54,11 @@ namespace VISEQ::APP::UI{
|
||||
gm->setMidiPortForAll(midis.number, true);
|
||||
}
|
||||
}
|
||||
for(auto &midis : sm->midi.virtual_midi_out_ports){
|
||||
if(midis.enabled){
|
||||
gm->setMidiPortForAll(midis.number, true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
int s_signal = s_midi + 100 + i*20;
|
||||
@@ -119,7 +130,7 @@ namespace VISEQ::APP::UI{
|
||||
int i = 0;
|
||||
if(n->getNodeType() == NodeType::MIDINODE){
|
||||
std::shared_ptr<MidiNode> mn = std::dynamic_pointer_cast<MidiNode>(n);
|
||||
for(auto& mo : mn->midi_outs){
|
||||
for(auto& mo : mn->selected_midi_outs){
|
||||
GuiCheckBox((Rectangle){np.x + 20, np.y + y_midi + 20 + i*20.0f, 20, 20}, mo.second.name.c_str(), &mo.second.enabled);
|
||||
i++;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user