aboutsummaryrefslogtreecommitdiffstats
path: root/classes/BowelyzerGUI.sc
diff options
context:
space:
mode:
Diffstat (limited to 'classes/BowelyzerGUI.sc')
-rw-r--r--classes/BowelyzerGUI.sc33
1 files changed, 22 insertions, 11 deletions
diff --git a/classes/BowelyzerGUI.sc b/classes/BowelyzerGUI.sc
index b769203..99f271a 100644
--- a/classes/BowelyzerGUI.sc
+++ b/classes/BowelyzerGUI.sc
@@ -443,9 +443,9 @@ BowelyzerGUI{
arg parent, type, name, value;
switch(
type.asSymbol,
- \knob, {this.setupEZKnob(parent, name, value, \controls, name).view.children.do({|item| if(item.isKindOf(NumberBox),{item.align_(\right)})})},
+ \knob, {this.setupEZKnob(parent, name, value)},
\slider, {this.setupEZSlider(parent, name, value)},
- \ranger, {this.setupEZRanger(parent, name, value, \controls, name).view.children.do({|item| if(item.isKindOf(NumberBox),{item.align_(\right)})})}
+ \ranger, {this.setupEZRanger(parent, name, value)}
);
}
@@ -951,26 +951,37 @@ BowelyzerGUI{
});
}
+ // setup a ranger
setupEZRanger{
arg parent, control, value;
- ^EZRanger(
+ var unit;
+ unit = EZRanger(
parent: parent,
- bounds: 300@16,
+ bounds: sliderWidth@sliderHeight,
label: control,
- controlSpec: control,
+ initVal: value,
+ controlSpec: control.asSymbol,
action: {
arg controlUnit;
var address = NetAddr.new("127.0.0.1", NetAddr.langPort),
- type = "/"++controlUnit.view.parent.name.asString,
- name = controlUnit.view.parent.parent.parent.name.asSymbol,
+ type = "/"++controlUnit.view.parent.parent.name.asString,
+ name = controlUnit.view.parent.parent.parent.parent.name.asSymbol,
controlName = controlUnit.labelView.string.asSymbol,
controlValue = controlUnit.value;
- address.sendMsg(type, name, controlName, controlValue);
+ address.sendMsg(type, name, controlName, controlValue[0], controlValue[1]);
},
- labelWidth: 120,
+ layout: \line2,
+ numberWidth: 60,
unitWidth:30
- )
- ;
+ );
+ unit.view.children.do({|item|
+ if(item.isKindOf(NumberBox), {
+ item.align_(\right);
+ });
+ if(item.isKindOf(RangeSlider), {
+ item.orientation_(\horizontal);
+ });
+ });
}
setupEZKnob{