Revision f5da732a
Added by Leszek Koltunski almost 3 years ago
src/main/java/org/distorted/screens/RubikScreenPlay.java | ||
---|---|---|
33 | 33 |
import android.widget.LinearLayout; |
34 | 34 |
import android.widget.PopupWindow; |
35 | 35 |
|
36 |
import org.distorted.control.RubikControl; |
|
36 | 37 |
import org.distorted.dialogs.RubikDialogAbout; |
37 | 38 |
import org.distorted.dialogs.RubikDialogPattern; |
38 | 39 |
import org.distorted.dialogs.RubikDialogScores; |
... | ... | |
71 | 72 |
private float mButtonSize, mMenuItemSize, mMenuTextSize; |
72 | 73 |
private int mColCount, mRowCount; |
73 | 74 |
private LinearLayout mPlayLayout; |
75 |
private RubikControl mControlWhole; |
|
74 | 76 |
|
75 | 77 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
76 | 78 |
|
77 |
void leaveState(RubikActivity act)
|
|
79 |
void leaveScreen(RubikActivity act)
|
|
78 | 80 |
{ |
79 | 81 |
|
80 | 82 |
} |
81 | 83 |
|
82 | 84 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
83 | 85 |
|
84 |
void enterState(final RubikActivity act)
|
|
86 |
void enterScreen(final RubikActivity act)
|
|
85 | 87 |
{ |
86 | 88 |
float width = act.getScreenWidthInPixels(); |
87 | 89 |
|
... | ... | |
285 | 287 |
@Override |
286 | 288 |
public void onClick(View v) |
287 | 289 |
{ |
288 |
if( act.getPreRender().canPlay() && ScreenList.getCurrentState()== ScreenList.PLAY )
|
|
290 |
if( act.getPreRender().canPlay() && ScreenList.getCurrentScreen()== ScreenList.PLAY )
|
|
289 | 291 |
{ |
290 | 292 |
mObject = obj; |
291 | 293 |
mSize = sizes[index]; |
... | ... | |
369 | 371 |
adjustLevels(act); |
370 | 372 |
} |
371 | 373 |
|
372 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
|
373 |
|
|
374 |
private void controlTheCube() |
|
375 |
{ |
|
376 |
android.util.Log.e("D", "Control"); |
|
377 |
} |
|
378 |
|
|
379 | 374 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
380 | 375 |
|
381 | 376 |
private void MenuAction(RubikActivity act, int button) |
382 | 377 |
{ |
383 | 378 |
switch(button) |
384 | 379 |
{ |
385 |
case 0: RubikScreenPlay play = (RubikScreenPlay) ScreenList.PLAY.getStateClass();
|
|
380 |
case 0: RubikScreenPlay play = (RubikScreenPlay) ScreenList.PLAY.getScreenClass();
|
|
386 | 381 |
int object = play.getObject(); |
387 | 382 |
int size = play.getSize(); |
388 | 383 |
int sizeIndex = ObjectList.getSizeIndex(object,size); |
... | ... | |
400 | 395 |
pDiag.setArguments(pBundle); |
401 | 396 |
pDiag.show( act.getSupportFragmentManager(), RubikDialogPattern.getDialogTag() ); |
402 | 397 |
break; |
403 |
case 2: controlTheCube(); |
|
398 |
case 2: if( mControlWhole==null ) mControlWhole = new RubikControl(); |
|
399 |
mControlWhole.animateAll(act); |
|
404 | 400 |
break; |
405 |
case 3: ScreenList.switchState(act, ScreenList.SVER);
|
|
401 |
case 3: ScreenList.switchScreen(act, ScreenList.SVER);
|
|
406 | 402 |
break; |
407 | 403 |
case 4: RubikDialogTutorial tDiag = new RubikDialogTutorial(); |
408 | 404 |
Bundle tBundle = new Bundle(); |
Also available in: Unified diff
Cube Control: step 2.