public class PlacableGUI
extends com.badlogic.gdx.scenes.scene2d.ui.WidgetGroup
Constructor and Description |
---|
PlacableGUI(com.badlogic.gdx.scenes.scene2d.Stage stage,
Selection selection,
boolean left) |
Modifier and Type | Method and Description |
---|---|
RenderBlock |
getBlock(Coordinate coord)
Get a new instance of a selected block.
|
AbstractEntity |
getEntity()
Trys returning a new instance of a selected entity class.
|
byte |
getId() |
PlaceMode |
getMode() |
byte |
getValue() |
void |
setBlock(CoreData block) |
void |
setEntity(java.lang.String name,
java.lang.Class<? extends AbstractEntity> entclass) |
void |
setId(byte id) |
void |
setMode(PlaceMode mode) |
void |
setValue(byte value) |
void |
update(Selection selection) |
childrenChanged, draw, getMaxHeight, getMaxWidth, getMinHeight, getMinWidth, getPrefHeight, getPrefWidth, invalidate, invalidateHierarchy, layout, needsLayout, pack, setFillParent, setLayoutEnabled, sizeChanged, validate
act, addActor, addActorAfter, addActorAt, addActorBefore, applyTransform, applyTransform, clear, clearChildren, computeTransform, debugAll, drawChildren, drawDebug, drawDebugChildren, findActor, getChildren, getCullingArea, hasChildren, hit, isTransform, localToDescendantCoordinates, removeActor, removeActor, resetTransform, resetTransform, setCullingArea, setDebug, setStage, setTransform, swapActor, swapActor, toString
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, 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, stageToLocalCoordinates, toBack, toFront
public PlacableGUI(com.badlogic.gdx.scenes.scene2d.Stage stage, Selection selection, boolean left)
stage
- parent stageselection
- the selection-Entity where the color comes fromleft
- left mouse button tool?public void update(Selection selection)
selection
- the selection entity of the editorpublic byte getId()
public byte getValue()
public void setBlock(CoreData block)
block
- public void setId(byte id)
id
- public void setValue(byte value)
value
- public RenderBlock getBlock(Coordinate coord)
coord
- the position of the block instancepublic AbstractEntity getEntity()
public void setEntity(java.lang.String name, java.lang.Class<? extends AbstractEntity> entclass)
name
- entclass
- public void setMode(PlaceMode mode)
mode
- public PlaceMode getMode()