Revision ea48a493
Added by Leszek Koltunski about 2 months ago
src/main/java/org/distorted/objectlib/main/TwistyObject.java | ||
---|---|---|
1418 | 1418 |
|
1419 | 1419 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
1420 | 1420 |
|
1421 |
private void restoreSti(String key, OperatingSystemInterface os) |
|
1422 |
{ |
|
1423 |
mTextureBorderMultiplier = os.getFloat(key+"_border", 1.0f); |
|
1424 |
mTextureCornerMultiplier = os.getFloat(key+"_corner", 1.0f); |
|
1425 |
String colors = os.getString(key+"_colors", null); |
|
1426 |
boolean different = false; |
|
1427 |
|
|
1428 |
if( colors!=null ) different = restoreColors(colors,mColorTable); |
|
1429 |
|
|
1430 |
if( different || mTextureBorderMultiplier!=1.0f || mTextureCornerMultiplier!=1.0f ) |
|
1431 |
{ |
|
1432 |
createTexture(mTextureBorderMultiplier,mTextureCornerMultiplier); |
|
1433 |
setTexture(); |
|
1434 |
mSolved.setPuzzleFaceColor(mColorTable); |
|
1435 |
} |
|
1436 |
} |
|
1421 | 1437 |
|
1422 | 1438 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
1423 | 1439 |
|
... | ... | |
1462 | 1478 |
} |
1463 | 1479 |
} |
1464 | 1480 |
|
1465 |
mTextureBorderMultiplier = os.getFloat(key+"_border", 1.0f); |
|
1466 |
mTextureCornerMultiplier = os.getFloat(key+"_corner", 1.0f); |
|
1467 |
String colors = os.getString(key+"_colors", null); |
|
1468 |
boolean different = false; |
|
1469 |
|
|
1470 |
if( colors!=null ) different = restoreColors(colors,mColorTable); |
|
1471 |
|
|
1472 |
if( different || mTextureBorderMultiplier!=1.0f || mTextureCornerMultiplier!=1.0f ) |
|
1473 |
{ |
|
1474 |
createTexture(mTextureBorderMultiplier,mTextureCornerMultiplier); |
|
1475 |
setTexture(); |
|
1476 |
mSolved.setPuzzleFaceColor(mColorTable); |
|
1477 |
} |
|
1481 |
restoreSti(key,os); |
|
1478 | 1482 |
} |
1479 | 1483 |
|
1480 | 1484 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
... | ... | |
1482 | 1486 |
synchronized void restoreStickers(OperatingSystemInterface os) |
1483 | 1487 |
{ |
1484 | 1488 |
String key = getShortName(); |
1485 |
mTextureBorderMultiplier = os.getFloat(key+"_border", 1.0f); |
|
1486 |
mTextureCornerMultiplier = os.getFloat(key+"_corner", 1.0f); |
|
1487 |
String colors = os.getString(key+"_colors", null); |
|
1488 |
boolean different = false; |
|
1489 |
|
|
1490 |
if( colors!=null ) different = restoreColors(colors,mColorTable); |
|
1491 |
|
|
1492 |
if( different || mTextureBorderMultiplier!=1.0f || mTextureCornerMultiplier!=1.0f ) |
|
1493 |
{ |
|
1494 |
createTexture(mTextureBorderMultiplier,mTextureCornerMultiplier); |
|
1495 |
setTexture(); |
|
1496 |
mSolved.setPuzzleFaceColor(mColorTable); |
|
1497 |
} |
|
1489 |
restoreSti(key,os); |
|
1498 | 1490 |
} |
1499 | 1491 |
|
1500 |
|
|
1501 | 1492 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
1502 | 1493 |
|
1503 | 1494 |
void savePreferences(OperatingSystemInterface os) |
Also available in: Unified diff
minor