Revision 8a230c8a
Added by Leszek Koltunski 9 months ago
src/main/java/org/distorted/objectlib/helpers/ObjectLibInterface.java | ||
---|---|---|
21 | 21 |
void failedToDrag(); |
22 | 22 |
void onSolved(); |
23 | 23 |
void onObjectCreated(long time); |
24 |
void onReplaceModeDown(int cubit, int face);
|
|
25 |
void onReplaceModeUp();
|
|
24 |
void onStickerTouched(int cubit, int face);
|
|
25 |
void onStickerUntouched();
|
|
26 | 26 |
|
27 | 27 |
void reportBlockProblem(int type, int place, long pause, long resume, long time); |
28 | 28 |
void reportProblem(String problem, boolean reportException); |
src/main/java/org/distorted/objectlib/main/ObjectControl.java | ||
---|---|---|
132 | 132 |
return distInPixels/mDensity; |
133 | 133 |
} |
134 | 134 |
|
135 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
|
136 |
|
|
137 |
private void replaceMode(boolean down) |
|
138 |
{ |
|
139 |
mBeginningRotation= false; |
|
140 |
|
|
141 |
if( down ) |
|
142 |
{ |
|
143 |
int cubit = mTouchControl.getTouchedCubit(); |
|
144 |
int face = mTouchControl.getTouchedCubitFace(); |
|
145 |
mInterface.onReplaceModeDown(cubit,face); |
|
146 |
} |
|
147 |
} |
|
148 |
|
|
149 | 135 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
150 | 136 |
|
151 | 137 |
private void setUpDragOrRotate(boolean down, float x, float y) |
... | ... | |
170 | 156 |
mContinuingRotation = false; |
171 | 157 |
|
172 | 158 |
if( mLastMode==MODE_ROTATE ) mBeginningRotation = !mPreRender.isRotationBlocked(); |
173 |
else if( mLastMode==MODE_REPLACE ) replaceMode(down); |
|
159 |
else if( mLastMode==MODE_REPLACE ) mBeginningRotation= false; |
|
160 |
|
|
161 |
if( down ) |
|
162 |
{ |
|
163 |
int cubit = mTouchControl.getTouchedCubit(); |
|
164 |
int face = mTouchControl.getTouchedCubitFace(); |
|
165 |
mInterface.onStickerTouched(cubit,face); |
|
166 |
} |
|
174 | 167 |
} |
175 | 168 |
else |
176 | 169 |
{ |
... | ... | |
461 | 454 |
finishRotation(); |
462 | 455 |
} |
463 | 456 |
|
464 |
if( mLastMode==MODE_REPLACE ) mInterface.onReplaceModeUp();
|
|
457 |
mInterface.onStickerUntouched();
|
|
465 | 458 |
} |
466 | 459 |
|
467 | 460 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
src/main/java/org/distorted/objectlib/solvers/verifiers/ImplementedVerifierList.java | ||
---|---|---|
13 | 13 |
|
14 | 14 |
import org.distorted.objectlib.helpers.OperatingSystemInterface; |
15 | 15 |
import org.distorted.objectlib.main.TwistyObject; |
16 |
import org.distorted.objectlib.metadata.*; |
|
17 | 16 |
|
18 | 17 |
import java.lang.reflect.Constructor; |
19 | 18 |
import java.lang.reflect.InvocationTargetException; |
Also available in: Unified diff
change one of objlib's APIs from 'onReplaceModeUP/Down' (which only comes when TouchControl is in REPLACE mode) to 'onStickerTouched/Untouched' (which reports the same thing, but comes always)