com.uwsoft.editor.renderer.data.ProjectInfoVO Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of overlap2d-runtime-libgdx Show documentation
Show all versions of overlap2d-runtime-libgdx Show documentation
overlap2d-runtime-libgdx provides functionality to load, manipulate and render scenes generated by Overlap2D.
The newest version!
package com.uwsoft.editor.renderer.data;
import java.util.ArrayList;
import java.util.Collections;
import java.util.Comparator;
import java.util.HashMap;
import com.badlogic.gdx.utils.Array;
import com.badlogic.gdx.utils.Json;
import com.badlogic.gdx.utils.JsonWriter.OutputType;
public class ProjectInfoVO {
public int pixelToWorld = 1;
public ResolutionEntryVO originalResolution = new ResolutionEntryVO();
public Array resolutions = new Array();
public ArrayList scenes = new ArrayList();
public HashMap libraryItems = new HashMap();
public String constructJsonString() {
String str = "";
Json json = new Json();
json.setOutputType(OutputType.json);
str = json.toJson(this);
json.prettyPrint(str);
return str;
}
public ResolutionEntryVO getResolution(String name) {
for (ResolutionEntryVO resolution : resolutions) {
if (resolution.name.equalsIgnoreCase(name)) {
return resolution;
}
}
return null;
}
}