Revision 576afdf9
Added by Leszek Koltunski almost 2 years ago
src/main/java/org/distorted/bandaged/BandagedCreatorRenderer.java | ||
---|---|---|
162 | 162 |
if( !mCubits[c].isAttached() ) |
163 | 163 |
{ |
164 | 164 |
mCubits[c].attach(); |
165 |
mCubits[c].setUnmarked(); |
|
166 | 165 |
mScreen.attach(mCubits[c].getNode()); |
167 | 166 |
} |
168 | 167 |
if( mCubits[c].getPosition().length>3 ) |
169 | 168 |
{ |
170 | 169 |
mCubits[c].reset(mScaleValue); |
171 | 170 |
} |
171 |
mCubits[c].setUnmarked(); |
|
172 | 172 |
} |
173 | 173 |
} |
174 | 174 |
|
... | ... | |
327 | 327 |
android.util.Log.e("CREATOR", "unexpected exception: "+ex.getMessage() ); |
328 | 328 |
} |
329 | 329 |
|
330 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
|
331 |
|
|
332 |
public BandagedCubit[] getCubits() |
|
333 |
{ |
|
334 |
return mCubits; |
|
335 |
} |
|
336 |
|
|
337 | 330 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
338 | 331 |
|
339 | 332 |
public DistortedScreen getScreen() |
src/main/java/org/distorted/bandaged/BandagedCreatorScreen.java | ||
---|---|---|
303 | 303 |
|
304 | 304 |
private String generateObjectStrings() |
305 | 305 |
{ |
306 |
String result = "";
|
|
306 |
StringBuilder result = new StringBuilder();
|
|
307 | 307 |
int numViews = mViews.size(); |
308 | 308 |
|
309 | 309 |
for( int v=0; v<numViews; v++ ) |
310 | 310 |
{ |
311 | 311 |
BandagedCreatorObjectView view = mViews.get(v); |
312 | 312 |
String name = view.getName(); |
313 |
|
|
314 |
if( v>0 ) result += " "; |
|
315 |
result += name; |
|
313 |
if( v>0 ) result.append(' '); |
|
314 |
result.append(name); |
|
316 | 315 |
} |
317 | 316 |
|
318 |
return result; |
|
317 |
return result.toString();
|
|
319 | 318 |
} |
320 | 319 |
|
321 | 320 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
... | ... | |
327 | 326 |
|
328 | 327 |
if( view!=null ) ((TextView) view).setTextSize(TypedValue.COMPLEX_UNIT_PX,mTextSize); |
329 | 328 |
|
330 |
if( spinnerID==R.id.bandagedCreatorX ) |
|
331 |
{ |
|
332 |
mX = pos; |
|
333 |
} |
|
334 |
else if( spinnerID==R.id.bandagedCreatorY ) |
|
335 |
{ |
|
336 |
mY = pos; |
|
337 |
} |
|
338 |
else if( spinnerID==R.id.bandagedCreatorZ ) |
|
339 |
{ |
|
340 |
mZ = pos; |
|
341 |
} |
|
329 |
if( spinnerID==R.id.bandagedCreatorX ) mX = pos; |
|
330 |
else if( spinnerID==R.id.bandagedCreatorY ) mY = pos; |
|
331 |
else if( spinnerID==R.id.bandagedCreatorZ ) mZ = pos; |
|
342 | 332 |
|
343 | 333 |
changeObject(); |
344 | 334 |
} |
src/main/java/org/distorted/bandaged/BandagedCubit.java | ||
---|---|---|
13 | 13 |
import android.graphics.Canvas; |
14 | 14 |
import android.graphics.Paint; |
15 | 15 |
|
16 |
import org.distorted.library.effect.EffectType; |
|
16 | 17 |
import org.distorted.library.effect.FragmentEffectBrightness; |
17 | 18 |
import org.distorted.library.effect.MatrixEffectMove; |
18 | 19 |
import org.distorted.library.effect.MatrixEffectQuaternion; |
... | ... | |
267 | 268 |
|
268 | 269 |
public void setUnmarked() |
269 | 270 |
{ |
270 |
if( mMarkedEffectID>=0 ) |
|
271 |
{ |
|
272 |
mEffects.abortById(mMarkedEffectID); |
|
273 |
mMarkedEffectID = -1; |
|
274 |
} |
|
271 |
mEffects.abortByType(EffectType.FRAGMENT); |
|
272 |
mMarkedEffectID = -1; |
|
275 | 273 |
} |
276 | 274 |
|
277 | 275 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
Also available in: Unified diff
Workaround (real reason not found) for the issue when furious touching the screen in the BandagedCreator could sometimes leave a cubit permanently lit.