Example usage for com.badlogic.gdx.utils OrderedMap OrderedMap

List of usage examples for com.badlogic.gdx.utils OrderedMap OrderedMap

Introduction

In this page you can find the example usage for com.badlogic.gdx.utils OrderedMap OrderedMap.

Prototype

public OrderedMap() 

Source Link

Usage

From source file:com.ray3k.skincomposer.data.JsonData.java

License:Open Source License

private void initializeClassStyleMap() {
    classStyleMap = new OrderedMap();
    for (Class clazz : Main.BASIC_CLASSES) {
        Array<StyleData> array = new Array<>();
        classStyleMap.put(clazz, array);
        if (clazz.equals(Slider.class) || clazz.equals(ProgressBar.class) || clazz.equals(SplitPane.class)) {
            StyleData data = new StyleData(clazz, "default-horizontal", main);
            data.jsonData = this;
            data.deletable = false;/*w w  w .  jav  a  2  s  .co  m*/
            array.add(data);
            data = new StyleData(clazz, "default-vertical", main);
            data.jsonData = this;
            data.deletable = false;
            array.add(data);
        } else {
            StyleData data = new StyleData(clazz, "default", main);
            data.jsonData = this;
            data.deletable = false;
            array.add(data);
        }
    }
}

From source file:com.ray3k.skincomposer.data.JsonData.java

License:Open Source License

@Override
public void read(Json json, JsonValue jsonData) {
    try {//  w  ww .  jav a  2s . c  o  m
        colors = json.readValue("colors", Array.class, jsonData);
        fonts = json.readValue("fonts", Array.class, jsonData);
        classStyleMap = new OrderedMap<>();
        for (JsonValue data : jsonData.get("classStyleMap").iterator()) {
            classStyleMap.put(ClassReflection.forName(data.name), json.readValue(Array.class, data));
        }
        for (Array<StyleData> styleDatas : classStyleMap.values()) {
            for (StyleData styleData : styleDatas) {
                styleData.jsonData = this;
            }
        }
    } catch (ReflectionException e) {
        Gdx.app.log(getClass().getName(), "Error parsing json data during file read", e);
        main.getDialogFactory().showDialogError("Error while reading file...",
                "Error while attempting to read save file.\nPlease ensure that file is not corrupted.\n\nOpen error log?");
    }
}

From source file:com.ray3k.skincomposer.data.StyleData.java

License:Open Source License

public StyleData(StyleData styleData, String styleName, Main main) {
    name = styleName;// w  ww.j  a va2  s .c  om
    this.main = main;

    clazz = styleData.clazz;
    properties = new OrderedMap<>();
    for (Entry<String, StyleProperty> entry : styleData.properties.entries()) {
        properties.put(entry.key, new StyleProperty(entry.value));
    }
    deletable = true;
}

From source file:com.ray3k.skincomposer.data.StyleData.java

License:Open Source License

public StyleData(Class clazz, String styleName, Main main) {
    name = styleName;//from w  w w. j  a  v  a 2  s.  c o  m
    this.main = main;

    this.clazz = clazz;
    properties = new OrderedMap<>();
    deletable = true;

    resetProperties();
}

From source file:com.tnf.ptm.handler.dra.DraMan.java

License:Apache License

public DraMan(GameDrawer drawer) {
    myDlVals = DraLevel.values();//from ww w  .j a  va 2s  .  co  m
    myDrawer = drawer;
    myDras = new ArrayList<>();
    for (int i = 0, sz = myDlVals.length; i < sz; i++) {
        myDras.add(new OrderedMap<>());
    }
    myInCam = new HashSet<Dra>();
}

From source file:it.alcacoop.backgammon.utils.JSONProperties.java

License:Open Source License

public JSONProperties() {
    data = new OrderedMap<String, Object>();
}

From source file:me.scarlet.undertailor.engine.scheduler.Scheduler.java

License:Open Source License

public Scheduler(Environment env) {
    this.env = env;
    this.destroyed = false;
    this.tasks = new LongMap<>();
    this.activeTasks = new OrderedMap<>();
}

From source file:me.scarlet.undertailor.engine.ui.UIController.java

License:Open Source License

public UIController(Environment parent, MultiRenderer renderer) {
    this.destroyed = false;
    this.renderer = renderer;
    this.environment = parent;
    this.removed = new ObjectSet<>();
    this.events = new EventHelper(this);
    this.camera = new OrthographicCamera(OverworldController.RENDER_WIDTH, OverworldController.RENDER_HEIGHT);
    this.camera.position.x += OverworldController.RENDER_WIDTH / 2F;
    this.camera.position.y += OverworldController.RENDER_HEIGHT / 2F;
    this.camera.update();

    this.aObj = new OrderedMap<>();
    this.bObj = new OrderedMap<>();
}

From source file:me.scarlet.undertailor.gfx.text.Text.java

License:Open Source License

private Text() {
    this.components = new OrderedMap<>();

    this.instantiationTime = TimeUtils.millis();
    this.stringBounds = new Pair<>(0, 0);
    this.spaceTaken = new Pair<>(-1F, -1F);
    this.transform = new Transform();

    this.m_valuePair = new Pair<>();
    this.m_drawnTransform = new Transform();
}

From source file:org.destinationsol.game.dra.DraMan.java

License:Apache License

public DraMan(GameDrawer drawer) {
    myDlVals = DraLevel.values();//w  w  w. jav  a  2 s . com
    myDrawer = drawer;
    myDras = new ArrayList<OrderedMap<Texture, List<Dra>>>();
    for (int i = 0, sz = myDlVals.length; i < sz; i++) {
        myDras.add(new OrderedMap<Texture, List<Dra>>());
    }
    myInCam = new HashSet<Dra>();
}