public class GroupCombinedPanel<T> extends com.badlogic.gdx.scenes.scene2d.Group implements squidpony.panel.ICombinedPanel<T>
ICombinedPanel that extends libGDX's Group.
If you're a new user or need only a foreground and background, it's
likely what you should use.
this is a concrete implementation of ICombinedPanel that you should
use if you're concretely in need of a panel to display/write to, without
doing fancy GUI stuff. Because it extends libGDX's Group, it
offers a lot of features.for a more advanced Group that supports multiple layers.| Modifier and Type | Field and Description |
|---|---|
protected squidpony.panel.ISquidPanel<T> |
bg |
protected squidpony.panel.ISquidPanel<T> |
fg |
protected int |
gridHeight
The height, in cell sizes
|
protected int |
gridWidth
The width, in cell sizes
|
| Constructor and Description |
|---|
GroupCombinedPanel()
Constructor that defer providing the backing panels.
|
GroupCombinedPanel(squidpony.panel.ISquidPanel<T> bg,
squidpony.panel.ISquidPanel<T> fg,
int gridWidth,
int gridHeight) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
addActors() |
protected void |
checkBG() |
protected void |
checkFG() |
void |
fillBG(T color) |
List<squidpony.panel.ISquidPanel<?>> |
getBackers() |
void |
put(int x,
int y,
char c,
T foreground,
T background) |
void |
put(int x,
int y,
squidpony.panel.IColoredString<? extends T> cs,
T background) |
void |
put(int x,
int y,
String s,
T foreground,
T background) |
void |
putBG(int x,
int y,
T color) |
void |
putFG(int x,
int y,
char c) |
void |
putFG(int x,
int y,
char c,
T color) |
void |
putFG(int x,
int y,
squidpony.panel.IColoredString<? extends T> cs) |
void |
putFG(int x,
int y,
String string,
T foreground) |
void |
refresh() |
void |
setPanels(squidpony.panel.ISquidPanel<T> bg,
squidpony.panel.ISquidPanel<T> fg)
Sets the backing panels.
|
String |
toString() |
act, addActor, addActorAfter, addActorAt, addActorBefore, applyTransform, applyTransform, childrenChanged, clear, clearChildren, computeTransform, debugAll, draw, drawChildren, drawDebug, drawDebugChildren, findActor, getChildren, getCullingArea, hasChildren, hit, isTransform, localToDescendantCoordinates, removeActor, removeActor, resetTransform, resetTransform, setCullingArea, setDebug, setStage, setTransform, swapActor, swapActoraddAction, addCaptureListener, addListener, clearActions, clearListeners, clipBegin, clipBegin, clipEnd, debug, drawDebugBounds, fire, getActions, getCaptureListeners, getColor, getDebug, getHeight, getListeners, getName, getOriginX, getOriginY, getParent, getRight, getRotation, getScaleX, getScaleY, getStage, getTop, getTouchable, getUserObject, getWidth, getX, getX, getY, getY, getZIndex, hasActions, hasParent, isAscendantOf, isDescendantOf, isTouchable, isVisible, localToAscendantCoordinates, localToParentCoordinates, localToStageCoordinates, moveBy, notify, parentToLocalCoordinates, positionChanged, remove, removeAction, removeCaptureListener, removeListener, rotateBy, scaleBy, scaleBy, screenToLocalCoordinates, setBounds, setColor, setColor, setDebug, setHeight, setName, setOrigin, setOrigin, setOriginX, setOriginY, setParent, setPosition, setPosition, setRotation, setScale, setScale, setScaleX, setScaleY, setSize, setTouchable, setUserObject, setVisible, setWidth, setX, setY, setZIndex, sizeBy, sizeBy, sizeChanged, stageToLocalCoordinates, toBack, toFrontprotected int gridWidth
protected int gridHeight
public GroupCombinedPanel(squidpony.panel.ISquidPanel<T> bg, squidpony.panel.ISquidPanel<T> fg, int gridWidth, int gridHeight)
bg - The backing background panel. Typically a SquidPanel from this package.fg - The backing foreground panel. Typically a SquidPanel from this package.gridWidth - The width of this panel, used for fillBG(Object)
(so that it fills within [0, width)).gridHeight - The height of this panel, used for fillBG(Object)
(so that it fills within [0, height)).IllegalStateException - In various cases of errors regarding sizes of panels.public GroupCombinedPanel()
setPanels(ISquidPanel, ISquidPanel) to set the panels
(required before calling any put method).
Width and height are computed using the provided panels.
public void setPanels(squidpony.panel.ISquidPanel<T> bg, squidpony.panel.ISquidPanel<T> fg)
bg - Typically a SquidPanel from this package.fg - Typically a SquidPanel from this package.public void putFG(int x, int y, char c)
putFG in interface squidpony.panel.ICombinedPanel<T>public void putFG(int x, int y, char c, T color)
putFG in interface squidpony.panel.ICombinedPanel<T>public void putFG(int x, int y, String string, T foreground)
putFG in interface squidpony.panel.ICombinedPanel<T>public void putFG(int x, int y, squidpony.panel.IColoredString<? extends T> cs)
putFG in interface squidpony.panel.ICombinedPanel<T>public void putBG(int x, int y, T color)
putBG in interface squidpony.panel.ICombinedPanel<T>public void fillBG(T color)
fillBG in interface squidpony.panel.ICombinedPanel<T>public List<squidpony.panel.ISquidPanel<?>> getBackers()
getBackers in interface squidpony.panel.ICombinedPanel<T>protected void addActors()
protected void checkFG()
protected void checkBG()
Copyright © 2012–2015. All rights reserved.