Package com.prineside.tdi2.ui.actors
Class ItemCell
java.lang.Object
com.badlogic.gdx.scenes.scene2d.Actor
com.badlogic.gdx.scenes.scene2d.Group
com.prineside.tdi2.ui.actors.ItemCell
- All Implemented Interfaces:
com.badlogic.gdx.scenes.scene2d.utils.Cullable
public class ItemCell
extends com.badlogic.gdx.scenes.scene2d.Group
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final float
static final float
static final float
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
act
(float delta) Updates the actor based on time.void
draw
(com.badlogic.gdx.graphics.g2d.Batch batch, float parentAlpha) Draws the group and its children.int
getCount()
getItem()
boolean
void
reveal()
void
setColRow
(int colIdx, int rowIdx) Заменяет форму фона для ровной таблицы.void
void
setCornerText
(CharSequence text) void
setCount
(int count) void
setCovered
(boolean covered) void
setIconAndCount
(com.badlogic.gdx.scenes.scene2d.Actor icon, float iconScale, int count) void
void
void
setNoRarityBackground
(boolean noRarityBackground) void
setNotificationBubbleEnabled
(boolean enabled) void
setSelected
(boolean selected) void
shine
(boolean withParticles, boolean withOpaqueOverlay) Вызывать после setColRow и setItemvoid
showRays
(boolean visible) Methods inherited from class com.badlogic.gdx.scenes.scene2d.Group
addActor, addActorAfter, addActorAt, addActorBefore, clear, clear, clearChildren, clearChildren, debugAll, drawDebug, findActor, getChild, getChildren, getCullingArea, hasChildren, hit, isTransform, localToDescendantCoordinates, removeActor, removeActor, removeActorAt, setCullingArea, setDebug, setTransform, swapActor, swapActor, toString
Methods inherited from class com.badlogic.gdx.scenes.scene2d.Actor
addAction, addCaptureListener, addListener, ancestorsVisible, ascendantsVisible, clearActions, clearListeners, clipBegin, clipBegin, clipEnd, debug, fire, firstAscendant, 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, hasKeyboardFocus, hasParent, hasScrollFocus, isAscendantOf, isDescendantOf, isTouchable, isTouchFocusListener, isTouchFocusTarget, isVisible, localToActorCoordinates, localToAscendantCoordinates, localToParentCoordinates, localToScreenCoordinates, localToStageCoordinates, moveBy, notify, parentToLocalCoordinates, remove, removeAction, removeCaptureListener, removeListener, rotateBy, scaleBy, scaleBy, screenToLocalCoordinates, setBounds, setColor, setColor, setDebug, setHeight, setName, setOrigin, setOrigin, setOriginX, setOriginY, setPosition, setPosition, setRotation, setScale, setScale, setScaleX, setScaleY, setSize, setTouchable, setUserObject, setVisible, setWidth, setX, setX, setY, setY, setZIndex, sizeBy, sizeBy, stageToLocalCoordinates, toBack, toFront
-
Field Details
-
WIDTH
public static final float WIDTH- See Also:
-
HEIGHT
public static final float HEIGHT- See Also:
-
COMPACT_SIZE_COEFF
public static final float COMPACT_SIZE_COEFF- See Also:
-
-
Constructor Details
-
ItemCell
public ItemCell()
-
-
Method Details
-
act
public void act(float delta) Description copied from class:com.badlogic.gdx.scenes.scene2d.Actor
Updates the actor based on time. Typically this is called each frame byStage.act(float)
.The default implementation calls
Action.act(float)
on each action and removes actions that are complete.- Overrides:
act
in classcom.badlogic.gdx.scenes.scene2d.Group
- Parameters:
delta
- Time in seconds since the last frame.
-
draw
public void draw(com.badlogic.gdx.graphics.g2d.Batch batch, float parentAlpha) Description copied from class:com.badlogic.gdx.scenes.scene2d.Group
Draws the group and its children. The default implementation callsGroup.applyTransform(Batch, Matrix4)
if needed, thenGroup.drawChildren(Batch, float)
, thenGroup.resetTransform(Batch)
if needed.- Overrides:
draw
in classcom.badlogic.gdx.scenes.scene2d.Group
parentAlpha
- The parent alpha, to be multiplied with this actor's alpha, allowing the parent's alpha to affect all children.
-
showRays
public void showRays(boolean visible) -
setCornerText
-
setNotificationBubbleEnabled
public void setNotificationBubbleEnabled(boolean enabled) -
setNoRarityBackground
public void setNoRarityBackground(boolean noRarityBackground) -
setCompact
public void setCompact() -
isSelected
public boolean isSelected() -
setSelected
public void setSelected(boolean selected) -
setColRow
public void setColRow(int colIdx, int rowIdx) Заменяет форму фона для ровной таблицы. Индексы с 0 -
setCovered
public void setCovered(boolean covered) -
reveal
public void reveal() -
shine
public void shine(boolean withParticles, boolean withOpaqueOverlay) Вызывать после setColRow и setItem -
setIconAndCount
public void setIconAndCount(com.badlogic.gdx.scenes.scene2d.Actor icon, float iconScale, int count) -
setItem
-
setItem
-
getItem
-
setCount
public void setCount(int count) -
getCount
public int getCount()
-