List of usage examples for com.badlogic.gdx.scenes.scene2d.ui Table debugTable
public Table debugTable()
From source file:at.highstreeto.xnllayoutparser.element.TableParser.java
License:Apache License
@Override public Actor load(Element element, LayoutParserContext context) throws LayoutParseException { Table table = new Table(); if (element.getAttributes().containsKey("fillParent")) { table.setFillParent(element.getBooleanAttribute("fillParent")); }/*w w w . jav a 2 s. c o m*/ if (element.getAttributes().containsKey("debug")) { String[] parts = element.getAttribute("debug").split(" "); for (String i : parts) { if ("cell".equals(i)) { table.debugCell(); } else if ("table".equals(i)) { table.debugTable(); } } } // Combination of c (Center), t (Top), b (Bottom), l (Left), r (Right) if (element.getAttributes().containsKey("align")) { String[] parts = element.getAttribute("align").split(" "); for (String i : parts) { if ("c".equals(i)) { table.center(); } else if ("t".equals(i)) { table.top(); } else if ("b".equals(i)) { table.bottom(); } else if ("l".equals(i)) { table.left(); } else if ("r".equals(i)) { table.right(); } } } context.addActor(table, element); ElementParserHelper.setActorName(element, table); for (int i = 0; i < element.getChildCount(); i++) { Element child = element.getChild(i); context.getParsers().getParserByElementName(child).load(child, context); } return table; }