Revision 9d591756
Added by Leszek Koltunski over 3 years ago
src/main/java/org/distorted/helpers/MovesAndLockController.java | ||
---|---|---|
49 | 49 |
} |
50 | 50 |
} |
51 | 51 |
|
52 |
private ArrayList<Move> mMoves; |
|
52 |
private final ArrayList<Move> mMoves;
|
|
53 | 53 |
private boolean mCanPrevMove; |
54 | 54 |
private TwistyPreRender mPre; |
55 | 55 |
private ImageButton mPrevButton, mLockButton; |
... | ... | |
62 | 62 |
|
63 | 63 |
public MovesAndLockController() |
64 | 64 |
{ |
65 |
mTimerRunning = false;
|
|
66 |
mLockTime = 0; |
|
65 |
mTimerRunning= false; |
|
66 |
mLockTime = 0;
|
|
67 | 67 |
mCanPrevMove = true; |
68 |
|
|
69 |
if( mMoves==null ) mMoves = new ArrayList<>(); |
|
70 |
else mMoves.clear(); |
|
68 |
mMoves = new ArrayList<>(); |
|
71 | 69 |
} |
72 | 70 |
|
73 | 71 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
src/main/java/org/distorted/main/RubikSurfaceView.java | ||
---|---|---|
34 | 34 |
import org.distorted.library.type.Static4D; |
35 | 35 |
import org.distorted.objects.TwistyObject; |
36 | 36 |
import org.distorted.objects.Movement; |
37 |
import org.distorted.screens.RubikScreenReady; |
|
37 | 38 |
import org.distorted.solvers.SolverMain; |
38 | 39 |
import org.distorted.screens.ScreenList; |
39 | 40 |
import org.distorted.screens.RubikScreenPlay; |
... | ... | |
346 | 347 |
mDragging = (!locked || mIsAutomatic); |
347 | 348 |
mBeginningRotation = false; |
348 | 349 |
mContinuingRotation = false; |
349 |
|
|
350 |
if( locked ) |
|
351 |
{ |
|
352 |
RubikScreenPlay play = (RubikScreenPlay) ScreenList.PLAY.getScreenClass(); |
|
353 |
play.reddenLock(act); |
|
354 |
} |
|
350 |
if( locked ) reddenLockIcon(act); |
|
355 | 351 |
} |
356 | 352 |
} |
357 | 353 |
} |
358 | 354 |
|
355 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
|
356 |
|
|
357 |
private void reddenLockIcon(RubikActivity act) |
|
358 |
{ |
|
359 |
ScreenList curr = ScreenList.getCurrentScreen(); |
|
360 |
|
|
361 |
if( curr==ScreenList.PLAY ) |
|
362 |
{ |
|
363 |
RubikScreenPlay play = (RubikScreenPlay) ScreenList.PLAY.getScreenClass(); |
|
364 |
play.reddenLock(act); |
|
365 |
} |
|
366 |
else if( curr==ScreenList.READ ) |
|
367 |
{ |
|
368 |
RubikScreenReady read = (RubikScreenReady) ScreenList.READ.getScreenClass(); |
|
369 |
read.reddenLock(act); |
|
370 |
} |
|
371 |
else if( curr==ScreenList.SOLV ) |
|
372 |
{ |
|
373 |
RubikScreenSolving solv = (RubikScreenSolving) ScreenList.SOLV.getScreenClass(); |
|
374 |
solv.reddenLock(act); |
|
375 |
} |
|
376 |
} |
|
377 |
|
|
359 | 378 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
360 | 379 |
|
361 | 380 |
private void drag(float x, float y) |
Also available in: Unified diff
Fix the reddening the Lock icon.