You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
37 lines
688 B
37 lines
688 B
10 years ago
|
package mightypork.gamecore.gui.components.layout;
|
||
|
|
||
|
|
||
|
import mightypork.gamecore.gui.components.Component;
|
||
|
import mightypork.gamecore.gui.components.LayoutComponent;
|
||
|
import mightypork.utils.math.constraints.rect.RectBound;
|
||
|
|
||
|
|
||
|
/**
|
||
|
* Layout for components with arbitrary constraints.
|
||
|
*
|
||
|
* @author Ondřej Hruška (MightyPork)
|
||
|
*/
|
||
|
public class ConstraintLayout extends LayoutComponent {
|
||
|
|
||
|
public ConstraintLayout() {
|
||
|
}
|
||
|
|
||
|
|
||
|
public ConstraintLayout(RectBound context) {
|
||
|
super(context);
|
||
|
}
|
||
|
|
||
|
|
||
|
/**
|
||
|
* Add a component to the layout.<br>
|
||
|
* The component's rect must be set up manually.
|
||
|
*
|
||
|
* @param component
|
||
|
*/
|
||
|
public void add(Component component)
|
||
|
{
|
||
|
attach(component);
|
||
|
}
|
||
|
|
||
|
}
|