Revision fcd5b990
Added by Leszek Koltunski almost 3 years ago
src/main/java/org/distorted/main/RubikActivity.java | ||
---|---|---|
45 | 45 |
import org.distorted.network.RubikScores; |
46 | 46 |
import org.distorted.network.RubikNetwork; |
47 | 47 |
import org.distorted.objects.ObjectList; |
48 |
import org.distorted.states.StateList;
|
|
49 |
import org.distorted.states.RubikStatePlay;
|
|
48 |
import org.distorted.screens.ScreenList;
|
|
49 |
import org.distorted.screens.RubikScreenPlay;
|
|
50 | 50 |
import org.distorted.tutorials.TutorialActivity; |
51 | 51 |
|
52 | 52 |
import java.util.Locale; |
... | ... | |
242 | 242 |
view.onResume(); |
243 | 243 |
view.initialize(); |
244 | 244 |
restorePreferences(); |
245 |
StateList.setState(this);
|
|
245 |
ScreenList.setState(this);
|
|
246 | 246 |
|
247 | 247 |
if( mJustStarted ) |
248 | 248 |
{ |
... | ... | |
253 | 253 |
} |
254 | 254 |
|
255 | 255 |
boolean success = false; |
256 |
RubikStatePlay play = (RubikStatePlay) StateList.PLAY.getStateClass();
|
|
256 |
RubikScreenPlay play = (RubikScreenPlay) ScreenList.PLAY.getStateClass();
|
|
257 | 257 |
int object = play.getObject(); |
258 | 258 |
int size = play.getSize(); |
259 | 259 |
|
... | ... | |
272 | 272 |
|
273 | 273 |
if( !success ) |
274 | 274 |
{ |
275 |
ObjectList obj = ObjectList.getObject(RubikStatePlay.DEF_OBJECT);
|
|
276 |
int s = RubikStatePlay.DEF_SIZE;
|
|
275 |
ObjectList obj = ObjectList.getObject(RubikScreenPlay.DEF_OBJECT);
|
|
276 |
int s = RubikScreenPlay.DEF_SIZE;
|
|
277 | 277 |
|
278 | 278 |
play.setObjectAndSize(this,obj,s); |
279 | 279 |
view.getPreRender().changeObject(obj,s); |
... | ... | |
305 | 305 |
BaseEffect.Type.getType(i).savePreferences(editor); |
306 | 306 |
} |
307 | 307 |
|
308 |
for (int i = 0; i< StateList.LENGTH; i++)
|
|
308 |
for (int i = 0; i< ScreenList.LENGTH; i++)
|
|
309 | 309 |
{ |
310 |
StateList.getState(i).getStateClass().savePreferences(editor);
|
|
310 |
ScreenList.getState(i).getStateClass().savePreferences(editor);
|
|
311 | 311 |
} |
312 | 312 |
|
313 |
StateList.savePreferences(editor);
|
|
313 |
ScreenList.savePreferences(editor);
|
|
314 | 314 |
RubikSurfaceView view = findViewById(R.id.rubikSurfaceView); |
315 | 315 |
view.getPreRender().savePreferences(editor); |
316 | 316 |
|
... | ... | |
330 | 330 |
BaseEffect.Type.getType(i).restorePreferences(preferences); |
331 | 331 |
} |
332 | 332 |
|
333 |
for (int i = 0; i< StateList.LENGTH; i++)
|
|
333 |
for (int i = 0; i< ScreenList.LENGTH; i++)
|
|
334 | 334 |
{ |
335 |
StateList.getState(i).getStateClass().restorePreferences(preferences);
|
|
335 |
ScreenList.getState(i).getStateClass().restorePreferences(preferences);
|
|
336 | 336 |
} |
337 | 337 |
|
338 |
StateList.restorePreferences(preferences);
|
|
338 |
ScreenList.restorePreferences(preferences);
|
|
339 | 339 |
|
340 | 340 |
RubikSurfaceView view = findViewById(R.id.rubikSurfaceView); |
341 | 341 |
view.getPreRender().restorePreferences(preferences); |
... | ... | |
545 | 545 |
|
546 | 546 |
public boolean isLocked() |
547 | 547 |
{ |
548 |
StateList state = StateList.getCurrentState();
|
|
548 |
ScreenList state = ScreenList.getCurrentState();
|
|
549 | 549 |
|
550 |
if( state== StateList.PLAY || state== StateList.READ || state== StateList.SOLV )
|
|
550 |
if( state== ScreenList.PLAY || state== ScreenList.READ || state== ScreenList.SOLV )
|
|
551 | 551 |
{ |
552 | 552 |
return mIsLocked; |
553 | 553 |
} |
Also available in: Unified diff
Rename 'state' to 'screen'