T
- The type of colors.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 |
Constructor and Description |
---|
GroupCombinedPanel()
Constructor that defer providing the backing panels.
|
GroupCombinedPanel(squidpony.panel.ISquidPanel<T> bg,
squidpony.panel.ISquidPanel<T> fg) |
Modifier and Type | Method and Description |
---|---|
protected void |
addActors() |
int |
cellHeight() |
int |
cellWidth() |
protected void |
checkBG() |
protected void |
checkFG() |
void |
fill(squidpony.panel.ICombinedPanel.What what,
T color) |
int |
getGridHeight() |
int |
getGridWidth() |
boolean |
hasActiveAnimations() |
void |
put(int x,
int y,
char c,
T background,
T foreground) |
void |
put(int x,
int y,
String s,
T background,
T foreground) |
void |
put(int x,
int y,
T background,
squidpony.panel.IColoredString<T> cs) |
void |
putBG(int x,
int y,
T color) |
void |
putBottomLeft(squidpony.panel.IColoredString<? extends T> string)
Writes
string at the bottom left. |
void |
putBottomRight(squidpony.panel.IColoredString<? extends T> string)
Writes
string at the bottom right. |
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<T> cs) |
void |
putFG(int x,
int y,
String string,
T foreground) |
void |
setColorCenter(squidpony.IColorCenter<T> icc) |
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, swapActor
addAction, 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, rotationChanged, 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, toFront
public GroupCombinedPanel(squidpony.panel.ISquidPanel<T> bg, squidpony.panel.ISquidPanel<T> fg)
bg
- The backing background panel. Typically a SquidPanel
.fg
- The backing foreground panel. Typically a SquidPanel
.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 final void setPanels(squidpony.panel.ISquidPanel<T> bg, squidpony.panel.ISquidPanel<T> fg)
bg
- Typically a SquidPanel
.fg
- Typically a SquidPanel
.IllegalStateException
- In various cases of errors regarding sizes of panels.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<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 put(int x, int y, char c, T background, T foreground)
put
in interface squidpony.panel.ICombinedPanel<T>
public void put(int x, int y, T background, squidpony.panel.IColoredString<T> cs)
put
in interface squidpony.panel.ICombinedPanel<T>
public void put(int x, int y, String s, T background, T foreground)
put
in interface squidpony.panel.ICombinedPanel<T>
public void putBottomRight(squidpony.panel.IColoredString<? extends T> string)
string
at the bottom right. If string
is wider
than this
, its end will be stripped.string
- public void putBottomLeft(squidpony.panel.IColoredString<? extends T> string)
string
at the bottom left. If string
is wider than
this
, its end will be stripped.string
- public void fill(squidpony.panel.ICombinedPanel.What what, T color)
fill
in interface squidpony.panel.ICombinedPanel<T>
public boolean hasActiveAnimations()
hasActiveAnimations
in interface squidpony.panel.ICombinedPanel<T>
public void setColorCenter(squidpony.IColorCenter<T> icc)
setColorCenter
in interface squidpony.panel.ICombinedPanel<T>
public int getGridWidth()
IllegalStateException
- If backers aren't set yet.public int getGridHeight()
IllegalStateException
- If backers aren't set yet.public int cellWidth()
public int cellHeight()
protected void addActors()
protected void checkFG()
protected void checkBG()
Copyright © 2012–2016. All rights reserved.