mirror of
https://github.com/vale981/openAV-Luppp
synced 2025-03-05 17:11:40 -05:00
-Midi bind target shown in UI
This commit is contained in:
parent
8698a0e62e
commit
cc47fe4a74
3 changed files with 15 additions and 7 deletions
|
@ -30,7 +30,7 @@ OptionsWindow::OptionsWindow()
|
|||
|
||||
Fl_Group* bindings = new Fl_Group( x, y, w, h, "Binding");
|
||||
{
|
||||
targetLabel = new Avtk::Button(x + 105, y + 5, 100, 25, "Target: ");
|
||||
targetLabel = new Fl_Box(x + 110,y + 5, 200, 25,"");
|
||||
bindEnable = new Avtk::LightButton(x + 5, y + 5, 100, 25, "Bind Enable");
|
||||
}
|
||||
bindings->end();
|
||||
|
@ -52,9 +52,14 @@ OptionsWindow::OptionsWindow()
|
|||
|
||||
void OptionsWindow::setTarget(const char* t)
|
||||
{
|
||||
target = t;
|
||||
printf("%s\n", target.c_str() );
|
||||
targetLabel->setLabel( t );
|
||||
if ( target )
|
||||
free (target);
|
||||
target = strdup(t);
|
||||
|
||||
targetLabel->label( target );
|
||||
targetLabel->redraw();
|
||||
|
||||
//LUPPP_NOTE("New Target %s\n", target );
|
||||
}
|
||||
|
||||
void OptionsWindow::show()
|
||||
|
@ -65,6 +70,7 @@ void OptionsWindow::show()
|
|||
void OptionsWindow::setBindEnable(bool e)
|
||||
{
|
||||
bindEnable->value( e );
|
||||
setTarget("");
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -5,6 +5,7 @@
|
|||
#include <string>
|
||||
|
||||
#include <FL/Fl.H>
|
||||
#include <FL/Fl_Box.H>
|
||||
#include <FL/Fl_Tabs.H>
|
||||
#include <FL/Fl_Group.H>
|
||||
#include <FL/Fl_Double_Window.H>
|
||||
|
@ -25,9 +26,10 @@ class OptionsWindow
|
|||
Fl_Double_Window* window;
|
||||
Fl_Tabs* tabs;
|
||||
|
||||
std::string target;
|
||||
char* target;
|
||||
|
||||
Fl_Box* targetLabel;
|
||||
|
||||
Avtk::Button* targetLabel;
|
||||
Avtk::Button* ctlrButton;
|
||||
Avtk::LightButton* bindEnable;
|
||||
};
|
||||
|
|
|
@ -54,7 +54,7 @@ Jack::Jack() :
|
|||
|
||||
|
||||
// MIDI binding stuff
|
||||
bindingEventRecordEnable = true;
|
||||
bindingEventRecordEnable = false;
|
||||
bindingTrack = 0;
|
||||
bindingEventType = EVENT_NULL;
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue