zynaddsubfx

ZynAddSubFX open source synthesizer
Log | Files | Refs | Submodules | LICENSE

commit 7bbf61e48c0aeadc1ccef75bb122486e168a0165
parent e838f3c46385b06b5b09f7193141bdbf0ed602fe
Author: fundamental <[email protected]>
Date:   Thu, 18 Jun 2015 14:36:56 -0400

ConfigUI: Fix OscilPower Widget

Diffstat:
Msrc/UI/ConfigUI.fl | 21+++++++++++++++++----
1 file changed, 17 insertions(+), 4 deletions(-)

diff --git a/src/UI/ConfigUI.fl b/src/UI/ConfigUI.fl @@ -29,6 +29,9 @@ decl {\#include "Fl_Osc_Counter.H"} {public local decl {\#include "Fl_Osc_Choice.H"} {public local } +decl {\#include "Osc_IntModel.h"} {public local +} + decl {\#include "Fl_Osc_Check.H"} {public local } @@ -89,11 +92,12 @@ class ConfigUI {} { code0 {o->init("cfg.SwapStereo");} class Fl_Osc_Check } - Fl_Choice {} { + Fl_Choice oscilsize_widget { label OscilSize + callback{ + oscilsize->updateVal((int)(o->value()+7)); + } tooltip {ADSynth Oscillator Size (samples)} xywh {175 80 75 20} down_box BORDER_BOX labelfont 1 labelsize 11 textsize 10 - code0 {o->init("cfg.OscilPower");} - class Fl_Osc_Choice } { MenuItem {} { label 128 @@ -282,7 +286,14 @@ activatebutton_presetdir(true);} Function {ConfigUI(Fl_Osc_Interface *osc_)} {} { code { osc = osc_; - make_window();} {} + make_window(); + oscilsize = new Osc_IntModel(osc); + oscilsize->callback = [this](int i){ + oscilsize_widget->value(i-7); + }; + oscilsize->update("/config/cfg.OscilPower"); + + } {} } Function {activatebutton_rootdir(bool active)} {} { code {if (active) { @@ -311,4 +322,6 @@ activatebutton_presetdir(true);} } decl {class Fl_Osc_Interface *osc;} {public local } + decl {class Osc_IntModel *oscilsize;} {public local + } }