Search in sources :

Example 36 with Sprite

use of com.badlogic.gdx.graphics.g2d.Sprite in project libgdx-inGameConsole by StrongJoshua.

the class Box2DTest method create.

@Override
public void create() {
    float w = Gdx.graphics.getWidth();
    w *= 2;
    float h = Gdx.graphics.getHeight();
    h *= 2;
    ratio = h / w;
    Gdx.app.getGraphics().setWindowedMode((int) w, (int) h);
    mX = (float) WIDTH / w;
    mY = (float) HEIGHT / h;
    Box2D.init();
    world = new World(new Vector2(0, -9.81f), true);
    batch = new SpriteBatch();
    sprites = new Sprite[250];
    bodies = new Body[sprites.length];
    float k, j;
    for (int i = 0; i < sprites.length; i++) {
        if (i < 50) {
            k = 0;
            j = 1;
        } else if (i < 100) {
            k = 50 * sprites[i - 1].getWidth() + sprites[i - 1].getWidth() / 2;
            j = 2;
        } else if (i < 150) {
            k = 100 * sprites[i - 1].getWidth() + sprites[i - 1].getWidth() / 2;
            j = 3;
        } else if (i < 200) {
            k = 150 * sprites[i - 1].getWidth() + sprites[i - 1].getWidth() / 2;
            j = 4;
        } else {
            k = 200 * sprites[i - 1].getWidth() + sprites[i - 1].getWidth() / 2;
            j = 5;
        }
        sprites[i] = new Sprite(new Texture(Gdx.files.classpath("tests/badlogic.jpg")));
        sprites[i].setSize(2, 2);
        sprites[i].setOriginCenter();
        BodyDef bdef = new BodyDef();
        bdef.type = BodyDef.BodyType.DynamicBody;
        bdef.position.set(i * sprites[i].getWidth() + sprites[i].getWidth() / 2 - k, 15 * j);
        bodies[i] = world.createBody(bdef);
        PolygonShape poly = new PolygonShape();
        poly.setAsBox(sprites[i].getWidth() / 2, sprites[i].getHeight() / 2);
        FixtureDef fdef = new FixtureDef();
        fdef.shape = poly;
        fdef.restitution = .2f;
        fdef.density = 1f;
        bodies[i].createFixture(fdef);
        poly.dispose();
    }
    BodyDef bdef = new BodyDef();
    bdef.type = BodyDef.BodyType.StaticBody;
    bdef.position.set(WIDTH / 2, -5);
    Body b = world.createBody(bdef);
    PolygonShape poly = new PolygonShape();
    poly.setAsBox(50, 5);
    b.createFixture(poly, 0);
    bdef = new BodyDef();
    bdef.type = BodyDef.BodyType.StaticBody;
    bdef.position.set(-5, HEIGHT / 2);
    b = world.createBody(bdef);
    poly = new PolygonShape();
    poly.setAsBox(5, 50);
    b.createFixture(poly, 0);
    bdef = new BodyDef();
    bdef.type = BodyDef.BodyType.StaticBody;
    bdef.position.set(WIDTH + 5, (HEIGHT * ratio) / 2);
    b = world.createBody(bdef);
    poly = new PolygonShape();
    poly.setAsBox(5, 50);
    b.createFixture(poly, 0);
    bdef = new BodyDef();
    bdef.type = BodyDef.BodyType.StaticBody;
    bdef.position.set(WIDTH / 2, HEIGHT * ratio + 5);
    b = world.createBody(bdef);
    poly = new PolygonShape();
    poly.setAsBox(50, 5);
    b.createFixture(poly, 0);
    poly.dispose();
    c = new OrthographicCamera(WIDTH, HEIGHT * ratio);
    c.position.set(c.viewportWidth / 2, c.viewportHeight / 2, 0);
    c.update();
    batch.setProjectionMatrix(c.combined);
    debugRenderer = new Box2DDebugRenderer();
    console = new GUIConsole(false);
    cExec = new MyCommandExecutor();
    console.setCommandExecutor(cExec);
    // set to 'Z' to demonstrate that it works with binds other than the
    // default
    console.setDisplayKeyID(Input.Keys.Z);
    console.setVisible(true);
    // test multiple resets with nested multiplexers
    InputMultiplexer im1 = new InputMultiplexer();
    im1.addProcessor(new Stage());
    im1.addProcessor(new Stage());
    InputMultiplexer im2 = new InputMultiplexer();
    im2.addProcessor(new Stage());
    im2.addProcessor(new Stage());
    im1.addProcessor(im2);
    Gdx.input.setInputProcessor(im1);
    console.setMaxEntries(16);
    console.resetInputProcessing();
    // console already present, logged to consoles
    console.resetInputProcessing();
    console.setSizePercent(100, 33);
    console.setPositionPercent(0, 67);
}
Also used : GUIConsole(com.strongjoshua.console.GUIConsole) PolygonShape(com.badlogic.gdx.physics.box2d.PolygonShape) Sprite(com.badlogic.gdx.graphics.g2d.Sprite) OrthographicCamera(com.badlogic.gdx.graphics.OrthographicCamera) World(com.badlogic.gdx.physics.box2d.World) SpriteBatch(com.badlogic.gdx.graphics.g2d.SpriteBatch) Texture(com.badlogic.gdx.graphics.Texture) InputMultiplexer(com.badlogic.gdx.InputMultiplexer) Box2DDebugRenderer(com.badlogic.gdx.physics.box2d.Box2DDebugRenderer) Vector2(com.badlogic.gdx.math.Vector2) Stage(com.badlogic.gdx.scenes.scene2d.Stage) BodyDef(com.badlogic.gdx.physics.box2d.BodyDef) Body(com.badlogic.gdx.physics.box2d.Body) FixtureDef(com.badlogic.gdx.physics.box2d.FixtureDef)

Example 37 with Sprite

use of com.badlogic.gdx.graphics.g2d.Sprite in project Entitas-Java by Rubentxu.

the class MenuState method init.

@Override
public void init() {
    Gdx.app.log("Menu", "Init");
    int pad = (int) (20 * SMGUIManager.ScaleUtil.getSizeRatio());
    int pad2 = (int) (60 * SMGUIManager.ScaleUtil.getSizeRatio());
    final TextButton btnStart = new TextButton("Comenzar", skin);
    btnStart.pad(pad, pad2, pad, pad2);
    final TextButton btnOptions = new TextButton("Opciones", skin);
    btnOptions.pad(pad, pad2, pad, pad2);
    final TextButton btnScores = new TextButton("Puntuaciones", skin);
    btnScores.pad(pad, pad2, pad, pad2);
    final TextButton button3 = new TextButton("Creditos", skin);
    button3.pad(pad, pad2, pad, pad2);
    button3.setChecked(false);
    btnStart.addListener(new ClickListener() {

        public void clicked(InputEvent event, float x, float y) {
            System.out.println("Click Comenzar...");
        }
    });
    btnOptions.addListener(new ClickListener() {

        public void clicked(InputEvent event, float x, float y) {
            System.out.println("Click optionScreen...");
            SMGame.ebus.post((ChangeStateCommand<SMGame>) (nameState, game) -> game.changeState(game.getOptionState(), game.getFadeTransition()));
        }
    });
    btnScores.addListener(new ClickListener() {

        public void clicked(InputEvent event, float x, float y) {
            System.out.println("Click highScoreScreen...");
            SMGame.ebus.post((ChangeStateCommand<SMGame>) (nameState, game) -> game.changeState(game.getScoresState(), game.getSlideTransition()));
        }
    });
    Label label = new Label("SUPER MARIANO", skin, "header", Color.CYAN);
    label.setAlignment(Align.center, Align.center);
    mainTable.defaults().padBottom(pad);
    if (Gdx.graphics.getHeight() < 480)
        mainTable.defaults().height(Gdx.graphics.getHeight() / 5f - pad);
    mainTable.add(label);
    mainTable.row();
    mainTable.add(btnStart);
    mainTable.row();
    mainTable.add(btnOptions);
    mainTable.row();
    mainTable.add(btnScores);
    mainTable.row();
    mainTable.add(button3);
    mainTable.row();
    mainTable.setBackground(new SpriteDrawable(new Sprite((Texture) assetsManager.getTexture(SMGUIManager.MENU_BACKGROUND))));
    mainTable.row();
}
Also used : TextButton(com.badlogic.gdx.scenes.scene2d.ui.TextButton) SpriteDrawable(com.badlogic.gdx.scenes.scene2d.utils.SpriteDrawable) Sprite(com.badlogic.gdx.graphics.g2d.Sprite) ChangeStateCommand(com.ilargia.games.entitas.egdx.api.ChangeStateCommand) Label(com.badlogic.gdx.scenes.scene2d.ui.Label) InputEvent(com.badlogic.gdx.scenes.scene2d.InputEvent) ClickListener(com.badlogic.gdx.scenes.scene2d.utils.ClickListener)

Example 38 with Sprite

use of com.badlogic.gdx.graphics.g2d.Sprite in project gdx-skineditor by cobolfoo.

the class OptionsPane method updateTableFields.

/**
	 * 
	 */
private void updateTableFields(final String style) {
    ImageButton button = (ImageButton) game.screenMain.barWidgets.group.getChecked();
    String widget = button.getUserObject().toString();
    Gdx.app.log("OptionsPane", "Update fields table for widget: " + widget + ", style: " + style);
    tableFields.clear();
    tableFields.add(new Label("Name", game.skin, "title")).left().width(170);
    tableFields.add(new Label("Value", game.skin, "title")).left().width(60).padRight(50);
    tableFields.row();
    Field[] fields = ClassReflection.getFields(currentStyle.getClass());
    for (final Field field : fields) {
        try {
            // Grey optional
            if (game.opt.isFieldOptional(currentStyle.getClass(), field.getName())) {
                tableFields.add(new Label(field.getName(), game.skin, "optional")).left();
            } else {
                tableFields.add(new Label(field.getName(), game.skin, "default")).left();
            }
            Actor actor;
            // field type
            String name = field.getType().getSimpleName();
            Object obj = field.get(currentStyle);
            if (name.equals("Drawable")) {
                /**
					 * Handle Drawable object
					 */
                Drawable drawable = (Drawable) field.get(currentStyle);
                String resourceName = "";
                ImageTextButton.ImageTextButtonStyle buttonStyle = new ImageTextButton.ImageTextButtonStyle(game.skin.getDrawable("default-round"), game.skin.getDrawable("default-round-down"), game.skin.getDrawable("default-round"), game.skin.getFont("default-font"));
                if (drawable != null) {
                    resourceName = game.skinProject.resolveObjectName(Drawable.class, drawable);
                    buttonStyle.imageUp = drawable;
                } else {
                    buttonStyle.up = game.skinProject.getDrawable("default-rect");
                    buttonStyle.checked = game.skinProject.getDrawable("default-rect");
                }
                actor = new ImageTextButton(resourceName, buttonStyle);
                ((ImageTextButton) actor).setClip(true);
                actor.addListener(new ChangeListener() {

                    @Override
                    public void changed(ChangeEvent event, Actor actor) {
                        showDrawableDialog(field);
                    }
                });
            } else if (name.equals("Color")) {
                /**
					 * Handle Color object
					 */
                Color color = (Color) field.get(currentStyle);
                ImageTextButton.ImageTextButtonStyle buttonStyle = new ImageTextButton.ImageTextButtonStyle(game.skin.getDrawable("default-round"), game.skin.getDrawable("default-round-down"), game.skin.getDrawable("default-round"), game.skin.getFont("default-font"));
                String resourceName = "";
                if (color != null) {
                    resourceName = game.skinProject.resolveObjectName(Color.class, color);
                    resourceName += " (" + color.toString() + ")";
                    // Create drawable on the fly
                    Pixmap pixmap = new Pixmap(18, 18, Pixmap.Format.RGBA8888);
                    pixmap.setColor(color);
                    pixmap.fill();
                    pixmap.setColor(Color.BLACK);
                    pixmap.drawRectangle(0, 0, 18, 18);
                    Texture texture = new Texture(pixmap);
                    buttonStyle.imageUp = new SpriteDrawable(new Sprite(texture));
                    pixmap.dispose();
                } else {
                    buttonStyle.up = game.skinProject.getDrawable("default-rect");
                    buttonStyle.checked = game.skinProject.getDrawable("default-rect");
                }
                actor = new ImageTextButton(resourceName, buttonStyle);
                ((ImageTextButton) actor).setClip(true);
                actor.addListener(new ChangeListener() {

                    @Override
                    public void changed(ChangeEvent event, Actor actor) {
                        showColorPickerDialog(field);
                    }
                });
            } else if (name.equals("BitmapFont")) {
                /**
					 * Handle BitmapFont object
					 */
                BitmapFont font = (BitmapFont) field.get(currentStyle);
                String resourceName = "";
                ImageTextButton.ImageTextButtonStyle buttonStyle = new ImageTextButton.ImageTextButtonStyle(game.skin.getDrawable("default-round"), game.skin.getDrawable("default-round-down"), game.skin.getDrawable("default-round"), game.skin.getFont("default-font"));
                if (font != null) {
                    resourceName = game.skinProject.resolveObjectName(BitmapFont.class, font);
                    buttonStyle.font = font;
                } else {
                    buttonStyle.up = game.skinProject.getDrawable("default-rect");
                    buttonStyle.checked = game.skinProject.getDrawable("default-rect");
                }
                actor = new ImageTextButton(resourceName, buttonStyle);
                ((ImageTextButton) actor).setClip(true);
                actor.addListener(new ChangeListener() {

                    @Override
                    public void changed(ChangeEvent event, Actor actor) {
                        showFontPickerDialog(field);
                    }
                });
            } else if (name.equals("float")) {
                /**
					 * Handle Float object
					 */
                Float value = (Float) field.get(currentStyle);
                String resourceName = "";
                ImageTextButton.ImageTextButtonStyle buttonStyle = new ImageTextButton.ImageTextButtonStyle(game.skin.getDrawable("default-round"), game.skin.getDrawable("default-round-down"), game.skin.getDrawable("default-round"), game.skin.getFont("default-font"));
                if ((value != null) && (value != 0)) {
                    resourceName = String.valueOf(value);
                } else {
                    buttonStyle.up = game.skinProject.getDrawable("default-rect");
                    buttonStyle.checked = game.skinProject.getDrawable("default-rect");
                }
                actor = new ImageTextButton(resourceName, buttonStyle);
                ((ImageTextButton) actor).setClip(true);
                actor.addListener(new ChangeListener() {

                    @Override
                    public void changed(ChangeEvent event, Actor actor) {
                        showFloatInputDialog(field);
                    }
                });
            } else if (name.equals("ListStyle")) {
                /**
					 * Handle ListStyle object
					 */
                ListStyle listStyle = (ListStyle) field.get(currentStyle);
                actor = new SelectBox<String>(game.skin, "default");
                Array<String> items = new Array<String>();
                final ObjectMap<String, ListStyle> values = game.skinProject.getAll(ListStyle.class);
                Iterator<String> it = values.keys().iterator();
                String selection = null;
                while (it.hasNext()) {
                    String key = it.next();
                    items.add(key);
                    if (listStyle == values.get(key)) {
                        selection = key;
                    }
                }
                ((SelectBox) actor).setItems(items);
                if (selection != null) {
                    ((SelectBox) actor).setSelected(selection);
                }
                actor.addListener(new ChangeListener() {

                    @Override
                    public void changed(ChangeEvent event, Actor actor) {
                        String selection = (String) ((SelectBox) actor).getSelected();
                        try {
                            field.set(currentStyle, values.get(selection));
                        } catch (Exception e) {
                            e.printStackTrace();
                        }
                        game.screenMain.saveToSkin();
                        refresh();
                        game.screenMain.paneOptions.updateSelectedTableFields();
                        game.screenMain.panePreview.refresh();
                    }
                });
            } else if (name.equals("ScrollPaneStyle")) {
                /**
					 * Handle ListStyle object
					 */
                ScrollPaneStyle scrollStyle = (ScrollPaneStyle) field.get(currentStyle);
                actor = new SelectBox<String>(game.skin, "default");
                Array<String> items = new Array<String>();
                final ObjectMap<String, ScrollPaneStyle> values = game.skinProject.getAll(ScrollPaneStyle.class);
                Iterator<String> it = values.keys().iterator();
                String selection = null;
                while (it.hasNext()) {
                    String key = it.next();
                    items.add(key);
                    if (scrollStyle == values.get(key)) {
                        selection = key;
                    }
                }
                ((SelectBox) actor).setItems(items);
                if (selection != null) {
                    ((SelectBox) actor).setSelected(selection);
                }
                actor.addListener(new ChangeListener() {

                    @Override
                    public void changed(ChangeEvent event, Actor actor) {
                        String selection = (String) ((SelectBox) actor).getSelected();
                        try {
                            field.set(currentStyle, values.get(selection));
                        } catch (Exception e) {
                            e.printStackTrace();
                        }
                        game.screenMain.saveToSkin();
                        refresh();
                        game.screenMain.paneOptions.updateSelectedTableFields();
                        game.screenMain.panePreview.refresh();
                    }
                });
            } else {
                Gdx.app.log("OptionsPane", "Unknown type: " + name);
                actor = new Label("Unknown Type", game.skin);
            }
            tableFields.add(actor).left().height(32).padRight(24).expandX().fillX();
            tableFields.row();
        } catch (Exception e) {
            e.printStackTrace();
        }
    }
}
Also used : ListStyle(com.badlogic.gdx.scenes.scene2d.ui.List.ListStyle) ImageTextButton(com.badlogic.gdx.scenes.scene2d.ui.ImageTextButton) Label(com.badlogic.gdx.scenes.scene2d.ui.Label) Texture(com.badlogic.gdx.graphics.Texture) TextField(com.badlogic.gdx.scenes.scene2d.ui.TextField) Field(com.badlogic.gdx.utils.reflect.Field) ImageButton(com.badlogic.gdx.scenes.scene2d.ui.ImageButton) ObjectMap(com.badlogic.gdx.utils.ObjectMap) Actor(com.badlogic.gdx.scenes.scene2d.Actor) Iterator(java.util.Iterator) ChangeListener(com.badlogic.gdx.scenes.scene2d.utils.ChangeListener) BitmapFont(com.badlogic.gdx.graphics.g2d.BitmapFont) SpriteDrawable(com.badlogic.gdx.scenes.scene2d.utils.SpriteDrawable) Sprite(com.badlogic.gdx.graphics.g2d.Sprite) SelectBox(com.badlogic.gdx.scenes.scene2d.ui.SelectBox) Color(com.badlogic.gdx.graphics.Color) Drawable(com.badlogic.gdx.scenes.scene2d.utils.Drawable) SpriteDrawable(com.badlogic.gdx.scenes.scene2d.utils.SpriteDrawable) Array(com.badlogic.gdx.utils.Array) Pixmap(com.badlogic.gdx.graphics.Pixmap) ScrollPaneStyle(com.badlogic.gdx.scenes.scene2d.ui.ScrollPane.ScrollPaneStyle)

Example 39 with Sprite

use of com.badlogic.gdx.graphics.g2d.Sprite in project gdx-skineditor by cobolfoo.

the class DrawablePickerDialog method updateTable.

/**
	 * 
	 */
public void updateTable() {
    tableDrawables.clear();
    Iterator<String> keys = items.keys().iterator();
    int count = 0;
    while (keys.hasNext()) {
        final String key = keys.next();
        if (key.startsWith("widgets/")) {
            continue;
        }
        Button buttonItem = new Button(game.skin);
        Image img = null;
        if (items.get(key) instanceof Drawable) {
            img = new Image((Drawable) items.get(key));
        } else {
            img = new Image((TextureRegion) items.get(key));
        }
        if (zoom == true) {
            buttonItem.add(img).expand().fill().pad(5);
        } else {
            buttonItem.add(img).expand().pad(5);
        }
        buttonItem.addListener(new ChangeListener() {

            @Override
            public void changed(ChangeEvent event, Actor actor) {
                if (field == null) {
                    return;
                }
                try {
                    // game.screenMain.paneOptions.refreshSelection();
                    if (items.get(key) instanceof Drawable) {
                        field.set(game.screenMain.paneOptions.currentStyle, items.get(key));
                    } else {
                        boolean ninepatch = false;
                        FileHandle test = new FileHandle("projects/" + game.screenMain.getcurrentProject() + "/assets/" + key + ".9.png");
                        if (test.exists() == true) {
                            ninepatch = true;
                        }
                        if (ninepatch == true) {
                            game.skinProject.add(key, new NinePatchDrawable(new NinePatch((TextureRegion) items.get(key))));
                            field.set(game.screenMain.paneOptions.currentStyle, game.skinProject.getDrawable(key));
                        } else {
                            game.skinProject.add(key, new SpriteDrawable(new Sprite((TextureRegion) items.get(key))));
                            field.set(game.screenMain.paneOptions.currentStyle, game.skinProject.getDrawable(key));
                        }
                    }
                    game.screenMain.saveToSkin();
                    hide();
                    game.screenMain.panePreview.refresh();
                    game.screenMain.paneOptions.updateSelectedTableFields();
                } catch (Exception e) {
                    e.printStackTrace();
                }
            }
        });
        String objectType = items.get(key).getClass().getSimpleName();
        objectType = objectType.replace("Drawable", "");
        buttonItem.row();
        buttonItem.add(new Label(key, game.skin));
        buttonItem.row();
        buttonItem.add(new Label(objectType, game.skin, "title"));
        buttonItem.row();
        buttonItem.setClip(true);
        tableDrawables.add(buttonItem).width(160).height(184).pad(5);
        if (count == 4) {
            count = 0;
            tableDrawables.row();
            continue;
        }
        count++;
    }
}
Also used : SpriteDrawable(com.badlogic.gdx.scenes.scene2d.utils.SpriteDrawable) Sprite(com.badlogic.gdx.graphics.g2d.Sprite) FileHandle(com.badlogic.gdx.files.FileHandle) NinePatch(com.badlogic.gdx.graphics.g2d.NinePatch) Drawable(com.badlogic.gdx.scenes.scene2d.utils.Drawable) SpriteDrawable(com.badlogic.gdx.scenes.scene2d.utils.SpriteDrawable) NinePatchDrawable(com.badlogic.gdx.scenes.scene2d.utils.NinePatchDrawable) Label(com.badlogic.gdx.scenes.scene2d.ui.Label) Image(com.badlogic.gdx.scenes.scene2d.ui.Image) TextureRegion(com.badlogic.gdx.graphics.g2d.TextureRegion) ChangeEvent(com.badlogic.gdx.scenes.scene2d.utils.ChangeListener.ChangeEvent) TextButton(com.badlogic.gdx.scenes.scene2d.ui.TextButton) Button(com.badlogic.gdx.scenes.scene2d.ui.Button) ImageButton(com.badlogic.gdx.scenes.scene2d.ui.ImageButton) Actor(com.badlogic.gdx.scenes.scene2d.Actor) ChangeListener(com.badlogic.gdx.scenes.scene2d.utils.ChangeListener) NinePatchDrawable(com.badlogic.gdx.scenes.scene2d.utils.NinePatchDrawable)

Example 40 with Sprite

use of com.badlogic.gdx.graphics.g2d.Sprite in project gdx-skineditor by cobolfoo.

the class Skin method getSprite.

/**
	 * Returns a registered sprite. If no sprite is found but a region exists
	 * with the name, a sprite is created from the region and stored in the
	 * skin. If the region is an {@link AtlasRegion} then an {@link AtlasSprite}
	 * is used if the region has been whitespace stripped or packed rotated 90
	 * degrees.
	 */
public Sprite getSprite(String name) {
    Sprite sprite = optional(name, Sprite.class);
    if (sprite != null)
        return sprite;
    try {
        TextureRegion textureRegion = getRegion(name);
        if (textureRegion instanceof AtlasRegion) {
            AtlasRegion region = (AtlasRegion) textureRegion;
            if (region.rotate || region.packedWidth != region.originalWidth || region.packedHeight != region.originalHeight)
                sprite = new AtlasSprite(region);
        }
        if (sprite == null)
            sprite = new Sprite(textureRegion);
        add(name, sprite, NinePatch.class);
        return sprite;
    } catch (GdxRuntimeException ex) {
        throw new GdxRuntimeException("No NinePatch, TextureRegion, or Texture registered with name: " + name);
    }
}
Also used : GdxRuntimeException(com.badlogic.gdx.utils.GdxRuntimeException) TextureRegion(com.badlogic.gdx.graphics.g2d.TextureRegion) AtlasSprite(com.badlogic.gdx.graphics.g2d.TextureAtlas.AtlasSprite) Sprite(com.badlogic.gdx.graphics.g2d.Sprite) AtlasSprite(com.badlogic.gdx.graphics.g2d.TextureAtlas.AtlasSprite) AtlasRegion(com.badlogic.gdx.graphics.g2d.TextureAtlas.AtlasRegion)

Aggregations

Sprite (com.badlogic.gdx.graphics.g2d.Sprite)40 AtlasSprite (com.badlogic.gdx.graphics.g2d.TextureAtlas.AtlasSprite)19 Texture (com.badlogic.gdx.graphics.Texture)17 TextureRegion (com.badlogic.gdx.graphics.g2d.TextureRegion)13 SpriteBatch (com.badlogic.gdx.graphics.g2d.SpriteBatch)11 AtlasRegion (com.badlogic.gdx.graphics.g2d.TextureAtlas.AtlasRegion)10 BitmapFont (com.badlogic.gdx.graphics.g2d.BitmapFont)8 GdxRuntimeException (com.badlogic.gdx.utils.GdxRuntimeException)8 Test (org.junit.Test)8 SpriteDrawable (com.badlogic.gdx.scenes.scene2d.utils.SpriteDrawable)7 TextureAtlas (com.badlogic.gdx.graphics.g2d.TextureAtlas)6 Pixmap (com.badlogic.gdx.graphics.Pixmap)5 NinePatch (com.badlogic.gdx.graphics.g2d.NinePatch)4 Drawable (com.badlogic.gdx.scenes.scene2d.utils.Drawable)4 TextureRegionDrawable (com.badlogic.gdx.scenes.scene2d.utils.TextureRegionDrawable)4 InputAdapter (com.badlogic.gdx.InputAdapter)3 Matrix4 (com.badlogic.gdx.math.Matrix4)3 Vector2 (com.badlogic.gdx.math.Vector2)3 Label (com.badlogic.gdx.scenes.scene2d.ui.Label)3 NinePatchDrawable (com.badlogic.gdx.scenes.scene2d.utils.NinePatchDrawable)3