Revision 224c0ff1
Added by Leszek Koltunski about 2 months ago
src/main/java/org/distorted/objectlib/main/TwistyObject.java | ||
---|---|---|
1416 | 1416 |
} |
1417 | 1417 |
} |
1418 | 1418 |
|
1419 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
|
1420 |
|
|
1421 |
|
|
1419 | 1422 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
1420 | 1423 |
|
1421 | 1424 |
synchronized void restorePreferences(OperatingSystemInterface os) |
... | ... | |
1474 | 1477 |
} |
1475 | 1478 |
} |
1476 | 1479 |
|
1480 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
|
1481 |
|
|
1482 |
synchronized void restoreStickers(OperatingSystemInterface os) |
|
1483 |
{ |
|
1484 |
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 |
} |
|
1498 |
} |
|
1499 |
|
|
1500 |
|
|
1477 | 1501 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
1478 | 1502 |
|
1479 | 1503 |
void savePreferences(OperatingSystemInterface os) |
Also available in: Unified diff
New TwistyObject API to only restore the stickers, and not the object positions.