Revision 46405bb4
Added by Leszek Koltunski over 3 years ago
src/main/java/org/distorted/main/RubikActivity.java | ||
---|---|---|
81 | 81 |
private static int mScreenWidth, mScreenHeight; |
82 | 82 |
private boolean mPolicyAccepted, mIsChinese; |
83 | 83 |
private int mCurrentApiVersion; |
84 |
private boolean mIsLocked; |
|
84 | 85 |
|
85 | 86 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
86 | 87 |
|
... | ... | |
100 | 101 |
mScreenHeight=displaymetrics.heightPixels; |
101 | 102 |
|
102 | 103 |
mIsChinese = localeIsChinese(); |
104 |
mIsLocked = false; |
|
103 | 105 |
|
104 | 106 |
hideNavigationBar(); |
105 | 107 |
huaweiHack(); |
... | ... | |
489 | 491 |
RubikSurfaceView view = findViewById(R.id.rubikSurfaceView); |
490 | 492 |
return view.isVertical(); |
491 | 493 |
} |
494 |
|
|
495 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
|
496 |
|
|
497 |
public void toggleLock() |
|
498 |
{ |
|
499 |
mIsLocked = !mIsLocked; |
|
500 |
} |
|
501 |
|
|
502 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
|
503 |
|
|
504 |
public boolean isLocked() |
|
505 |
{ |
|
506 |
RubikState state = RubikState.getCurrentState(); |
|
507 |
|
|
508 |
if( state==RubikState.PLAY || state==RubikState.READ || state==RubikState.SOLV ) |
|
509 |
{ |
|
510 |
return mIsLocked; |
|
511 |
} |
|
512 |
|
|
513 |
return false; |
|
514 |
} |
|
515 |
|
|
516 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
|
517 |
|
|
518 |
public boolean retLocked() |
|
519 |
{ |
|
520 |
return mIsLocked; |
|
521 |
} |
|
492 | 522 |
} |
Also available in: Unified diff
Add lock button.