Revision c1d09246
Added by Leszek Koltunski about 1 year ago
src/main/java/org/distorted/solverui/ScreenList.java | ||
---|---|---|
11 | 11 |
|
12 | 12 |
import static org.distorted.objectlib.main.ObjectControl.MODE_DRAG; |
13 | 13 |
import static org.distorted.objectlib.main.ObjectControl.MODE_REPLACE; |
14 |
import static org.distorted.objectlib.main.ObjectControl.MODE_ROTATE; |
|
15 | 14 |
|
16 | 15 |
import android.content.SharedPreferences; |
17 | 16 |
|
src/main/java/org/distorted/solverui/SolverActivity.java | ||
---|---|---|
72 | 72 |
hideNavigationBar(); |
73 | 73 |
|
74 | 74 |
mJustStarted = true; |
75 |
|
|
76 | 75 |
Bundle b = getIntent().getExtras(); |
77 | 76 |
mObjectOrdinal = b!=null ? b.getInt("obj") : 0; |
78 | 77 |
mSolverOrdinal = ImplementedSolversList.getSolverOrdinal(mObjectOrdinal); |
... | ... | |
226 | 225 |
SharedPreferences preferences = PreferenceManager.getDefaultSharedPreferences(this); |
227 | 226 |
SharedPreferences.Editor editor = preferences.edit(); |
228 | 227 |
|
229 |
editor.putInt("solverIndex", mSolverOrdinal ); |
|
230 |
|
|
231 | 228 |
for( int i=0; i< ScreenList.LENGTH; i++ ) |
232 | 229 |
{ |
233 | 230 |
ScreenList.getScreen(i).getScreenClass().savePreferences(editor); |
... | ... | |
249 | 246 |
|
250 | 247 |
private void restorePreferences(SharedPreferences preferences, boolean justStarted) |
251 | 248 |
{ |
252 |
mSolverOrdinal = preferences.getInt("solverIndex",0); |
|
253 |
|
|
254 | 249 |
RubikObjectList.restorePreferences(this,preferences,justStarted); |
255 | 250 |
|
256 | 251 |
for (int i=0; i<ScreenList.LENGTH; i++) |
src/main/java/org/distorted/solverui/SolverRenderer.java | ||
---|---|---|
1 | 1 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
2 |
// Copyright 2019 Leszek Koltunski //
|
|
2 |
// Copyright 2023 Leszek Koltunski //
|
|
3 | 3 |
// // |
4 | 4 |
// This file is part of Magic Cube. // |
5 | 5 |
// // |
Also available in: Unified diff
Minor