diff --git a/Builds/MacOSX/Dexed.xcodeproj/project.xcworkspace/xcuserdata/asb2m10.xcuserdatad/UserInterfaceState.xcuserstate b/Builds/MacOSX/Dexed.xcodeproj/project.xcworkspace/xcuserdata/asb2m10.xcuserdatad/UserInterfaceState.xcuserstate index 54bac68..d21650d 100644 Binary files a/Builds/MacOSX/Dexed.xcodeproj/project.xcworkspace/xcuserdata/asb2m10.xcuserdatad/UserInterfaceState.xcuserstate and b/Builds/MacOSX/Dexed.xcodeproj/project.xcworkspace/xcuserdata/asb2m10.xcuserdatad/UserInterfaceState.xcuserstate differ diff --git a/Source/DXComponents.cpp b/Source/DXComponents.cpp index 21fb440..971562f 100644 --- a/Source/DXComponents.cpp +++ b/Source/DXComponents.cpp @@ -194,7 +194,8 @@ void EnvDisplay::paint(Graphics &g) { g.setColour(Colour(0xFFFFFFFF)); String len; - len << ((int) total); + len << ((int) total) << " / "; + len << ((int) vPos); g.drawText(len, 5, 1, 72, 14, Justification::left, true); } @@ -290,9 +291,9 @@ void LcdDisplay::paint(Graphics &g) { g.setColour (Colours::white); g.setFont (Font (Font::getDefaultMonospacedFontName(), 15.00f, Font::plain)); g.drawText (systemMsg, - 4, 4, 300, 8, + 7, 4, 300, 8, Justification::centredLeft, true); g.drawText (paramMsg, - 4, 20, 300, 8, + 7, 20, 300, 8, Justification::centredLeft, true); } diff --git a/Source/GlobalEditor.cpp b/Source/GlobalEditor.cpp index cac5da5..50cea36 100644 --- a/Source/GlobalEditor.cpp +++ b/Source/GlobalEditor.cpp @@ -173,7 +173,7 @@ GlobalEditor::GlobalEditor () //[Constructor] You can add your own custom stuff here.. - lcdDisplay->systemMsg << "* DEXED DX synthesizer *"; + lcdDisplay->systemMsg << "*** DEXED FM synthesizer ***"; //[/Constructor] } diff --git a/Source/OperatorEditor.cpp b/Source/OperatorEditor.cpp index fbeed1f..733eaaa 100644 --- a/Source/OperatorEditor.cpp +++ b/Source/OperatorEditor.cpp @@ -241,8 +241,8 @@ void OperatorEditor::paint (Graphics& g) //[UserPrePaint] Add your own custom painting code here.. //[/UserPrePaint] - g.setColour (Colour (0x41000000)); - g.fillRect (-5, -8, 293, 100); + g.setColour (Colour (0x32000000)); + g.fillRect (-5, -7, 293, 100); //[UserPaint] Add your own custom painting code here.. //[/UserPaint] @@ -498,7 +498,7 @@ BEGIN_JUCER_METADATA snapPixels="8" snapActive="1" snapShown="1" overlayOpacity="0.330" fixedSize="1" initialWidth="280" initialHeight="90"> - + cartManager.cartNames, 1); - cartridges.setSelectedItemIndex(0, NotificationType::dontSendNotification); - cartridges.addListener(this); + + addAndMakeVisible (cartButton = new TextButton("CART")); + cartButton->setButtonText ("CART"); + cartButton->addListener (this); + cartButton->setBounds(5, 6, 50, 18); + for(int i=0;icartManager.cartNames.size();i++) { + cartPopup.addItem(i+1, processor->cartManager.cartNames[i]); + } addAndMakeVisible (loadButton = new TextButton("LOAD")); loadButton->setButtonText ("LOAD"); loadButton->addListener (this); - loadButton->setBounds(169, 5, 50, 18); + loadButton->setBounds(59, 6, 50, 18); addAndMakeVisible(saveButton = new TextButton("SAVE")); saveButton->setButtonText ("SAVE"); saveButton->addListener (this); - saveButton->setBounds (222, 5, 50, 18); + saveButton->setBounds (113, 6, 50, 18); addAndMakeVisible (&programs); programs.setEditableText (false); programs.setJustificationType (Justification::centredLeft); programs.setTextWhenNothingSelected (String::empty); - programs.setBounds(276, 5, 160, 18); + programs.setBounds(167, 6, 160, 18); rebuildProgramCombobox(); programs.addListener(this); addAndMakeVisible(storeButton = new TextButton("STORE")); storeButton->setButtonText ("STORE"); storeButton->addListener (this); - storeButton->setBounds (439, 5, 50, 18); + storeButton->setBounds (331, 6, 50, 18); + addAndMakeVisible(settingsButton = new TextButton("PARMS")); + settingsButton->setButtonText ("PARMS"); + settingsButton->addListener (this); + settingsButton->setBounds (755, 6, 50, 18); + addAndMakeVisible(aboutButton = new TextButton("ABOUT")); aboutButton->setButtonText ("ABOUT"); aboutButton->addListener (this); - aboutButton->setBounds (807, 5, 50, 18); + aboutButton->setBounds (807, 6, 50, 18); // OPERATORS @@ -132,6 +136,17 @@ void DexedAudioProcessorEditor::paint (Graphics& g) { } void DexedAudioProcessorEditor::buttonClicked(Button *buttonThatWasClicked) { + if (buttonThatWasClicked == cartButton) { + int result = cartPopup.show(); + processor->loadBuiltin(result-1); + processor->setCurrentProgram(0); + rebuildProgramCombobox(); + programs.setSelectedId(processor->getCurrentProgram()+1, NotificationType::dontSendNotification); + processor->updateHostDisplay(); + return; + } + + if (buttonThatWasClicked == loadButton) { FileChooser fc ("Import original DX sysex...", File::nonexistent, "*.syx;*.SYX;*.*", 1); @@ -195,17 +210,8 @@ void DexedAudioProcessorEditor::buttonClicked(Button *buttonThatWasClicked) { } void DexedAudioProcessorEditor::comboBoxChanged (ComboBox* comboBoxThatHasChanged) { - if ( comboBoxThatHasChanged == &programs ) { - processor->setCurrentProgram(programs.getSelectedId()-1); - processor->updateHostDisplay(); - } else { - int idx = comboBoxThatHasChanged->getSelectedItemIndex(); - processor->loadBuiltin(idx); - processor->setCurrentProgram(0); - rebuildProgramCombobox(); - programs.setSelectedId(processor->getCurrentProgram()+1, NotificationType::dontSendNotification); - processor->updateHostDisplay(); - } + processor->setCurrentProgram(programs.getSelectedId()-1); + processor->updateHostDisplay(); } void DexedAudioProcessorEditor::timerCallback() { diff --git a/Source/PluginEditor.h b/Source/PluginEditor.h index 8aa5c4e..b7239ae 100644 --- a/Source/PluginEditor.h +++ b/Source/PluginEditor.h @@ -36,16 +36,17 @@ class DexedAudioProcessorEditor : public AudioProcessorEditor, public Timer { DexedAudioProcessor *processor; ComboBox programs; - ComboBox cartridges; + PopupMenu cartPopup; MidiKeyboardComponent midiKeyboard; DXLookNFeel dx_lnf; + ScopedPointer cartButton; ScopedPointer loadButton; ScopedPointer saveButton; ScopedPointer storeButton; ScopedPointer aboutButton; - ScopedPointer settings; + ScopedPointer settingsButton; void storeProgram();