Example usage for com.badlogic.gdx.graphics.g2d TextureAtlas findRegion

List of usage examples for com.badlogic.gdx.graphics.g2d TextureAtlas findRegion

Introduction

In this page you can find the example usage for com.badlogic.gdx.graphics.g2d TextureAtlas findRegion.

Prototype

public AtlasRegion findRegion(String name, int index) 

Source Link

Document

Returns the first region found with the specified name and index.

Usage

From source file:net.mwplay.cocostudio.ui.CocoStudioUIEditor.java

License:Apache License

protected TextureRegion findRegion(String name, int index) {
    for (TextureAtlas ta : textureAtlas) {
        if (ta == null) {
            continue;
        }//from  w  w  w . j  av a2s .c  om
        TextureRegion tr = ta.findRegion(name, index);
        if (tr != null) {
            return tr;
        }
    }
    return null;
}