Revision e019c70b
Added by Leszek Koltunski over 2 years ago
src/main/java/org/distorted/screens/RubikScreenBase.java | ||
---|---|---|
19 | 19 |
|
20 | 20 |
package org.distorted.screens; |
21 | 21 |
|
22 |
import android.app.Activity; |
|
22 | 23 |
import android.widget.ImageButton; |
23 | 24 |
import android.widget.LinearLayout; |
24 | 25 |
|
25 |
import org.distorted.objectlib.helpers.TwistyActivity;
|
|
26 |
import org.distorted.main.RubikActivity;
|
|
26 | 27 |
import org.distorted.objectlib.main.ObjectControl; |
27 | 28 |
|
28 | 29 |
import org.distorted.helpers.LockController; |
... | ... | |
38 | 39 |
|
39 | 40 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
40 | 41 |
|
41 |
void createBottomPane(final TwistyActivity act, float width, ImageButton button)
|
|
42 |
void createBottomPane(final RubikActivity act, float width, ImageButton button)
|
|
42 | 43 |
{ |
43 | 44 |
mMovesController.clearMoves(act); |
44 | 45 |
|
... | ... | |
54 | 55 |
LinearLayout layoutRight = new LinearLayout(act); |
55 | 56 |
layoutRight.setLayoutParams(params); |
56 | 57 |
|
57 |
mMovesController.setupButton(act,width); |
|
58 |
ObjectControl control = act.getControl(); |
|
59 |
mMovesController.setupButton(act,control,width); |
|
58 | 60 |
layoutLeft.addView(mMovesController.getButton()); |
59 |
mLockController.setupButton(act,act.getControl(),width);
|
|
61 |
mLockController.setupButton(act,control,width);
|
|
60 | 62 |
layoutMid.addView(mLockController.getButton()); |
61 | 63 |
layoutRight.addView(button); |
62 | 64 |
|
... | ... | |
67 | 69 |
|
68 | 70 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
69 | 71 |
|
70 |
public void setLockState(final TwistyActivity act)
|
|
72 |
public void setLockState(final RubikActivity act)
|
|
71 | 73 |
{ |
72 | 74 |
boolean locked = act.getControl().retLocked(); |
73 | 75 |
mLockController.setState(act,locked); |
... | ... | |
84 | 86 |
|
85 | 87 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
86 | 88 |
|
87 |
public void addMove(TwistyActivity act, int axis, int row, int angle)
|
|
89 |
public void addMove(Activity act, int axis, int row, int angle) |
|
88 | 90 |
{ |
89 | 91 |
mMovesController.addMove(act,axis,row,angle); |
90 | 92 |
} |
91 | 93 |
|
92 | 94 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
93 | 95 |
|
94 |
public void reddenLock(final TwistyActivity act)
|
|
96 |
public void reddenLock(final RubikActivity act)
|
|
95 | 97 |
{ |
96 | 98 |
ObjectControl control = act.getControl(); |
97 | 99 |
mLockController.reddenLock(act,control); |
Also available in: Unified diff
Remove the concept of a 'TwistyActivity' altogether.