Skip to content

Commit

Permalink
Update midi-components library
Browse files Browse the repository at this point in the history
and change cue color CO name
  • Loading branch information
ferranpujolcamins committed Nov 3, 2019
1 parent e99e1a8 commit 3196155
Show file tree
Hide file tree
Showing 7 changed files with 14 additions and 14 deletions.
2 changes: 1 addition & 1 deletion res/controllers/Roland_DJ-505-scripts.js
Original file line number Diff line number Diff line change
Expand Up @@ -1476,7 +1476,7 @@ DJ505.PitchPlayMode = function (deck, offset) {
this.number = n + 1;
this.on = this.color + DJ505.PadColor.DIM_MODIFIER;
this.colors = pitchplayColors;
this.colorIdKey = 'hotcue_' + this.number + '_color_id';
this.colorIdKey = 'hotcue_' + this.number + '_color';
components.Button.call(this);
};
this.PerformancePad.prototype = new components.Button({
Expand Down
16 changes: 8 additions & 8 deletions res/controllers/midi-components-0.0.js
Original file line number Diff line number Diff line change
Expand Up @@ -295,9 +295,9 @@
return;
}
if (options.colors !== undefined || options.sendRGB !== undefined) {
this.colorIdKey = 'hotcue_' + options.number + '_color_id';
this.colorKey = 'hotcue_' + options.number + '_color';
if (options.colors === undefined) {
options.colors = color.predefinedColorsList();
options.colors = color.hotcueColorPalette();
}
}
this.number = options.number;
Expand All @@ -312,8 +312,8 @@
this.inKey = 'hotcue_' + this.number + '_clear';
},
getColor: function() {
if (this.colorIdKey !== undefined) {
return color.predefinedColorFromId(engine.getValue(this.group,this.colorIdKey));
if (this.colorKey !== undefined) {
return color.colorFromHexCode(engine.getValue(this.group,this.colorKey));
} else {
return null;
}
Expand All @@ -324,8 +324,8 @@
// and there is no hotcueColor for turning the LED
// off. So the `send()` function is responsible for turning the
// actual LED off.
if (this.colorIdKey !== undefined && outval !== this.off) {
this.outputColor(engine.getValue(this.group, this.colorIdKey));
if (this.colorKey !== undefined && outval !== this.off) {
this.outputColor(engine.getValue(this.group, this.colorKey));
} else {
this.send(outval);
}
Expand All @@ -348,8 +348,8 @@
},
connect: function() {
Button.prototype.connect.call(this); // call parent connect
if (undefined !== this.group && this.colorIdKey !== undefined) {
this.connections[1] = engine.makeConnection(this.group, this.colorIdKey, function (id) {
if (undefined !== this.group && this.colorKey !== undefined) {
this.connections[1] = engine.makeConnection(this.group, this.colorKey, function (id) {
if (engine.getValue(this.group,this.outKey)) {
this.outputColor(id);
}
Expand Down
2 changes: 1 addition & 1 deletion res/skins/Deere/hotcue_button.xml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
<ConnectValueFromWidget>false</ConnectValueFromWidget>
</Connection>
<Connection>
<ConfigKey><Variable name="group"/>,hotcue_<Variable name="hotcue"/>_color_id</ConfigKey>
<ConfigKey><Variable name="group"/>,hotcue_<Variable name="hotcue"/>_color</ConfigKey>
<BindProperty>highlight</BindProperty>
</Connection>
</PushButton>
Expand Down
2 changes: 1 addition & 1 deletion res/skins/LateNight/button_hotcue.xml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
<ConnectValueFromWidget>false</ConnectValueFromWidget>
</Connection>
<Connection>
<ConfigKey><Variable name="group"/>,hotcue_<Variable name="number"/>_color_id</ConfigKey>
<ConfigKey><Variable name="group"/>,hotcue_<Variable name="number"/>_color</ConfigKey>
<BindProperty>highlight</BindProperty>
</Connection>
</PushButton>
Expand Down
2 changes: 1 addition & 1 deletion res/skins/Shade/deck_hotcue_button.xml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
<ConnectValueFromWidget>false</ConnectValueFromWidget>
</Connection>
<Connection>
<ConfigKey>[Channel<Variable name="channum"/>],hotcue_<Variable name="hotcue"/>_color_id</ConfigKey>
<ConfigKey>[Channel<Variable name="channum"/>],hotcue_<Variable name="hotcue"/>_color</ConfigKey>
<BindProperty>highlight</BindProperty>
</Connection>
</PushButton>
Expand Down
2 changes: 1 addition & 1 deletion res/skins/Tango/button_hotcue_deck.xml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ Variables:
<ConnectValueFromWidget>false</ConnectValueFromWidget>
</Connection>
<Connection>
<ConfigKey><Variable name="group"/>,hotcue_<Variable name="HotCue"/>_color_id</ConfigKey>
<ConfigKey><Variable name="group"/>,hotcue_<Variable name="HotCue"/>_color</ConfigKey>
<BindProperty>highlight</BindProperty>
</Connection>
</PushButton>
Expand Down
2 changes: 1 addition & 1 deletion src/engine/controls/cuecontrol.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1705,7 +1705,7 @@ HotcueControl::HotcueControl(QString group, int i)
m_hotcueEnabled->setReadOnly();

// The id of the predefined color assigned to this color.
m_hotcueColor = new ControlObject(keyForControl(i, "color_id"));
m_hotcueColor = new ControlObject(keyForControl(i, "color"));
connect(m_hotcueColor,
&ControlObject::valueChanged,
this,
Expand Down

0 comments on commit 3196155

Please sign in to comment.