Revision 4f9f99a2
Added by Leszek Koltunski over 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.magic.RubikSize;
|
|
37 |
import org.distorted.object.RubikObject;
|
|
38 | 38 |
|
39 | 39 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
40 | 40 |
|
... | ... | |
46 | 46 |
|
47 | 47 |
private HorizontalNumberPicker mPicker; |
48 | 48 |
private int mPickerValue; |
49 |
private int mButton = RubikSize.SIZE3.ordinal();
|
|
49 |
private int mButton = RubikObject.CUBE3.ordinal();
|
|
50 | 50 |
|
51 | 51 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
52 | 52 |
|
... | ... | |
78 | 78 |
int padding = (int)(3*scale + 0.5f); |
79 | 79 |
ViewGroup.LayoutParams params = new ViewGroup.LayoutParams(size,size); |
80 | 80 |
|
81 |
for(int i = 0; i< RubikSize.LENGTH; i++)
|
|
81 |
for(int i = 0; i< RubikObject.LENGTH; i++)
|
|
82 | 82 |
{ |
83 | 83 |
ImageButton button = new ImageButton(act); |
84 | 84 |
button.setLayoutParams(params); |
85 | 85 |
button.setId(i); |
86 | 86 |
button.setPadding(padding,0,padding,0); |
87 |
int iconID = RubikSize.getSize(i).getIconID();
|
|
87 |
int iconID = RubikObject.getObject(i).getIconID();
|
|
88 | 88 |
button.setImageResource(iconID); |
89 | 89 |
button.setOnClickListener(act); |
90 | 90 |
layoutBot.addView(button); |
... | ... | |
149 | 149 |
{ |
150 | 150 |
mButton = button; |
151 | 151 |
|
152 |
for(int b=0; b<RubikSize.LENGTH; b++)
|
|
152 |
for(int b = 0; b< RubikObject.LENGTH; b++)
|
|
153 | 153 |
{ |
154 | 154 |
Drawable d = act.findViewById(b).getBackground(); |
155 | 155 |
|
Also available in: Unified diff
Separate the network package; rename RubikSize to RubikObject.