Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- info.clear();
- NinePatch backgroundPatch = new NinePatch(ui.icons.findRegion("white"));
- backgroundPatch.setBlending(false);
- info.setBackground(backgroundPatch);
- Table textTable = new Table();
- Label label = new Label(text.getTitle(), ui.skin.getResource("text", LabelStyle.class));
- label.setColor(0, 0, 0, 1);
- label.setWrap(true);
- textTable.add(label).expandX().fillX().spaceBottom(10);
- textTable.row();
- String[] paragraphs = text.getText().split("\n\n");
- for(String paragraph: paragraphs) {
- label = new Label(paragraph, ui.skin.getResource("text", LabelStyle.class));
- label.setColor(0, 0, 0, 1);
- label.setWrap(true);
- textTable.add(label).expandX().fillX().spaceBottom(10);
- textTable.row();
- }
- textTable.pack();
- textTable.debug();
- FlickScrollPane scroll = new FlickScrollPane(textTable);
- info.add(scroll).expand().fill().pad(60);
- info.debug();
Add Comment
Please, Sign In to add comment