X-Git-Url: https://git.piment-noir.org/?p=SugarCubes.git;a=blobdiff_plain;f=TestPatterns.pde;fp=TestPatterns.pde;h=ed0c5ee601e231051dd796e8850a64ffdc32f32d;hp=728683ec45dea70eec6ee5e03f4f4f3635449514;hb=bffb6a80f723b2795e47e56a7d8eb3d65e9324a5;hpb=30624e974f88224b0a8719b11bd649578eb97ab6 diff --git a/TestPatterns.pde b/TestPatterns.pde index 728683e..ed0c5ee 100644 --- a/TestPatterns.pde +++ b/TestPatterns.pde @@ -228,7 +228,6 @@ class MappingTool extends TestPattern { private int cubeIndex = 0; private int stripIndex = 0; - private int channelIndex = 0; public final int MAPPING_MODE_ALL = 0; public final int MAPPING_MODE_CHANNEL = 1; @@ -243,22 +242,9 @@ class MappingTool extends TestPattern { public boolean channelModeRed = true; public boolean channelModeGreen = false; public boolean channelModeBlue = false; - - private final int numChannels; - + MappingTool(LX lx) { super(lx); - // TODO(mcslee): port channels to grizzly - numChannels = 1; - setChannel(); - } - - public int numChannels() { - return numChannels; - } - - private void setChannel() { - // TODO(mcslee): port to grizzly } private int indexOfCubeInChannel(Cube c) { @@ -357,23 +343,6 @@ class MappingTool extends TestPattern { } } - public void setChannel(int index) { - if (numChannels > 0) { - channelIndex = index % numChannels; - } - setChannel(); - } - - public void incChannel() { - channelIndex = (channelIndex + 1) % numChannels; - setChannel(); - } - - public void decChannel() { - channelIndex = (channelIndex + numChannels - 1) % numChannels; - setChannel(); - } - public void setStrip(int index) { stripIndex = index % Cube.STRIPS_PER_CUBE; } @@ -388,8 +357,8 @@ class MappingTool extends TestPattern { public void keyPressed(UIMapping uiMapping) { switch (keyCode) { - case UP: if (mappingMode == MAPPING_MODE_CHANNEL) incChannel(); else incCube(); break; - case DOWN: if (mappingMode == MAPPING_MODE_CHANNEL) decChannel(); else decCube(); break; + case UP: incCube(); break; + case DOWN: decCube(); break; case LEFT: decStrip(); break; case RIGHT: incStrip(); break; } @@ -398,7 +367,6 @@ class MappingTool extends TestPattern { case 'g': channelModeGreen = !channelModeGreen; break; case 'b': channelModeBlue = !channelModeBlue; break; } - uiMapping.setChannelID(channelIndex+1); uiMapping.setCubeID(cubeIndex+1); uiMapping.setStripID(stripIndex+1); uiMapping.redraw();