Project

General

Profile

« Previous | Next » 

Revision 427ba5bf

Added by Leszek Koltunski 9 months ago

progress with configurable stickers

View differences:

src/main/java/org/distorted/config/ConfigActivity.java
223 223
      return view.getRenderer();
224 224
      }
225 225

  
226
///////////////////////////////////////////////////////////////////////////////////////////////////
227

  
228
    public void recreateColors()
229
      {
230
      ObjectControl control = getControl();
231
      control.recreateColors();
232
      }
233

  
226 234
///////////////////////////////////////////////////////////////////////////////////////////////////
227 235

  
228 236
    public void recreateStickers(int borders, int corners)
src/main/java/org/distorted/config/ConfigRenderer.java
45 45
   private boolean mResettingObject, mInitialPhase, mEffectApplied;
46 46
   private long mStartTime;
47 47
   private final Static1D mAngle;
48
   private long mRotateID;
48 49

  
49 50
///////////////////////////////////////////////////////////////////////////////////////////////////
50 51

  
......
89 90

  
90 91
         MatrixEffectRotate effect = new MatrixEffectRotate(mAngle, axis, center );
91 92
         object.applyEffect(effect,0);
93
         mRotateID = effect.getID();
92 94
         }
93 95

  
94 96
       boolean done = continueResetting(time);
95
       if( done ) mResettingObject = false;
97
       if( done )
98
         {
99
         mResettingObject = false;
100
         mEffectApplied   = false;
101

  
102
         ObjectControl control = mView.getObjectControl();
103
         TwistyObject object = control.getObject();
104
         object.removeEffect(mRotateID);
105
         }
96 106
       }
97 107
     }
98 108

  
src/main/java/org/distorted/config/ConfigScreenPane.java
240 240

  
241 241
      @Override
242 242
      public void onStartTrackingTouch(SeekBar seekBar) {}
243

  
244 243
      @Override
245 244
      public void onStopTrackingTouch(SeekBar seekBar)
246 245
        {
......
281 280
    configLayoutL.setLayoutParams(paramsLayoutL);
282 281

  
283 282
    createColorGrid(act, width, height);
283
    configLayoutL.removeAllViews();
284 284
    configLayoutL.addView(mGrid);
285 285
    }
286 286
}
src/main/java/org/distorted/config/ConfigSurfaceView.java
70 70
    void resetObject()
71 71
      {
72 72
      ConfigActivity act = (ConfigActivity)getContext();
73
      act.recreateColors();
73 74
      act.recreateStickers(ConfigScreenPane.DEFAULT_BORDERS,ConfigScreenPane.DEFAULT_CORNERS);
74 75
      act.resetUI();
75 76
      }

Also available in: Unified diff