Guest User

Untitled

a guest
Jun 24th, 2018
93
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.85 KB | None | 0 0
  1. info.clear();
  2. NinePatch backgroundPatch = new NinePatch(ui.icons.findRegion("white"));
  3. backgroundPatch.setBlending(false);
  4. info.setBackground(backgroundPatch);
  5. Table textTable = new Table();
  6. Label label = new Label(text.getTitle(),  ui.skin.getResource("text", LabelStyle.class));
  7. label.setColor(0, 0, 0, 1);
  8. label.setWrap(true);
  9. textTable.add(label).expandX().fillX().spaceBottom(10);
  10. textTable.row();
  11.  
  12. String[] paragraphs = text.getText().split("\n\n");
  13. for(String paragraph: paragraphs) {
  14.     label = new Label(paragraph,  ui.skin.getResource("text", LabelStyle.class));
  15.     label.setColor(0, 0, 0, 1);
  16.     label.setWrap(true);
  17.     textTable.add(label).expandX().fillX().spaceBottom(10);
  18.     textTable.row();
  19. }
  20. textTable.pack();
  21. textTable.debug();
  22.  
  23. FlickScrollPane scroll = new FlickScrollPane(textTable);
  24. info.add(scroll).expand().fill().pad(60);  
  25. info.debug();
Add Comment
Please, Sign In to add comment