Revision 9234018b
Added by Leszek Koltunski almost 2 years ago
src/main/java/org/distorted/bandaged/BandagedCreatorActivity.java | ||
---|---|---|
33 | 33 |
import org.distorted.library.main.DistortedLibrary; |
34 | 34 |
import org.distorted.main.R; |
35 | 35 |
import org.distorted.main.RubikActivity; |
36 |
import org.distorted.objectlib.main.InitAssets; |
|
36 | 37 |
import org.distorted.objectlib.main.TwistyJson; |
37 | 38 |
import org.distorted.objectlib.main.TwistyObject; |
38 | 39 |
|
... | ... | |
275 | 276 |
{ |
276 | 277 |
RubikFiles files = RubikFiles.getInstance(); |
277 | 278 |
InputStream jsonStream = files.openFile(this,name+"_object.json"); |
279 |
InitAssets assets = new InitAssets(jsonStream); |
|
278 | 280 |
|
279 |
if( jsonStream!=null )
|
|
281 |
if( !assets.noJsonStream() )
|
|
280 | 282 |
{ |
281 | 283 |
int meshState= TwistyObject.MESH_NICE; |
282 | 284 |
int iconMode = TwistyObject.MODE_NORM; |
283 | 285 |
SharedPreferences preferences = PreferenceManager.getDefaultSharedPreferences(this); |
284 | 286 |
SharedPreferences.Editor editor = preferences.edit(); |
285 |
TwistyObject object = new TwistyJson( jsonStream, meshState, iconMode, null, null, 1.0f, null);
|
|
287 |
TwistyObject object = new TwistyJson( meshState, iconMode, null, null, 1.0f, assets);
|
|
286 | 288 |
if( !object.getError() ) object.removePreferences(editor); |
287 | 289 |
editor.apply(); |
288 | 290 |
} |
Also available in: Unified diff
Minor