@@ -257,21 +257,21 @@ void initEffects()
257257{
258258 initRandomControls();
259259
260- effectArray = new Effect [8 ];
261- strobo = new Strobe_Effect (this , 0 );
262- effectArray[0 ] = strobo ;
263- effectArray[1 ] = new Scanner_Effect (this , 1 );
264- effectArray[2 ] = new Moonflower_Effect (this , 2 );
265- effectArray[3 ] = new RGBSpot_Effect (this , 3 );
266- effectArray[4 ] = new Derby_Effect (this , 4 );
267- effectArray[5 ] = new Snowstorm_Effect (this , 5 );
268- effectArray[6 ] = new LaserBurst_Effect (this , 6 );
269- effectArray[7 ] = new Polygon_Effect (this , 7 );
260+ effectArray = new Effect [9 ];
261+ effectArray[ 0 ] = new Blackout_Effect (this , 0 );
262+ effectArray[1 ] = new Strobe_Effect ( this , 1 ) ;
263+ effectArray[2 ] = new Scanner_Effect (this , 2 );
264+ effectArray[3 ] = new Moonflower_Effect (this , 3 );
265+ effectArray[4 ] = new RGBSpot_Effect (this , 4 );
266+ effectArray[5 ] = new Derby_Effect (this , 5 );
267+ effectArray[6 ] = new Snowstorm_Effect (this , 6 );
268+ effectArray[7 ] = new LaserBurst_Effect (this , 7 );
269+ effectArray[8 ] = new Polygon_Effect (this , 8 );
270270
271271 activeSetting. activate(0 );
272272
273273 for (Toggle t: activeEffect. getItems())
274- t. getCaptionLabel(). align(CENTER , CENTER );
274+ t. getCaptionLabel(). align(LEFT , CENTER );
275275
276276 for (Toggle t: activeSetting. getItems())
277277 t. getCaptionLabel(). set(" EDIT" ). align(CENTER , CENTER );
@@ -302,21 +302,21 @@ void keyPressed()
302302{
303303 if (effectArray!= null )
304304 for (int i = 0 ; i < effectArray. length; i++ )
305+ {
306+ if (key == effectArray[i]. triggeredByKey())
307+ effectArray[i]. activate();
305308 if (effectArray[i]. isActive())
306309 effectArray[i]. keyPressed(key , keyCode );
310+ }
307311}
308312
309313void keyReleased ()
310314{
311315
312316 if (effectArray!= null )
313317 for (int i = 0 ; i < effectArray. length; i++ )
314- {
315- if (key == effectArray[i]. triggeredByKey())
316- effectArray[i]. activate();
317318 if (effectArray[i]. isActive())
318319 effectArray[i]. keyReleased(key , keyCode );
319- }
320320}
321321
322322boolean isHat()
0 commit comments