Revision 27a70eae
Added by Leszek Koltunski about 4 years ago
src/main/java/org/distorted/uistate/RubikStatePlay.java | ||
---|---|---|
34 | 34 |
import org.distorted.component.HorizontalNumberPicker; |
35 | 35 |
import org.distorted.magic.R; |
36 | 36 |
import org.distorted.magic.RubikActivity; |
37 |
import org.distorted.object.RubikObject; |
|
37 |
import org.distorted.object.RubikObjectList;
|
|
38 | 38 |
|
39 | 39 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
40 | 40 |
|
... | ... | |
43 | 43 |
private static final int MIN_SCRAMBLE = 1; |
44 | 44 |
private static final int DEF_SCRAMBLE = 1; |
45 | 45 |
public static final int MAX_SCRAMBLE = 18; |
46 |
private static final int DEF_BUTTON = RubikObject.CUBE3.ordinal(); |
|
46 |
private static final int DEF_BUTTON = RubikObjectList.CUBE3.ordinal();
|
|
47 | 47 |
|
48 | 48 |
private HorizontalNumberPicker mPicker; |
49 | 49 |
private int mPickerValue; |
... | ... | |
79 | 79 |
int padding = (int)(3*scale + 0.5f); |
80 | 80 |
ViewGroup.LayoutParams params = new ViewGroup.LayoutParams(size,size); |
81 | 81 |
|
82 |
for(int i = 0; i< RubikObject.LENGTH; i++) |
|
82 |
for(int i = 0; i< RubikObjectList.LENGTH; i++)
|
|
83 | 83 |
{ |
84 | 84 |
ImageButton button = new ImageButton(act); |
85 | 85 |
button.setLayoutParams(params); |
86 | 86 |
button.setId(i); |
87 | 87 |
button.setPadding(padding,0,padding,0); |
88 |
int iconID = RubikObject.getObject(i).getIconID(); |
|
88 |
int iconID = RubikObjectList.getObject(i).getIconID();
|
|
89 | 89 |
button.setImageResource(iconID); |
90 | 90 |
button.setOnClickListener(act); |
91 | 91 |
layoutBot.addView(button); |
... | ... | |
153 | 153 |
{ |
154 | 154 |
mButton = button; |
155 | 155 |
|
156 |
for(int b = 0; b< RubikObject.LENGTH; b++) |
|
156 |
for(int b = 0; b< RubikObjectList.LENGTH; b++)
|
|
157 | 157 |
{ |
158 | 158 |
Drawable d = act.findViewById(b).getBackground(); |
159 | 159 |
|
Also available in: Unified diff
Make RubikCube and RubikCubeMovement generic and not visible outside of their package.