Revision e019c70b
Added by Leszek Koltunski over 2 years ago
src/main/java/org/distorted/tutorials/TutorialScreen.java | ||
---|---|---|
19 | 19 |
|
20 | 20 |
package org.distorted.tutorials; |
21 | 21 |
|
22 |
import android.app.Activity; |
|
22 | 23 |
import android.view.View; |
23 | 24 |
import android.widget.ImageButton; |
24 | 25 |
import android.widget.LinearLayout; |
... | ... | |
26 | 27 |
import org.distorted.helpers.MovesController; |
27 | 28 |
import org.distorted.objectlib.main.ObjectControl; |
28 | 29 |
import org.distorted.objectlib.main.ObjectType; |
29 |
import org.distorted.objectlib.helpers.TwistyActivity; |
|
30 | 30 |
|
31 | 31 |
import org.distorted.helpers.LockController; |
32 | 32 |
import org.distorted.main.R; |
... | ... | |
107 | 107 |
LinearLayout layout = act.findViewById(R.id.tutorialRightBar); |
108 | 108 |
layout.removeAllViews(); |
109 | 109 |
|
110 |
mMovesController.setupButton(act,width); |
|
111 |
mLockController.setupButton(act,act.getControl(),width); |
|
110 |
ObjectControl control = act.getControl(); |
|
111 |
mMovesController.setupButton(act,control, width); |
|
112 |
mLockController.setupButton(act,control,width); |
|
112 | 113 |
setupSolveButton(act,width); |
113 | 114 |
setupScrambleButton(act,width); |
114 | 115 |
setupBackButton(act,width); |
... | ... | |
122 | 123 |
|
123 | 124 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
124 | 125 |
|
125 |
void addMove(TwistyActivity act, int axis, int row, int angle)
|
|
126 |
void addMove(Activity act, int axis, int row, int angle) |
|
126 | 127 |
{ |
127 | 128 |
mMovesController.addMove(act, axis,row,angle); |
128 | 129 |
} |
... | ... | |
138 | 139 |
|
139 | 140 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
140 | 141 |
|
141 |
public void reddenLock(final TwistyActivity act)
|
|
142 |
public void reddenLock(final TutorialActivity act)
|
|
142 | 143 |
{ |
143 |
mLockController.reddenLock(act,act.getControl()); |
|
144 |
ObjectControl control = act.getControl(); |
|
145 |
mLockController.reddenLock(act,control); |
|
144 | 146 |
} |
145 | 147 |
} |
Also available in: Unified diff
Remove the concept of a 'TwistyActivity' altogether.