void Ambix_binauralAudioProcessorEditor::changeListenerCallback (ChangeBroadcaster *source) { UpdateText(); DrawMeters(); repaint(); startTimer(100); }
void DrawVersus(){ DrawStage(stage); DrawFighters(screen); DrawMeters(&f1,&f2); DrawNextRoundTimer(nexttimer); int DEBUGSTATE = 1; if(DEBUGSTATE){ char a[20]; sprintf(a,"P1state: %d",f1.state); DrawText(a,270,20); } if(f2.combo>0){ char a[20]; sprintf(a,"Combo: %d!",f2.combo); DrawText(a,40,120); } if(f1.combo>0){ char a[20]; sprintf(a,"Combo: %d!",f1.combo); DrawText(a,840,120); } }
//============================================================================== Ambix_binauralAudioProcessorEditor::Ambix_binauralAudioProcessorEditor (Ambix_binauralAudioProcessor* ownerFilter) : AudioProcessorEditor (ownerFilter), label (0), txt_preset(0), label5 (0), txt_debug (0), btn_open (0), label2 (0), label3 (0), label4 (0), num_ch (0), num_spk (0), num_hrtf (0), btn_preset_folder (0), #if BINAURAL_DECODER tgl_load_irs(0), #endif _width(0) { tooltipWindow.setMillisecondsBeforeTipAppears (700); // tooltip delay addAndMakeVisible (label = new Label ("new label", "Ambisonics input channels: ")); label->setFont (Font (15.0000f, Font::plain)); label->setJustificationType (Justification::centredRight); label->setEditable (false, false, false); label->setColour (Label::textColourId, Colours::white); label->setColour (TextEditor::textColourId, Colours::black); label->setColour (TextEditor::backgroundColourId, Colour (0x0)); addAndMakeVisible (txt_preset = new TextEditor ("new text editor")); txt_preset->setReadOnly(true); txt_preset->setPopupMenuEnabled(false); addAndMakeVisible (label5 = new Label ("new label", "Preset")); label5->setFont (Font (15.0000f, Font::plain)); label5->setJustificationType (Justification::centredRight); label5->setEditable (false, false, false); label5->setColour (Label::textColourId, Colours::white); label5->setColour (TextEditor::textColourId, Colours::white); label5->setColour (TextEditor::backgroundColourId, Colour (0x0)); addAndMakeVisible (txt_debug = new TextEditor ("new text editor")); txt_debug->setMultiLine (true); txt_debug->setReturnKeyStartsNewLine (false); txt_debug->setReadOnly (true); txt_debug->setScrollbarsShown (true); txt_debug->setCaretVisible (false); txt_debug->setPopupMenuEnabled (true); txt_debug->setText ("debug window"); txt_debug->setFont(Font(10,1)); addAndMakeVisible (btn_open = new TextButton ("new button")); btn_open->setTooltip ("browse presets or open from file"); btn_open->setButtonText ("open"); btn_open->addListener (this); btn_open->setColour (TextButton::buttonColourId, Colours::white); btn_open->setColour (TextButton::buttonOnColourId, Colours::blue); addAndMakeVisible (label2 = new Label ("new label", "Virtual speakers: ")); label2->setFont (Font (15.0000f, Font::plain)); label2->setJustificationType (Justification::centredRight); label2->setEditable (false, false, false); label2->setColour (Label::textColourId, Colours::white); label2->setColour (TextEditor::textColourId, Colours::black); label2->setColour (TextEditor::backgroundColourId, Colour (0x0)); addAndMakeVisible (label3 = new Label ("new label", "Impulse responses: ")); label3->setFont (Font (15.0000f, Font::plain)); label3->setJustificationType (Justification::centredRight); label3->setEditable (false, false, false); label3->setColour (Label::textColourId, Colours::white); label3->setColour (TextEditor::textColourId, Colours::black); label3->setColour (TextEditor::backgroundColourId, Colour (0x0)); addAndMakeVisible (label4 = new Label ("new label", "debug window")); label4->setFont (Font (10.0000f, Font::plain)); label4->setJustificationType (Justification::centredLeft); label4->setEditable (false, false, false); label4->setColour (Label::textColourId, Colours::white); label4->setColour (TextEditor::textColourId, Colours::black); label4->setColour (TextEditor::backgroundColourId, Colour (0x0)); addAndMakeVisible (num_ch = new Label ("new label", "0")); num_ch->setFont (Font (15.0000f, Font::plain)); num_ch->setJustificationType (Justification::centredRight); num_ch->setEditable (false, false, false); num_ch->setColour (Label::textColourId, Colours::white); num_ch->setColour (TextEditor::textColourId, Colours::black); num_ch->setColour (TextEditor::backgroundColourId, Colour (0x0)); addAndMakeVisible (num_spk = new Label ("new label", "0")); num_spk->setFont (Font (15.0000f, Font::plain)); num_spk->setJustificationType (Justification::centredRight); num_spk->setEditable (false, false, false); num_spk->setColour (Label::textColourId, Colours::white); num_spk->setColour (TextEditor::textColourId, Colours::black); num_spk->setColour (TextEditor::backgroundColourId, Colour (0x0)); addAndMakeVisible (num_hrtf = new Label ("new label", "0")); num_hrtf->setFont (Font (15.0000f, Font::plain)); num_hrtf->setJustificationType (Justification::centredRight); num_hrtf->setEditable (false, false, false); num_hrtf->setColour (Label::textColourId, Colours::white); num_hrtf->setColour (TextEditor::textColourId, Colours::black); num_hrtf->setColour (TextEditor::backgroundColourId, Colour (0x0)); addAndMakeVisible (btn_preset_folder = new TextButton ("new button")); btn_preset_folder->setTooltip ("choose another preset folder"); btn_preset_folder->setButtonText ("preset folder"); btn_preset_folder->addListener (this); btn_preset_folder->setColour (TextButton::buttonColourId, Colours::white); btn_preset_folder->setColour (TextButton::buttonOnColourId, Colours::blue); #if BINAURAL_DECODER addAndMakeVisible (tgl_load_irs = new ToggleButton ("new toggle button")); tgl_load_irs->setTooltip (TRANS("load impulse responses if new preset being loaded - deactivate if IRs already loaded - for fast decoder matrix switching")); tgl_load_irs->setButtonText (TRANS("load IRs")); tgl_load_irs->addListener (this); tgl_load_irs->setColour (ToggleButton::textColourId, Colours::white); #endif setSize (350, 300); DrawMeters(); UpdateText(); UpdatePresets(); txt_preset->setText(ownerFilter->box_preset_str); txt_preset->setCaretPosition(txt_preset->getTotalNumChars()-1); txt_preset->setTooltip(txt_preset->getText()); startTimer (100); ownerFilter->addChangeListener(this); // listen to changes of processor }