1 |
211b48f2
|
Leszek Koltunski
|
///////////////////////////////////////////////////////////////////////////////////////////////////
|
2 |
|
|
// Copyright 2020 Leszek Koltunski //
|
3 |
|
|
// //
|
4 |
|
|
// This file is part of Magic Cube. //
|
5 |
|
|
// //
|
6 |
|
|
// Magic Cube is free software: you can redistribute it and/or modify //
|
7 |
|
|
// it under the terms of the GNU General Public License as published by //
|
8 |
|
|
// the Free Software Foundation, either version 2 of the License, or //
|
9 |
|
|
// (at your option) any later version. //
|
10 |
|
|
// //
|
11 |
|
|
// Magic Cube is distributed in the hope that it will be useful, //
|
12 |
|
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of //
|
13 |
|
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //
|
14 |
|
|
// GNU General Public License for more details. //
|
15 |
|
|
// //
|
16 |
|
|
// You should have received a copy of the GNU General Public License //
|
17 |
|
|
// along with Magic Cube. If not, see <http://www.gnu.org/licenses/>. //
|
18 |
|
|
///////////////////////////////////////////////////////////////////////////////////////////////////
|
19 |
|
|
|
20 |
1f9772f3
|
Leszek Koltunski
|
package org.distorted.states;
|
21 |
211b48f2
|
Leszek Koltunski
|
|
22 |
4c0cd600
|
Leszek Koltunski
|
import android.content.Context;
|
23 |
211b48f2
|
Leszek Koltunski
|
import android.content.SharedPreferences;
|
24 |
4c0cd600
|
Leszek Koltunski
|
import android.graphics.drawable.BitmapDrawable;
|
25 |
9439f455
|
Leszek Koltunski
|
import android.os.Build;
|
26 |
e03e0352
|
Leszek Koltunski
|
import android.os.Bundle;
|
27 |
dfbb340a
|
Leszek Koltunski
|
import android.util.DisplayMetrics;
|
28 |
e3c74c0f
|
Leszek Koltunski
|
import android.util.TypedValue;
|
29 |
4c0cd600
|
Leszek Koltunski
|
import android.view.Gravity;
|
30 |
211b48f2
|
Leszek Koltunski
|
import android.view.LayoutInflater;
|
31 |
|
|
import android.view.View;
|
32 |
9513f213
|
Leszek Koltunski
|
import android.view.ViewGroup;
|
33 |
85b09df4
|
Leszek Koltunski
|
import android.widget.AdapterView;
|
34 |
|
|
import android.widget.ArrayAdapter;
|
35 |
211b48f2
|
Leszek Koltunski
|
import android.widget.Button;
|
36 |
|
|
import android.widget.ImageButton;
|
37 |
|
|
import android.widget.LinearLayout;
|
38 |
4c0cd600
|
Leszek Koltunski
|
import android.widget.PopupWindow;
|
39 |
e3c74c0f
|
Leszek Koltunski
|
import android.widget.TextView;
|
40 |
|
|
|
41 |
9513f213
|
Leszek Koltunski
|
import androidx.annotation.NonNull;
|
42 |
66e777b0
|
Leszek Koltunski
|
import androidx.appcompat.widget.AppCompatSpinner;
|
43 |
211b48f2
|
Leszek Koltunski
|
|
44 |
e03e0352
|
Leszek Koltunski
|
import org.distorted.dialogs.RubikDialogAbout;
|
45 |
|
|
import org.distorted.dialogs.RubikDialogScores;
|
46 |
1f9772f3
|
Leszek Koltunski
|
import org.distorted.main.R;
|
47 |
|
|
import org.distorted.main.RubikActivity;
|
48 |
15846fe4
|
Leszek Koltunski
|
import org.distorted.main.RubikPreRender;
|
49 |
|
|
import org.distorted.objects.RubikObject;
|
50 |
1f9772f3
|
Leszek Koltunski
|
import org.distorted.objects.RubikObjectList;
|
51 |
211b48f2
|
Leszek Koltunski
|
|
52 |
15846fe4
|
Leszek Koltunski
|
import java.util.ArrayList;
|
53 |
|
|
|
54 |
211b48f2
|
Leszek Koltunski
|
///////////////////////////////////////////////////////////////////////////////////////////////////
|
55 |
|
|
|
56 |
15846fe4
|
Leszek Koltunski
|
public class RubikStatePlay extends RubikStateAbstract implements AdapterView.OnItemSelectedListener,
|
57 |
|
|
RubikPreRender.ActionFinishedListener
|
58 |
211b48f2
|
Leszek Koltunski
|
{
|
59 |
15846fe4
|
Leszek Koltunski
|
private static final int DURATION_MILLIS = 750;
|
60 |
85b09df4
|
Leszek Koltunski
|
private static final int DEF_LEVEL = 1;
|
61 |
|
|
public static final int DEF_OBJECT= RubikObjectList.CUBE.ordinal();
|
62 |
|
|
public static final int DEF_SIZE = 3;
|
63 |
211b48f2
|
Leszek Koltunski
|
|
64 |
e03e0352
|
Leszek Koltunski
|
private static int[] BUTTON_LABELS = { R.string.scores, R.string.patterns, R.string.solver, R.string.about };
|
65 |
|
|
private static final int NUM_BUTTONS = BUTTON_LABELS.length;
|
66 |
|
|
|
67 |
15846fe4
|
Leszek Koltunski
|
private ImageButton mObjButton, mMenuButton, mPrevButton, mSolveButton;
|
68 |
|
|
private Button mPlayButton;
|
69 |
e03e0352
|
Leszek Koltunski
|
private PopupWindow mObjectPopup, mMenuPopup;
|
70 |
4888e97c
|
Leszek Koltunski
|
private int mObject = DEF_OBJECT;
|
71 |
|
|
private int mSize = DEF_SIZE;
|
72 |
74b08185
|
Leszek Koltunski
|
private int mObjectLayoutWidth, mMenuLayoutWidth, mMenuLayoutHeight;
|
73 |
e03e0352
|
Leszek Koltunski
|
private LinearLayout mObjectLayout, mMenuLayout;
|
74 |
8e3898c8
|
Leszek Koltunski
|
private AppCompatSpinner mLevelSpinner;
|
75 |
|
|
private ArrayAdapter<String> mSpinnerAdapter;
|
76 |
85b09df4
|
Leszek Koltunski
|
private int mLevelValue;
|
77 |
dfbb340a
|
Leszek Koltunski
|
private int mBarHeight;
|
78 |
88fb92ba
|
Leszek Koltunski
|
private float mButtonSize, mTitleSize, mMenuItemSize, mMenuTextSize;
|
79 |
211b48f2
|
Leszek Koltunski
|
|
80 |
15846fe4
|
Leszek Koltunski
|
private ArrayList<Move> mMoves;
|
81 |
|
|
private boolean mCanPrevMove;
|
82 |
|
|
|
83 |
|
|
private static class Move
|
84 |
|
|
{
|
85 |
|
|
private int mAxis, mRow, mAngle;
|
86 |
|
|
|
87 |
|
|
Move(int axis, int row, int angle)
|
88 |
|
|
{
|
89 |
|
|
mAxis = axis;
|
90 |
|
|
mRow = row;
|
91 |
|
|
mAngle= angle;
|
92 |
|
|
}
|
93 |
|
|
}
|
94 |
|
|
|
95 |
211b48f2
|
Leszek Koltunski
|
///////////////////////////////////////////////////////////////////////////////////////////////////
|
96 |
|
|
|
97 |
329c0aeb
|
Leszek Koltunski
|
void leaveState(RubikActivity act)
|
98 |
211b48f2
|
Leszek Koltunski
|
{
|
99 |
85b09df4
|
Leszek Koltunski
|
|
100 |
211b48f2
|
Leszek Koltunski
|
}
|
101 |
|
|
|
102 |
|
|
///////////////////////////////////////////////////////////////////////////////////////////////////
|
103 |
|
|
|
104 |
a6d3b158
|
Leszek Koltunski
|
void enterState(final RubikActivity act)
|
105 |
211b48f2
|
Leszek Koltunski
|
{
|
106 |
e3c74c0f
|
Leszek Koltunski
|
float width = act.getScreenWidthInPixels();
|
107 |
88fb92ba
|
Leszek Koltunski
|
mMenuTextSize = width*RubikActivity.MENU_MEDIUM_TEXT_SIZE;
|
108 |
|
|
mButtonSize = width*RubikActivity.BUTTON_TEXT_SIZE;
|
109 |
|
|
mTitleSize = width*RubikActivity.TITLE_TEXT_SIZE;
|
110 |
|
|
mMenuItemSize = width*RubikActivity.MENU_ITEM_SIZE;
|
111 |
e3c74c0f
|
Leszek Koltunski
|
|
112 |
15846fe4
|
Leszek Koltunski
|
mCanPrevMove = true;
|
113 |
|
|
|
114 |
|
|
if( mMoves==null ) mMoves = new ArrayList<>();
|
115 |
|
|
else mMoves.clear();
|
116 |
|
|
|
117 |
211b48f2
|
Leszek Koltunski
|
// TOP ////////////////////////////
|
118 |
7289fd6c
|
Leszek Koltunski
|
LinearLayout layoutTop = act.findViewById(R.id.upperBar);
|
119 |
211b48f2
|
Leszek Koltunski
|
layoutTop.removeAllViews();
|
120 |
85b09df4
|
Leszek Koltunski
|
|
121 |
b376bfd7
|
Leszek Koltunski
|
setupObjectWindow(act,width);
|
122 |
ad0c8e0e
|
Leszek Koltunski
|
setupObjectButton(act,width);
|
123 |
85b09df4
|
Leszek Koltunski
|
layoutTop.addView(mObjButton);
|
124 |
ad0c8e0e
|
Leszek Koltunski
|
setupLevelSpinner(act,width);
|
125 |
85b09df4
|
Leszek Koltunski
|
layoutTop.addView(mLevelSpinner);
|
126 |
ad0c8e0e
|
Leszek Koltunski
|
setupPlayButton(act,width);
|
127 |
85b09df4
|
Leszek Koltunski
|
layoutTop.addView(mPlayButton);
|
128 |
211b48f2
|
Leszek Koltunski
|
|
129 |
|
|
// BOT ////////////////////////////
|
130 |
4c0cd600
|
Leszek Koltunski
|
LinearLayout layoutLeft = act.findViewById(R.id.mainBarLeft);
|
131 |
|
|
layoutLeft.removeAllViews();
|
132 |
4888e97c
|
Leszek Koltunski
|
|
133 |
ad0c8e0e
|
Leszek Koltunski
|
setupPrevButton(act,width);
|
134 |
15846fe4
|
Leszek Koltunski
|
layoutLeft.addView(mPrevButton);
|
135 |
ad0c8e0e
|
Leszek Koltunski
|
setupSolveButton(act,width);
|
136 |
31227bf6
|
Leszek Koltunski
|
layoutLeft.addView(mSolveButton);
|
137 |
769d7b9f
|
Leszek Koltunski
|
|
138 |
4c0cd600
|
Leszek Koltunski
|
LinearLayout layoutRight = act.findViewById(R.id.mainBarRight);
|
139 |
|
|
layoutRight.removeAllViews();
|
140 |
31227bf6
|
Leszek Koltunski
|
|
141 |
b376bfd7
|
Leszek Koltunski
|
setupMenuWindow(act,width);
|
142 |
ad0c8e0e
|
Leszek Koltunski
|
setupMenuButton(act,width);
|
143 |
15846fe4
|
Leszek Koltunski
|
layoutRight.addView(mMenuButton);
|
144 |
769d7b9f
|
Leszek Koltunski
|
}
|
145 |
211b48f2
|
Leszek Koltunski
|
|
146 |
769d7b9f
|
Leszek Koltunski
|
///////////////////////////////////////////////////////////////////////////////////////////////////
|
147 |
4c0cd600
|
Leszek Koltunski
|
|
148 |
ad0c8e0e
|
Leszek Koltunski
|
private void setupObjectButton(final RubikActivity act, final float width)
|
149 |
769d7b9f
|
Leszek Koltunski
|
{
|
150 |
ad0c8e0e
|
Leszek Koltunski
|
int padding = (int)(width*RubikActivity.PADDING);
|
151 |
|
|
int margin = (int)(width*RubikActivity.MARGIN);
|
152 |
31a9f38d
|
Leszek Koltunski
|
int icon = RubikActivity.getDrawable(R.drawable.ui_small_cube_menu,R.drawable.ui_medium_cube_menu, R.drawable.ui_big_cube_menu, R.drawable.ui_huge_cube_menu);
|
153 |
ad0c8e0e
|
Leszek Koltunski
|
|
154 |
|
|
LinearLayout.LayoutParams params = new LinearLayout.LayoutParams(LinearLayout.LayoutParams.MATCH_PARENT,LinearLayout.LayoutParams.MATCH_PARENT, 1.2f);
|
155 |
|
|
params.topMargin = margin;
|
156 |
|
|
params.bottomMargin = margin;
|
157 |
|
|
params.leftMargin = margin;
|
158 |
|
|
params.rightMargin = margin;
|
159 |
|
|
|
160 |
769d7b9f
|
Leszek Koltunski
|
mObjButton = new ImageButton(act);
|
161 |
ad0c8e0e
|
Leszek Koltunski
|
mObjButton.setLayoutParams(params);
|
162 |
769d7b9f
|
Leszek Koltunski
|
mObjButton.setPadding(padding,0,padding,0);
|
163 |
f6a9c538
|
Leszek Koltunski
|
mObjButton.setImageResource(icon);
|
164 |
769d7b9f
|
Leszek Koltunski
|
|
165 |
|
|
mObjButton.setOnClickListener( new View.OnClickListener()
|
166 |
|
|
{
|
167 |
|
|
@Override
|
168 |
|
|
public void onClick(View view)
|
169 |
4c0cd600
|
Leszek Koltunski
|
{
|
170 |
5a4d4fba
|
Leszek Koltunski
|
if( act.getPreRender().canPlay() )
|
171 |
a42e25a6
|
Leszek Koltunski
|
{
|
172 |
|
|
int total = RubikObjectList.getTotal();
|
173 |
|
|
boolean vertical = act.isVertical();
|
174 |
e03e0352
|
Leszek Koltunski
|
mObjectLayout.setOrientation(vertical ? LinearLayout.VERTICAL:LinearLayout.HORIZONTAL);
|
175 |
4c0cd600
|
Leszek Koltunski
|
|
176 |
a42e25a6
|
Leszek Koltunski
|
int width = view.getWidth();
|
177 |
e03e0352
|
Leszek Koltunski
|
int layhei = mObjectLayoutWidth * (vertical? total:1);
|
178 |
|
|
int laywid = mObjectLayoutWidth * (vertical? 1:total);
|
179 |
4c0cd600
|
Leszek Koltunski
|
|
180 |
e03e0352
|
Leszek Koltunski
|
mObjectPopup.showAsDropDown(view, (width-laywid)/2, 0, Gravity.LEFT);
|
181 |
9439f455
|
Leszek Koltunski
|
|
182 |
|
|
if( android.os.Build.VERSION.SDK_INT <= Build.VERSION_CODES.LOLLIPOP_MR1 )
|
183 |
|
|
{
|
184 |
e03e0352
|
Leszek Koltunski
|
mObjectPopup.update(view, laywid, layhei);
|
185 |
9439f455
|
Leszek Koltunski
|
}
|
186 |
a42e25a6
|
Leszek Koltunski
|
}
|
187 |
769d7b9f
|
Leszek Koltunski
|
}
|
188 |
|
|
});
|
189 |
|
|
}
|
190 |
4c0cd600
|
Leszek Koltunski
|
|
191 |
85b09df4
|
Leszek Koltunski
|
///////////////////////////////////////////////////////////////////////////////////////////////////
|
192 |
|
|
|
193 |
ad0c8e0e
|
Leszek Koltunski
|
private void setupLevelSpinner(final RubikActivity act, final float width)
|
194 |
85b09df4
|
Leszek Koltunski
|
{
|
195 |
ad0c8e0e
|
Leszek Koltunski
|
int padding = (int)(width*RubikActivity.PADDING);
|
196 |
|
|
int margin = (int)(width*RubikActivity.MARGIN);
|
197 |
31a9f38d
|
Leszek Koltunski
|
int spin = RubikActivity.getDrawable(R.drawable.ui_small_spinner,R.drawable.ui_big_spinner, R.drawable.ui_big_spinner, R.drawable.ui_huge_spinner);
|
198 |
f6a9c538
|
Leszek Koltunski
|
|
199 |
ad0c8e0e
|
Leszek Koltunski
|
LinearLayout.LayoutParams params = new LinearLayout.LayoutParams(LinearLayout.LayoutParams.MATCH_PARENT,LinearLayout.LayoutParams.MATCH_PARENT, 1.0f);
|
200 |
|
|
params.topMargin = margin;
|
201 |
|
|
params.bottomMargin = margin;
|
202 |
|
|
params.leftMargin = margin;
|
203 |
|
|
params.rightMargin = margin;
|
204 |
85b09df4
|
Leszek Koltunski
|
|
205 |
8e3898c8
|
Leszek Koltunski
|
mLevelSpinner = new AppCompatSpinner(act);
|
206 |
ad0c8e0e
|
Leszek Koltunski
|
mLevelSpinner.setLayoutParams(params);
|
207 |
15846fe4
|
Leszek Koltunski
|
mLevelSpinner.setPadding(padding,0,padding,0);
|
208 |
f6a9c538
|
Leszek Koltunski
|
mLevelSpinner.setBackgroundResource(spin);
|
209 |
85b09df4
|
Leszek Koltunski
|
mLevelSpinner.setTextAlignment(View.TEXT_ALIGNMENT_CENTER);
|
210 |
|
|
|
211 |
|
|
mLevelSpinner.setOnItemSelectedListener(this);
|
212 |
8e3898c8
|
Leszek Koltunski
|
int sizeIndex = RubikObjectList.getSizeIndex(mObject,mSize);
|
213 |
|
|
int maxLevel = RubikObjectList.getMaxLevel(mObject, sizeIndex);
|
214 |
|
|
String[] levels = new String[maxLevel];
|
215 |
85b09df4
|
Leszek Koltunski
|
|
216 |
8e3898c8
|
Leszek Koltunski
|
for(int i=0; i<maxLevel; i++)
|
217 |
85b09df4
|
Leszek Koltunski
|
{
|
218 |
|
|
levels[i] = act.getString(R.string.lv_placeholder,i+1);
|
219 |
|
|
}
|
220 |
|
|
|
221 |
c7f9e82d
|
Leszek Koltunski
|
if( mLevelValue>maxLevel ) mLevelValue=1;
|
222 |
|
|
|
223 |
9513f213
|
Leszek Koltunski
|
mSpinnerAdapter = new ArrayAdapter<String>(act, android.R.layout.simple_spinner_item, levels)
|
224 |
|
|
{
|
225 |
|
|
@NonNull
|
226 |
|
|
public View getView(int position, View convertView, @NonNull ViewGroup parent)
|
227 |
|
|
{
|
228 |
|
|
View v = super.getView(position, convertView, parent);
|
229 |
|
|
TextView tv = ((TextView) v);
|
230 |
|
|
tv.setTextSize(TypedValue.COMPLEX_UNIT_PX, mButtonSize);
|
231 |
|
|
return v;
|
232 |
|
|
}
|
233 |
|
|
};
|
234 |
|
|
|
235 |
8e3898c8
|
Leszek Koltunski
|
mSpinnerAdapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);
|
236 |
|
|
mLevelSpinner.setAdapter(mSpinnerAdapter);
|
237 |
85b09df4
|
Leszek Koltunski
|
mLevelSpinner.setSelection(mLevelValue-1);
|
238 |
|
|
}
|
239 |
|
|
|
240 |
|
|
///////////////////////////////////////////////////////////////////////////////////////////////////
|
241 |
|
|
|
242 |
ad0c8e0e
|
Leszek Koltunski
|
private void setupPlayButton(final RubikActivity act, final float width)
|
243 |
85b09df4
|
Leszek Koltunski
|
{
|
244 |
ad0c8e0e
|
Leszek Koltunski
|
int padding = (int)(width*RubikActivity.PADDING);
|
245 |
|
|
int margin = (int)(width*RubikActivity.MARGIN);
|
246 |
|
|
LinearLayout.LayoutParams params = new LinearLayout.LayoutParams(LinearLayout.LayoutParams.MATCH_PARENT,LinearLayout.LayoutParams.MATCH_PARENT, 1.2f);
|
247 |
|
|
params.topMargin = margin;
|
248 |
|
|
params.bottomMargin = margin;
|
249 |
|
|
params.leftMargin = margin;
|
250 |
|
|
params.rightMargin = margin;
|
251 |
|
|
|
252 |
85b09df4
|
Leszek Koltunski
|
mPlayButton = new Button(act);
|
253 |
ad0c8e0e
|
Leszek Koltunski
|
mPlayButton.setLayoutParams(params);
|
254 |
85b09df4
|
Leszek Koltunski
|
mPlayButton.setPadding(padding,0,padding,0);
|
255 |
e3c74c0f
|
Leszek Koltunski
|
mPlayButton.setTextSize(TypedValue.COMPLEX_UNIT_PX, mButtonSize);
|
256 |
85b09df4
|
Leszek Koltunski
|
mPlayButton.setText(R.string.play);
|
257 |
|
|
|
258 |
|
|
mPlayButton.setOnClickListener( new View.OnClickListener()
|
259 |
|
|
{
|
260 |
|
|
@Override
|
261 |
|
|
public void onClick(View v)
|
262 |
|
|
{
|
263 |
5a4d4fba
|
Leszek Koltunski
|
act.getPreRender().scrambleObject(mLevelValue);
|
264 |
85b09df4
|
Leszek Koltunski
|
}
|
265 |
|
|
});
|
266 |
|
|
}
|
267 |
|
|
|
268 |
e31abc1e
|
Leszek Koltunski
|
///////////////////////////////////////////////////////////////////////////////////////////////////
|
269 |
|
|
|
270 |
ad0c8e0e
|
Leszek Koltunski
|
private void setupMenuButton(final RubikActivity act, final float width)
|
271 |
e31abc1e
|
Leszek Koltunski
|
{
|
272 |
ad0c8e0e
|
Leszek Koltunski
|
int padding = (int)(width*RubikActivity.PADDING);
|
273 |
|
|
int margin = (int)(width*RubikActivity.MARGIN);
|
274 |
31a9f38d
|
Leszek Koltunski
|
int icon = RubikActivity.getDrawable(R.drawable.ui_small_menu,R.drawable.ui_medium_menu, R.drawable.ui_big_menu, R.drawable.ui_huge_menu);
|
275 |
f6a9c538
|
Leszek Koltunski
|
|
276 |
ad0c8e0e
|
Leszek Koltunski
|
LinearLayout.LayoutParams params = new LinearLayout.LayoutParams(LinearLayout.LayoutParams.MATCH_PARENT, LinearLayout.LayoutParams.MATCH_PARENT);
|
277 |
|
|
params.topMargin = margin;
|
278 |
|
|
params.bottomMargin = margin;
|
279 |
|
|
params.leftMargin = margin;
|
280 |
|
|
params.rightMargin = margin;
|
281 |
|
|
|
282 |
e03e0352
|
Leszek Koltunski
|
mMenuButton = new ImageButton(act);
|
283 |
ad0c8e0e
|
Leszek Koltunski
|
mMenuButton.setLayoutParams(params);
|
284 |
e03e0352
|
Leszek Koltunski
|
mMenuButton.setPadding(padding,0,padding,0);
|
285 |
f6a9c538
|
Leszek Koltunski
|
mMenuButton.setImageResource(icon);
|
286 |
e31abc1e
|
Leszek Koltunski
|
|
287 |
e03e0352
|
Leszek Koltunski
|
mMenuButton.setOnClickListener( new View.OnClickListener()
|
288 |
e31abc1e
|
Leszek Koltunski
|
{
|
289 |
|
|
@Override
|
290 |
|
|
public void onClick(View view)
|
291 |
|
|
{
|
292 |
e03e0352
|
Leszek Koltunski
|
if( act.getPreRender().canPlay() )
|
293 |
|
|
{
|
294 |
dfbb340a
|
Leszek Koltunski
|
if( mBarHeight<=0 )
|
295 |
|
|
{
|
296 |
|
|
DisplayMetrics displaymetrics = new DisplayMetrics();
|
297 |
|
|
act.getWindowManager().getDefaultDisplay().getMetrics(displaymetrics);
|
298 |
|
|
mBarHeight=displaymetrics.heightPixels/10;
|
299 |
|
|
}
|
300 |
|
|
|
301 |
|
|
mMenuPopup.showAsDropDown(view, 0, -mMenuLayoutHeight-mBarHeight, Gravity.LEFT);
|
302 |
74b08185
|
Leszek Koltunski
|
mMenuPopup.update(view, mMenuLayoutWidth, mMenuLayoutHeight);
|
303 |
e03e0352
|
Leszek Koltunski
|
}
|
304 |
e31abc1e
|
Leszek Koltunski
|
}
|
305 |
|
|
});
|
306 |
|
|
}
|
307 |
|
|
|
308 |
85b09df4
|
Leszek Koltunski
|
///////////////////////////////////////////////////////////////////////////////////////////////////
|
309 |
|
|
|
310 |
ad0c8e0e
|
Leszek Koltunski
|
private void setupSolveButton(final RubikActivity act, final float width)
|
311 |
85b09df4
|
Leszek Koltunski
|
{
|
312 |
ad0c8e0e
|
Leszek Koltunski
|
int padding = (int)(width*RubikActivity.PADDING);
|
313 |
|
|
int margin = (int)(width*RubikActivity.MARGIN);
|
314 |
15846fe4
|
Leszek Koltunski
|
int widthBut = (int)(width/6);
|
315 |
31a9f38d
|
Leszek Koltunski
|
int icon = RubikActivity.getDrawable(R.drawable.ui_small_cube_solve,R.drawable.ui_medium_cube_solve, R.drawable.ui_big_cube_solve, R.drawable.ui_huge_cube_solve);
|
316 |
f6a9c538
|
Leszek Koltunski
|
|
317 |
ad0c8e0e
|
Leszek Koltunski
|
LinearLayout.LayoutParams params = new LinearLayout.LayoutParams(widthBut, LinearLayout.LayoutParams.MATCH_PARENT);
|
318 |
|
|
params.topMargin = margin;
|
319 |
|
|
params.bottomMargin = margin;
|
320 |
|
|
params.leftMargin = margin;
|
321 |
|
|
params.rightMargin = margin;
|
322 |
|
|
|
323 |
15846fe4
|
Leszek Koltunski
|
mSolveButton = new ImageButton(act);
|
324 |
ad0c8e0e
|
Leszek Koltunski
|
mSolveButton.setLayoutParams(params);
|
325 |
85b09df4
|
Leszek Koltunski
|
mSolveButton.setPadding(padding,0,padding,0);
|
326 |
f6a9c538
|
Leszek Koltunski
|
mSolveButton.setImageResource(icon);
|
327 |
85b09df4
|
Leszek Koltunski
|
|
328 |
|
|
mSolveButton.setOnClickListener( new View.OnClickListener()
|
329 |
|
|
{
|
330 |
|
|
@Override
|
331 |
|
|
public void onClick(View v)
|
332 |
|
|
{
|
333 |
5a4d4fba
|
Leszek Koltunski
|
act.getPreRender().solveObject();
|
334 |
5b893eee
|
Leszek Koltunski
|
mMoves.clear();
|
335 |
85b09df4
|
Leszek Koltunski
|
}
|
336 |
|
|
});
|
337 |
|
|
}
|
338 |
|
|
|
339 |
769d7b9f
|
Leszek Koltunski
|
///////////////////////////////////////////////////////////////////////////////////////////////////
|
340 |
4c0cd600
|
Leszek Koltunski
|
|
341 |
ad0c8e0e
|
Leszek Koltunski
|
private void setupPrevButton(final RubikActivity act, final float width)
|
342 |
769d7b9f
|
Leszek Koltunski
|
{
|
343 |
ad0c8e0e
|
Leszek Koltunski
|
int padding = (int)(width*RubikActivity.PADDING);
|
344 |
|
|
int margin = (int)(width*RubikActivity.MARGIN);
|
345 |
15846fe4
|
Leszek Koltunski
|
int widthBut = (int)(width/6);
|
346 |
31a9f38d
|
Leszek Koltunski
|
int icon = RubikActivity.getDrawable(R.drawable.ui_small_cube_back,R.drawable.ui_medium_cube_back, R.drawable.ui_big_cube_back, R.drawable.ui_huge_cube_back);
|
347 |
f6a9c538
|
Leszek Koltunski
|
|
348 |
ad0c8e0e
|
Leszek Koltunski
|
LinearLayout.LayoutParams params = new LinearLayout.LayoutParams(widthBut, LinearLayout.LayoutParams.MATCH_PARENT);
|
349 |
|
|
params.topMargin = margin;
|
350 |
|
|
params.bottomMargin = margin;
|
351 |
|
|
params.leftMargin = margin;
|
352 |
|
|
params.rightMargin = margin;
|
353 |
|
|
|
354 |
15846fe4
|
Leszek Koltunski
|
mPrevButton = new ImageButton(act);
|
355 |
ad0c8e0e
|
Leszek Koltunski
|
mPrevButton.setLayoutParams(params);
|
356 |
15846fe4
|
Leszek Koltunski
|
mPrevButton.setPadding(padding,0,padding,0);
|
357 |
f6a9c538
|
Leszek Koltunski
|
mPrevButton.setImageResource(icon);
|
358 |
15846fe4
|
Leszek Koltunski
|
|
359 |
|
|
mPrevButton.setOnClickListener( new View.OnClickListener()
|
360 |
a6d3b158
|
Leszek Koltunski
|
{
|
361 |
|
|
@Override
|
362 |
|
|
public void onClick(View v)
|
363 |
|
|
{
|
364 |
15846fe4
|
Leszek Koltunski
|
RubikPreRender pre = act.getPreRender();
|
365 |
|
|
backMove(pre);
|
366 |
a6d3b158
|
Leszek Koltunski
|
}
|
367 |
|
|
});
|
368 |
211b48f2
|
Leszek Koltunski
|
}
|
369 |
|
|
|
370 |
4c0cd600
|
Leszek Koltunski
|
///////////////////////////////////////////////////////////////////////////////////////////////////
|
371 |
|
|
|
372 |
ad0c8e0e
|
Leszek Koltunski
|
private void setupObjectWindow(final RubikActivity act, final float width)
|
373 |
4c0cd600
|
Leszek Koltunski
|
{
|
374 |
769d7b9f
|
Leszek Koltunski
|
LayoutInflater layoutInflater = (LayoutInflater)act.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
|
375 |
|
|
final View layout = layoutInflater.inflate(R.layout.popup_objects, null);
|
376 |
e03e0352
|
Leszek Koltunski
|
mObjectLayout = layout.findViewById(R.id.popup);
|
377 |
769d7b9f
|
Leszek Koltunski
|
|
378 |
e03e0352
|
Leszek Koltunski
|
mObjectPopup = new PopupWindow(act);
|
379 |
|
|
mObjectPopup.setContentView(layout);
|
380 |
|
|
mObjectPopup.setFocusable(true);
|
381 |
f6a9c538
|
Leszek Koltunski
|
int margin = (int)(width*RubikActivity.LARGE_MARGIN);
|
382 |
31a9f38d
|
Leszek Koltunski
|
int icon = RubikActivity.getDrawable(R.drawable.ui_small_cube2,R.drawable.ui_medium_cube2, R.drawable.ui_big_cube2, R.drawable.ui_huge_cube2);
|
383 |
769d7b9f
|
Leszek Koltunski
|
|
384 |
f6a9c538
|
Leszek Koltunski
|
BitmapDrawable bd = (BitmapDrawable) act.getResources().getDrawable(icon);
|
385 |
769d7b9f
|
Leszek Koltunski
|
int cubeWidth = bd.getIntrinsicWidth();
|
386 |
e03e0352
|
Leszek Koltunski
|
mObjectLayoutWidth = (int)(cubeWidth + 2*margin + 0.5f);
|
387 |
4c0cd600
|
Leszek Koltunski
|
|
388 |
f6a9c538
|
Leszek Koltunski
|
LinearLayout.LayoutParams p = new LinearLayout.LayoutParams(LinearLayout.LayoutParams.WRAP_CONTENT,LinearLayout.LayoutParams.WRAP_CONTENT);
|
389 |
|
|
p.setMargins(margin, margin, margin, margin);
|
390 |
|
|
|
391 |
769d7b9f
|
Leszek Koltunski
|
for(int object=0; object<RubikObjectList.NUM_OBJECTS; object++)
|
392 |
|
|
{
|
393 |
53f23b64
|
Leszek Koltunski
|
final RubikObjectList list = RubikObjectList.getObject(object);
|
394 |
|
|
final int[] sizes = list.getSizes();
|
395 |
769d7b9f
|
Leszek Koltunski
|
int[] icons = list.getIconIDs();
|
396 |
|
|
int len = sizes.length;
|
397 |
|
|
final int obj = object;
|
398 |
|
|
|
399 |
|
|
for(int i=0; i<len; i++)
|
400 |
|
|
{
|
401 |
|
|
final int size = i;
|
402 |
|
|
|
403 |
|
|
ImageButton button = new ImageButton(act);
|
404 |
|
|
button.setLayoutParams(p);
|
405 |
4c0cd600
|
Leszek Koltunski
|
|
406 |
769d7b9f
|
Leszek Koltunski
|
button.setBackgroundResource(icons[i]);
|
407 |
|
|
button.setOnClickListener( new View.OnClickListener()
|
408 |
|
|
{
|
409 |
|
|
@Override
|
410 |
|
|
public void onClick(View v)
|
411 |
|
|
{
|
412 |
5a4d4fba
|
Leszek Koltunski
|
if( act.getPreRender().canPlay() && RubikState.getCurrentState()==RubikState.PLAY )
|
413 |
a42e25a6
|
Leszek Koltunski
|
{
|
414 |
|
|
mObject = obj;
|
415 |
|
|
mSize = sizes[size];
|
416 |
7eae2d49
|
Leszek Koltunski
|
act.changeObject(list,sizes[size], true);
|
417 |
7b7d65ce
|
Leszek Koltunski
|
adjustSpinner(act);
|
418 |
40c8c5fa
|
Leszek Koltunski
|
mMoves.clear();
|
419 |
a42e25a6
|
Leszek Koltunski
|
}
|
420 |
8e3898c8
|
Leszek Koltunski
|
|
421 |
e03e0352
|
Leszek Koltunski
|
mObjectPopup.dismiss();
|
422 |
769d7b9f
|
Leszek Koltunski
|
}
|
423 |
|
|
});
|
424 |
|
|
|
425 |
e03e0352
|
Leszek Koltunski
|
mObjectLayout.addView(button);
|
426 |
769d7b9f
|
Leszek Koltunski
|
}
|
427 |
|
|
}
|
428 |
4c0cd600
|
Leszek Koltunski
|
}
|
429 |
|
|
|
430 |
e03e0352
|
Leszek Koltunski
|
///////////////////////////////////////////////////////////////////////////////////////////////////
|
431 |
|
|
|
432 |
ad0c8e0e
|
Leszek Koltunski
|
private void setupMenuWindow(final RubikActivity act, final float width)
|
433 |
e03e0352
|
Leszek Koltunski
|
{
|
434 |
|
|
LayoutInflater layoutInflater = (LayoutInflater)act.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
|
435 |
|
|
final View layout = layoutInflater.inflate(R.layout.popup_objects, null);
|
436 |
|
|
mMenuLayout = layout.findViewById(R.id.popup);
|
437 |
|
|
|
438 |
|
|
mMenuPopup = new PopupWindow(act);
|
439 |
|
|
mMenuPopup.setContentView(layout);
|
440 |
|
|
mMenuPopup.setFocusable(true);
|
441 |
ad0c8e0e
|
Leszek Koltunski
|
int margin = (int)(width*RubikActivity.MARGIN);
|
442 |
|
|
int padding = (int)(width*RubikActivity.PADDING);
|
443 |
e03e0352
|
Leszek Koltunski
|
|
444 |
ad0c8e0e
|
Leszek Koltunski
|
LinearLayout.LayoutParams p0 = new LinearLayout.LayoutParams( (int)width/2 - 2*padding, (int)mMenuItemSize);
|
445 |
|
|
p0.setMargins(margin, 0, margin, margin);
|
446 |
|
|
LinearLayout.LayoutParams p1 = new LinearLayout.LayoutParams( (int)width/2 - 2*padding, (int)mMenuItemSize);
|
447 |
|
|
p1.setMargins(margin, margin, margin, margin);
|
448 |
e03e0352
|
Leszek Koltunski
|
|
449 |
|
|
for(int i=0; i<NUM_BUTTONS; i++)
|
450 |
|
|
{
|
451 |
|
|
final int but = i;
|
452 |
|
|
Button button = new Button(act);
|
453 |
ad0c8e0e
|
Leszek Koltunski
|
button.setLayoutParams(i==0 ? p1:p0);
|
454 |
e03e0352
|
Leszek Koltunski
|
button.setText(BUTTON_LABELS[i]);
|
455 |
88fb92ba
|
Leszek Koltunski
|
button.setTextSize(TypedValue.COMPLEX_UNIT_PX, mMenuTextSize);
|
456 |
e03e0352
|
Leszek Koltunski
|
|
457 |
|
|
button.setOnClickListener( new View.OnClickListener()
|
458 |
|
|
{
|
459 |
|
|
@Override
|
460 |
|
|
public void onClick(View v)
|
461 |
|
|
{
|
462 |
|
|
mMenuPopup.dismiss();
|
463 |
|
|
Action(act,but);
|
464 |
|
|
}
|
465 |
|
|
});
|
466 |
|
|
|
467 |
|
|
mMenuLayout.addView(button);
|
468 |
|
|
}
|
469 |
|
|
|
470 |
74b08185
|
Leszek Koltunski
|
mMenuLayoutWidth = (int)(width/2);
|
471 |
ad0c8e0e
|
Leszek Koltunski
|
mMenuLayoutHeight= (int)(margin + NUM_BUTTONS*(mMenuItemSize+margin));
|
472 |
e03e0352
|
Leszek Koltunski
|
}
|
473 |
|
|
|
474 |
15846fe4
|
Leszek Koltunski
|
///////////////////////////////////////////////////////////////////////////////////////////////////
|
475 |
|
|
|
476 |
|
|
private void backMove(RubikPreRender pre)
|
477 |
|
|
{
|
478 |
|
|
if( mCanPrevMove )
|
479 |
|
|
{
|
480 |
|
|
int numMoves = mMoves.size();
|
481 |
|
|
|
482 |
|
|
if( numMoves>0 )
|
483 |
|
|
{
|
484 |
|
|
Move move = mMoves.remove(numMoves-1);
|
485 |
|
|
RubikObject object = pre.getObject();
|
486 |
|
|
|
487 |
|
|
int axis = move.mAxis;
|
488 |
|
|
int row = (1<<move.mRow);
|
489 |
|
|
int angle = move.mAngle;
|
490 |
|
|
int numRot= Math.abs(angle*object.getBasicAngle()/360);
|
491 |
|
|
|
492 |
|
|
if( angle!=0 )
|
493 |
|
|
{
|
494 |
|
|
mCanPrevMove = false;
|
495 |
|
|
pre.addRotation(this, axis, row, -angle, numRot*DURATION_MILLIS);
|
496 |
|
|
}
|
497 |
|
|
else
|
498 |
|
|
{
|
499 |
|
|
android.util.Log.e("solution", "error: trying to back move of angle 0");
|
500 |
|
|
}
|
501 |
|
|
}
|
502 |
|
|
}
|
503 |
|
|
}
|
504 |
e03e0352
|
Leszek Koltunski
|
///////////////////////////////////////////////////////////////////////////////////////////////////
|
505 |
|
|
|
506 |
|
|
private void Action(RubikActivity act, int button)
|
507 |
|
|
{
|
508 |
|
|
switch(button)
|
509 |
|
|
{
|
510 |
|
|
case 0: RubikStatePlay play = (RubikStatePlay) RubikState.PLAY.getStateClass();
|
511 |
|
|
int object = play.getObject();
|
512 |
|
|
int size = play.getSize();
|
513 |
|
|
int sizeIndex = RubikObjectList.getSizeIndex(object,size);
|
514 |
|
|
|
515 |
|
|
Bundle bundle = new Bundle();
|
516 |
|
|
bundle.putInt("tab", RubikObjectList.pack(object,sizeIndex) );
|
517 |
|
|
bundle.putBoolean("submitting", false);
|
518 |
|
|
|
519 |
|
|
RubikDialogScores scores = new RubikDialogScores();
|
520 |
|
|
scores.setArguments(bundle);
|
521 |
|
|
scores.show(act.getSupportFragmentManager(), null);
|
522 |
|
|
break;
|
523 |
|
|
case 1: RubikState.switchState(act,RubikState.PATT);
|
524 |
|
|
break;
|
525 |
|
|
case 2: RubikState.switchState(act,RubikState.SVER);
|
526 |
|
|
break;
|
527 |
|
|
case 3: RubikDialogAbout diag = new RubikDialogAbout();
|
528 |
|
|
diag.show(act.getSupportFragmentManager(), null);
|
529 |
|
|
break;
|
530 |
|
|
}
|
531 |
|
|
}
|
532 |
|
|
|
533 |
211b48f2
|
Leszek Koltunski
|
///////////////////////////////////////////////////////////////////////////////////////////////////
|
534 |
|
|
|
535 |
|
|
public void savePreferences(SharedPreferences.Editor editor)
|
536 |
|
|
{
|
537 |
85b09df4
|
Leszek Koltunski
|
editor.putInt("statePlay_level" , mLevelValue);
|
538 |
4888e97c
|
Leszek Koltunski
|
editor.putInt("statePlay_object", mObject);
|
539 |
|
|
editor.putInt("statePlay_size" , mSize);
|
540 |
4c0cd600
|
Leszek Koltunski
|
|
541 |
e03e0352
|
Leszek Koltunski
|
if( mObjectPopup!=null )
|
542 |
|
|
{
|
543 |
|
|
mObjectPopup.dismiss();
|
544 |
|
|
mObjectPopup = null;
|
545 |
|
|
}
|
546 |
|
|
|
547 |
|
|
if( mMenuPopup!=null )
|
548 |
4c0cd600
|
Leszek Koltunski
|
{
|
549 |
e03e0352
|
Leszek Koltunski
|
mMenuPopup.dismiss();
|
550 |
|
|
mMenuPopup = null;
|
551 |
4c0cd600
|
Leszek Koltunski
|
}
|
552 |
211b48f2
|
Leszek Koltunski
|
}
|
553 |
|
|
|
554 |
|
|
///////////////////////////////////////////////////////////////////////////////////////////////////
|
555 |
|
|
|
556 |
|
|
public void restorePreferences(SharedPreferences preferences)
|
557 |
|
|
{
|
558 |
85b09df4
|
Leszek Koltunski
|
mLevelValue = preferences.getInt("statePlay_level" , DEF_LEVEL );
|
559 |
|
|
mObject = preferences.getInt("statePlay_object", DEF_OBJECT);
|
560 |
|
|
mSize = preferences.getInt("statePlay_size" , DEF_SIZE );
|
561 |
211b48f2
|
Leszek Koltunski
|
}
|
562 |
|
|
|
563 |
53f23b64
|
Leszek Koltunski
|
///////////////////////////////////////////////////////////////////////////////////////////////////
|
564 |
|
|
|
565 |
7b7d65ce
|
Leszek Koltunski
|
public boolean setObjectAndSize(RubikActivity act, RubikObjectList obj, int size)
|
566 |
53f23b64
|
Leszek Koltunski
|
{
|
567 |
7b7d65ce
|
Leszek Koltunski
|
if( mObject!=obj.ordinal() || mSize != size )
|
568 |
|
|
{
|
569 |
|
|
boolean success = false;
|
570 |
53f23b64
|
Leszek Koltunski
|
|
571 |
7b7d65ce
|
Leszek Koltunski
|
for( int s: obj.getSizes() )
|
572 |
|
|
if( s==size )
|
573 |
|
|
{
|
574 |
|
|
success = true;
|
575 |
|
|
break;
|
576 |
|
|
}
|
577 |
|
|
|
578 |
|
|
if( success )
|
579 |
53f23b64
|
Leszek Koltunski
|
{
|
580 |
7b7d65ce
|
Leszek Koltunski
|
mObject = obj.ordinal();
|
581 |
|
|
mSize = size;
|
582 |
5f8c532e
|
Leszek Koltunski
|
|
583 |
|
|
if( mLevelSpinner!=null ) adjustSpinner(act);
|
584 |
53f23b64
|
Leszek Koltunski
|
}
|
585 |
|
|
|
586 |
7b7d65ce
|
Leszek Koltunski
|
return success;
|
587 |
|
|
}
|
588 |
|
|
|
589 |
|
|
return true;
|
590 |
|
|
}
|
591 |
|
|
|
592 |
|
|
///////////////////////////////////////////////////////////////////////////////////////////////////
|
593 |
|
|
|
594 |
|
|
private void adjustSpinner(RubikActivity act)
|
595 |
|
|
{
|
596 |
|
|
int sizeIndex = RubikObjectList.getSizeIndex(mObject,mSize);
|
597 |
|
|
int maxLevel = RubikObjectList.getMaxLevel(mObject, sizeIndex);
|
598 |
|
|
String[] levels = new String[maxLevel];
|
599 |
|
|
|
600 |
|
|
for(int i=0; i<maxLevel; i++)
|
601 |
53f23b64
|
Leszek Koltunski
|
{
|
602 |
7b7d65ce
|
Leszek Koltunski
|
levels[i] = act.getString(R.string.lv_placeholder,i+1);
|
603 |
53f23b64
|
Leszek Koltunski
|
}
|
604 |
|
|
|
605 |
011fcfe0
|
Leszek Koltunski
|
mSpinnerAdapter = new ArrayAdapter<String>(act, android.R.layout.simple_spinner_item, levels)
|
606 |
|
|
{
|
607 |
|
|
@NonNull
|
608 |
|
|
public View getView(int position, View convertView, @NonNull ViewGroup parent)
|
609 |
|
|
{
|
610 |
|
|
View v = super.getView(position, convertView, parent);
|
611 |
|
|
TextView tv = ((TextView) v);
|
612 |
|
|
tv.setTextSize(TypedValue.COMPLEX_UNIT_PX, mButtonSize);
|
613 |
|
|
return v;
|
614 |
|
|
}
|
615 |
|
|
};
|
616 |
|
|
|
617 |
7b7d65ce
|
Leszek Koltunski
|
mSpinnerAdapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);
|
618 |
|
|
mLevelSpinner.setAdapter(mSpinnerAdapter);
|
619 |
53f23b64
|
Leszek Koltunski
|
}
|
620 |
|
|
|
621 |
211b48f2
|
Leszek Koltunski
|
///////////////////////////////////////////////////////////////////////////////////////////////////
|
622 |
|
|
|
623 |
85b09df4
|
Leszek Koltunski
|
int getLevel()
|
624 |
211b48f2
|
Leszek Koltunski
|
{
|
625 |
85b09df4
|
Leszek Koltunski
|
return mLevelValue;
|
626 |
211b48f2
|
Leszek Koltunski
|
}
|
627 |
|
|
|
628 |
15846fe4
|
Leszek Koltunski
|
///////////////////////////////////////////////////////////////////////////////////////////////////
|
629 |
|
|
|
630 |
|
|
public void addMove(int axis, int row, int angle)
|
631 |
|
|
{
|
632 |
|
|
mMoves.add(new Move(axis,row,angle));
|
633 |
|
|
}
|
634 |
|
|
|
635 |
211b48f2
|
Leszek Koltunski
|
///////////////////////////////////////////////////////////////////////////////////////////////////
|
636 |
|
|
|
637 |
4888e97c
|
Leszek Koltunski
|
public int getObject()
|
638 |
211b48f2
|
Leszek Koltunski
|
{
|
639 |
4888e97c
|
Leszek Koltunski
|
return mObject;
|
640 |
211b48f2
|
Leszek Koltunski
|
}
|
641 |
|
|
|
642 |
|
|
///////////////////////////////////////////////////////////////////////////////////////////////////
|
643 |
|
|
|
644 |
4888e97c
|
Leszek Koltunski
|
public int getSize()
|
645 |
211b48f2
|
Leszek Koltunski
|
{
|
646 |
4888e97c
|
Leszek Koltunski
|
return mSize;
|
647 |
|
|
}
|
648 |
85b09df4
|
Leszek Koltunski
|
|
649 |
|
|
///////////////////////////////////////////////////////////////////////////////////////////////////
|
650 |
|
|
|
651 |
|
|
public void onItemSelected(AdapterView<?> parent, View view, int pos, long id)
|
652 |
|
|
{
|
653 |
|
|
mLevelValue = pos+1;
|
654 |
|
|
}
|
655 |
|
|
|
656 |
|
|
///////////////////////////////////////////////////////////////////////////////////////////////////
|
657 |
|
|
|
658 |
|
|
public void onNothingSelected(AdapterView<?> parent) { }
|
659 |
15846fe4
|
Leszek Koltunski
|
|
660 |
|
|
///////////////////////////////////////////////////////////////////////////////////////////////////
|
661 |
|
|
|
662 |
|
|
public void onActionFinished(final long effectID)
|
663 |
|
|
{
|
664 |
|
|
mCanPrevMove = true;
|
665 |
|
|
}
|
666 |
211b48f2
|
Leszek Koltunski
|
}
|