I took the DragAndDrop test from the libGDX tests and got it to work. I then put the source inside a table, and the table inside a scrollpane. Now it's broke. The source inside just a table works, but not the source in a table in a scrollpane. Anythoughts on how to make this work? I have an inventory screen which is too big to fit w/o a scroll pane.
- Code: Select all
stage = new Stage();
Gdx.input.setInputProcessor(stage);
//final Skin skin = new Skin();
//skin.add("default", new LabelStyle(new BitmapFont(), Color.WHITE));
skin = new Skin(Gdx.files.internal("data/uiskin.json"));
skin.add("badlogic", new Texture("data/badlogic.jpg"));
Table table=new Table();
ScrollPane pane=new ScrollPane(table);
pane.setScrollingDisabled(false, false);
Image sourceImage = new Image(skin, "badlogic");
sourceImage.setBounds(50, 125, 100, 100);
stage.addActor(pane);
//stage.addActor(sourceImage);