Revision 6f3af598
Added by Leszek Koltunski about 2 years ago
src/main/java/org/distorted/bandaged/BandagedCreatorView.java | ||
---|---|---|
117 | 117 |
|
118 | 118 |
public void resetCubits() |
119 | 119 |
{ |
120 |
if( mTouchedIndex1>=0 ) mTouchControl.markCubit(mTouchedIndex1, BandagedCreatorRenderer.COLOR_DEFAULT);
|
|
121 |
if( mTouchedIndex2>=0 ) mTouchControl.markCubit(mTouchedIndex2, BandagedCreatorRenderer.COLOR_DEFAULT);
|
|
120 |
if( mTouchedIndex1>=0 ) mRenderer.untouchCubit(mTouchedIndex1);
|
|
121 |
if( mTouchedIndex2>=0 ) mRenderer.untouchCubit(mTouchedIndex2);
|
|
122 | 122 |
|
123 | 123 |
mTouchedIndex1 = -1; |
124 | 124 |
mTouchedIndex2 = -1; |
... | ... | |
164 | 164 |
if( mTouchedIndex1<0 ) |
165 | 165 |
{ |
166 | 166 |
mTouchedIndex1 = index; |
167 |
mTouchControl.markCubit(mTouchedIndex1, BandagedCreatorRenderer.COLOR_MARKED);
|
|
167 |
mRenderer.touchCubit(mTouchedIndex1);
|
|
168 | 168 |
} |
169 | 169 |
else |
170 | 170 |
{ |
... | ... | |
172 | 172 |
|
173 | 173 |
if( mTouchedIndex1 != index ) |
174 | 174 |
{ |
175 |
mTouchControl.markCubit(mTouchedIndex2, BandagedCreatorRenderer.COLOR_MARKED);
|
|
175 |
mRenderer.touchCubit(mTouchedIndex2);
|
|
176 | 176 |
} |
177 | 177 |
} |
178 | 178 |
} |
... | ... | |
208 | 208 |
|
209 | 209 |
case MotionEvent.ACTION_UP : if( mTouchedIndex2>=0 ) |
210 | 210 |
{ |
211 |
mTouchControl.markCubit(mTouchedIndex1, BandagedCreatorRenderer.COLOR_DEFAULT); |
|
212 |
mTouchControl.markCubit(mTouchedIndex2, BandagedCreatorRenderer.COLOR_DEFAULT); |
|
213 |
|
|
211 |
mRenderer.untouchCubit(mTouchedIndex1); |
|
212 |
mRenderer.untouchCubit(mTouchedIndex2); |
|
214 | 213 |
mRenderer.tryConnectingCubits(mTouchedIndex1,mTouchedIndex2); |
215 |
|
|
216 | 214 |
mTouchedIndex1 = -1; |
217 | 215 |
mTouchedIndex2 = -1; |
218 | 216 |
} |
Also available in: Unified diff
Minor.