package net.alcuria.umbracraft.engine.windows;

import net.alcuria.umbracraft.editor.Drawables;

import com.badlogic.gdx.scenes.scene2d.Actor;
import com.badlogic.gdx.scenes.scene2d.ui.Cell;
import com.badlogic.gdx.scenes.scene2d.ui.Table;
import com.badlogic.gdx.scenes.scene2d.utils.TiledDrawable;

/** A table with the background set to the game's window styling. Use
 * {@link WindowTable#put(Actor)} to add things to the table.
 * @author Andrew Keturi */
public class WindowTable extends Table {

	private Table content;

	public WindowTable() {

		stack(new Table() {
			{
				add(new Table() {
					{
						setBackground(new TiledDrawable(Drawables.skin("ui/bg")));
					}
				}).expand().fill().pad(3);
			}
		}, new Table() {
			{
				setBackground(Drawables.ninePatch("ui/frame"));
				add(content = new Table()).expand().fill();
			}
		});

	}

	/** Equivalent to add, but puts the content in the correct spot.
	 * @param actor the actor to add to the table.
	 * @return a {@link Cell} */
	public <T extends Actor> Cell<T> put(T actor) {
		return content.add(actor);
	}
}

@@ -843,18 +843,90 @@
 %09%09%7D%0A%09%09%7D)
+.expand().fill();%0A%0A%09%7D%0A%0A%09public Cell%3C?%3E newLine() %7B%0A%09%09return content.row()
 ;
-%0A
 %0A%09%7D%0A%0A%09/*
@@ -1128,25 +1128,310 @@
 urn 
-content.add(actor
+put(actor, false);%0A%09%7D%0A%0A%09/** Equivalent to add, but puts the content in the correct spot.%0A%09 * @param actor the actor to add to the table.%0A%09 * @return a %7B@link Cell%7D */%0A%09public %3CT extends Actor%3E Cell%3CT%3E put(T actor, boolean expand) %7B%0A%09%09return content.add(actor).expand(expand, expand).fill(expand, expand
 );%0A%09

Add secondary expand helper to WindowTable