Rogue: Savage Rats, a retro-themed dungeon crawler
您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符
 
 
rogue-savage-rats/src/mightypork/gamecore/gui/components/layout/ColumnLayout.java

45 行
730 B

package mightypork.gamecore.gui.components.layout;
import mightypork.dynmath.rect.proxy.RectBound;
import mightypork.gamecore.core.modules.AppAccess;
import mightypork.gamecore.gui.components.Component;
public class ColumnLayout extends GridLayout {
private int col = 0;
public ColumnLayout(AppAccess app, int rows)
{
this(app, null, rows);
}
public ColumnLayout(AppAccess app, RectBound context, int cols)
{
super(app, context, 1, cols);
}
public void add(final Component elem)
{
add(elem, 1);
}
public void add(final Component elem, int colSpan)
{
if (elem == null) return;
put(elem, 0, col, 1, colSpan);
col += colSpan;
}
public void skip(int cols)
{
col += cols;
}
}