Revision d38a302b
Added by Leszek Koltunski almost 4 years ago
| src/main/java/org/distorted/main/RubikObjectLibInterface.java | ||
|---|---|---|
| 79 | 79 |
|
| 80 | 80 |
if( BuildConfig.DEBUG ) |
| 81 | 81 |
{
|
| 82 |
android.util.Log.d("pre", msg);
|
|
| 82 |
android.util.Log.d("libInterface", msg);
|
|
| 83 | 83 |
} |
| 84 | 84 |
else |
| 85 | 85 |
{
|
| ... | ... | |
| 104 | 104 |
int level = play.getLevel(); |
| 105 | 105 |
String name = scores.getName(); |
| 106 | 106 |
RubikObject obj = RubikObjectList.getObject(object); |
| 107 |
String objName = obj==null ? "NULL" : obj.getName(); |
|
| 107 | 108 |
|
| 108 |
String record = obj+" level "+level+" time "+mNewRecord+" isNew: "+mIsNewRecord+" scrambleNum: "+scrambleNum; |
|
| 109 |
String record = objName+" level "+level+" time "+mNewRecord+" isNew: "+mIsNewRecord+" scrambleNum: "+scrambleNum;
|
|
| 109 | 110 |
|
| 110 | 111 |
if( BuildConfig.DEBUG ) |
| 111 | 112 |
{
|
| 112 |
android.util.Log.e("pre", debug);
|
|
| 113 |
android.util.Log.e("pre", name);
|
|
| 114 |
android.util.Log.e("pre", record);
|
|
| 113 |
android.util.Log.e("libInterface", debug);
|
|
| 114 |
android.util.Log.e("libInterface", name);
|
|
| 115 |
android.util.Log.e("libInterface", record);
|
|
| 115 | 116 |
} |
| 116 | 117 |
else |
| 117 | 118 |
{
|
| ... | ... | |
| 316 | 317 |
else |
| 317 | 318 |
{
|
| 318 | 319 |
mIsNewRecord = true; |
| 319 |
RubikScreenPlay play= (RubikScreenPlay) ScreenList.PLAY.getScreenClass(); |
|
| 320 |
play.adjustSolvedIcons(); |
|
| 321 | 320 |
} |
| 322 | 321 |
} |
| 323 | 322 |
} |
| ... | ... | |
| 335 | 334 |
{
|
| 336 | 335 |
if( BuildConfig.DEBUG ) |
| 337 | 336 |
{
|
| 338 |
android.util.Log.e("interface", problem);
|
|
| 337 |
android.util.Log.e("libInterface", problem);
|
|
| 339 | 338 |
} |
| 340 | 339 |
else |
| 341 | 340 |
{
|
| ... | ... | |
| 362 | 361 |
|
| 363 | 362 |
if( BuildConfig.DEBUG ) |
| 364 | 363 |
{
|
| 365 |
android.util.Log.e("D", error);
|
|
| 364 |
android.util.Log.e("libInterface", error);
|
|
| 366 | 365 |
} |
| 367 | 366 |
else |
| 368 | 367 |
{
|
| ... | ... | |
| 382 | 381 |
|
| 383 | 382 |
if( BuildConfig.DEBUG ) |
| 384 | 383 |
{
|
| 385 |
android.util.Log.e("D", error);
|
|
| 384 |
android.util.Log.e("libInterface", error);
|
|
| 386 | 385 |
} |
| 387 | 386 |
else |
| 388 | 387 |
{
|
| ... | ... | |
| 402 | 401 |
|
| 403 | 402 |
if( BuildConfig.DEBUG ) |
| 404 | 403 |
{
|
| 405 |
android.util.Log.e("D", error);
|
|
| 404 |
android.util.Log.e("libInterface", error);
|
|
| 406 | 405 |
} |
| 407 | 406 |
else |
| 408 | 407 |
{
|
| src/main/java/org/distorted/screens/RubikScreenPlay.java | ||
|---|---|---|
| 172 | 172 |
|
| 173 | 173 |
if( act.getControl().isUINotBlocked()) |
| 174 | 174 |
{
|
| 175 |
adjustSolvedIcons(); |
|
| 175 | 176 |
float height= act.getScreenHeightInPixels(); |
| 176 | 177 |
final int maxHeight= (int)(0.9f*(height-mUpperBarHeight) ); |
| 177 | 178 |
View popupView = mPlayPopup.getContentView(); |
| ... | ... | |
| 479 | 480 |
|
| 480 | 481 |
public void savePreferences(SharedPreferences.Editor editor) |
| 481 | 482 |
{
|
| 483 |
editor.putInt("play_LevelValue", mLevelValue );
|
|
| 484 |
|
|
| 482 | 485 |
if( mObjectPopup!=null ) |
| 483 | 486 |
{
|
| 484 | 487 |
mObjectPopup.dismiss(); |
| ... | ... | |
| 502 | 505 |
|
| 503 | 506 |
public void restorePreferences(SharedPreferences preferences) |
| 504 | 507 |
{
|
| 505 |
|
|
| 508 |
mLevelValue = preferences.getInt("play_LevelValue", 0);
|
|
| 506 | 509 |
} |
| 507 | 510 |
|
| 508 | 511 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
| ... | ... | |
| 559 | 562 |
|
| 560 | 563 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
| 561 | 564 |
|
| 562 |
public void adjustSolvedIcons()
|
|
| 565 |
private void adjustSolvedIcons()
|
|
| 563 | 566 |
{
|
| 564 | 567 |
if( mPlayLayout!=null ) |
| 565 | 568 |
{
|
Also available in: Unified diff
Crash fix. Also a fix for the fact that if we started solving, went out of the app, and resumed solving - the record wasn't remembered.