Revision 09cf2a36
Added by Leszek Koltunski over 2 years ago
src/main/java/org/distorted/config/ConfigActivity.java | ||
---|---|---|
222 | 222 |
int jsonID = object.getJsonID(); |
223 | 223 |
int meshID = object.getMeshID(); |
224 | 224 |
|
225 |
int meshState = object.getMeshState(); |
|
226 |
|
|
225 | 227 |
InputStream jsonStream = ObjectJson.getStream(jsonID,this); |
226 | 228 |
InputStream meshStream = ObjectMesh.getStream(meshID,this); |
227 |
control.changeIfDifferent(object.getOrdinal(),jsonStream,meshStream); |
|
229 |
|
|
230 |
control.changeIfDifferent(object.getOrdinal(),meshState,jsonStream,meshStream); |
|
228 | 231 |
} |
229 | 232 |
} |
230 | 233 |
|
231 | 234 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
232 | 235 |
// PUBLIC API |
236 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
|
237 |
|
|
238 |
public void changeObject(RubikObject object) |
|
239 |
{ |
|
240 |
ConfigSurfaceView view = findViewById(R.id.configSurfaceView); |
|
241 |
ObjectControl control = view.getObjectControl(); |
|
242 |
changeIfDifferent(object,control); |
|
243 |
} |
|
244 |
|
|
245 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
|
246 |
|
|
247 |
public void changeMeshState(RubikObject object) |
|
248 |
{ |
|
249 |
if( object!=null ) |
|
250 |
{ |
|
251 |
ConfigSurfaceView view = findViewById(R.id.configSurfaceView); |
|
252 |
ObjectControl control = view.getObjectControl(); |
|
253 |
|
|
254 |
int jsonID = object.getJsonID(); |
|
255 |
int meshID = object.getMeshID(); |
|
256 |
|
|
257 |
int meshState = object.getMeshState(); |
|
258 |
|
|
259 |
InputStream jsonStream = ObjectJson.getStream(jsonID,this); |
|
260 |
InputStream meshStream = ObjectMesh.getStream(meshID,this); |
|
261 |
|
|
262 |
control.changeObject(object.getOrdinal(),meshState,jsonStream,meshStream); |
|
263 |
} |
|
264 |
} |
|
265 |
|
|
233 | 266 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
234 | 267 |
|
235 | 268 |
public FirebaseAnalytics getAnalytics() |
... | ... | |
308 | 341 |
ConfigSurfaceView view = findViewById(R.id.configSurfaceView); |
309 | 342 |
return view.isVertical(); |
310 | 343 |
} |
311 |
|
|
312 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
|
313 |
|
|
314 |
public void changeObject(RubikObject object) |
|
315 |
{ |
|
316 |
ConfigSurfaceView view = findViewById(R.id.configSurfaceView); |
|
317 |
ObjectControl control = view.getObjectControl(); |
|
318 |
changeIfDifferent(object,control); |
|
319 |
} |
|
320 | 344 |
} |
Also available in: Unified diff
Introduce 'Simple' and 'Nice' meshes.