Package com.prineside.tdi2.ui.actors
Class ComplexButton
java.lang.Object
com.badlogic.gdx.scenes.scene2d.Actor
com.badlogic.gdx.scenes.scene2d.Group
com.prineside.tdi2.ui.actors.ComplexButton
- All Implemented Interfaces:
com.badlogic.gdx.scenes.scene2d.utils.Cullable
- Direct Known Subclasses:
RectButton
public class ComplexButton
extends com.badlogic.gdx.scenes.scene2d.Group
Кнопка, содержащая
- Изображение фона
- Значок
- Надпись
Можно изменять цвет фона / значка с надписью
-
Field Summary
FieldsModifier and TypeFieldDescriptionfinal com.badlogic.gdx.scenes.scene2d.ui.Image
final com.badlogic.gdx.scenes.scene2d.ui.Image
protected boolean
com.badlogic.gdx.scenes.scene2d.ui.Image
final com.badlogic.gdx.scenes.scene2d.ui.Image
final com.badlogic.gdx.scenes.scene2d.ui.Image
final com.badlogic.gdx.scenes.scene2d.ui.Label
final com.badlogic.gdx.scenes.scene2d.ui.Label
-
Constructor Summary
ConstructorsConstructorDescriptionComplexButton
(CharSequence text, com.badlogic.gdx.scenes.scene2d.ui.Label.LabelStyle labelStyle, Runnable clickHandler) ComplexButton
(CharSequence text, com.badlogic.gdx.scenes.scene2d.ui.Label.LabelStyle labelStyle, Runnable clickHandler, Runnable holdHandler) -
Method Summary
Modifier and TypeMethodDescriptionsetBackground
(com.badlogic.gdx.scenes.scene2d.utils.Drawable drawable, float x, float y, float width, float height) setBackgroundColors
(com.badlogic.gdx.graphics.Color normal, com.badlogic.gdx.graphics.Color active, com.badlogic.gdx.graphics.Color hover, com.badlogic.gdx.graphics.Color disabled) Любой цвет может быть nullvoid
setClickHandler
(Runnable runnable) setEnabled
(boolean enabled) void
setHoldHintIconBright
(boolean isBright) setIcon
(com.badlogic.gdx.scenes.scene2d.utils.Drawable drawable) setIcon
(com.badlogic.gdx.scenes.scene2d.utils.Drawable drawable, float x, float y, float width, float height) setIconColors
(com.badlogic.gdx.graphics.Color normal, com.badlogic.gdx.graphics.Color hover, com.badlogic.gdx.graphics.Color active, com.badlogic.gdx.graphics.Color disabled) setIconLabelColors
(com.badlogic.gdx.graphics.Color normal, com.badlogic.gdx.graphics.Color hover, com.badlogic.gdx.graphics.Color active, com.badlogic.gdx.graphics.Color disabled) Любой цвет может быть nullvoid
setIconLabelShadowEnabled
(boolean enabled) setLabel
(float x, float y, float width, float height, int align) setLabelColors
(com.badlogic.gdx.graphics.Color normal, com.badlogic.gdx.graphics.Color hover, com.badlogic.gdx.graphics.Color active, com.badlogic.gdx.graphics.Color disabled) void
setMuted
(boolean muted) setText
(int text) setText
(CharSequence text) Methods inherited from class com.badlogic.gdx.scenes.scene2d.Group
act, addActor, addActorAfter, addActorAt, addActorBefore, applyTransform, applyTransform, childrenChanged, clear, clear, clearChildren, clearChildren, computeTransform, debugAll, draw, drawChildren, drawDebug, drawDebugChildren, findActor, getChild, getChildren, getCullingArea, hasChildren, hit, isTransform, localToDescendantCoordinates, removeActor, removeActor, removeActorAt, resetTransform, resetTransform, setCullingArea, setDebug, setStage, 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, drawDebugBounds, 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, positionChanged, remove, removeAction, removeCaptureListener, removeListener, rotateBy, rotationChanged, scaleBy, scaleBy, scaleChanged, 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, setX, setY, setY, setZIndex, sizeBy, sizeBy, sizeChanged, stageToLocalCoordinates, toBack, toFront
-
Field Details
-
background
public final com.badlogic.gdx.scenes.scene2d.ui.Image background -
backgroundShadow
public final com.badlogic.gdx.scenes.scene2d.ui.Image backgroundShadow -
iconShadow
public final com.badlogic.gdx.scenes.scene2d.ui.Image iconShadow -
icon
public final com.badlogic.gdx.scenes.scene2d.ui.Image icon -
label
public final com.badlogic.gdx.scenes.scene2d.ui.Label label -
labelShadow
public final com.badlogic.gdx.scenes.scene2d.ui.Label labelShadow -
holdHintIcon
public com.badlogic.gdx.scenes.scene2d.ui.Image holdHintIcon -
customLabelPos
protected boolean customLabelPos
-
-
Constructor Details
-
ComplexButton
public ComplexButton(CharSequence text, com.badlogic.gdx.scenes.scene2d.ui.Label.LabelStyle labelStyle, Runnable clickHandler, Runnable holdHandler) -
ComplexButton
public ComplexButton(CharSequence text, com.badlogic.gdx.scenes.scene2d.ui.Label.LabelStyle labelStyle, Runnable clickHandler)
-
-
Method Details
-
setHoldHintIconBright
public void setHoldHintIconBright(boolean isBright) -
setMuted
public void setMuted(boolean muted) -
setClickHandler
-
setBackground
public ComplexButton setBackground(com.badlogic.gdx.scenes.scene2d.utils.Drawable drawable, float x, float y, float width, float height) -
setIcon
public ComplexButton setIcon(com.badlogic.gdx.scenes.scene2d.utils.Drawable drawable, float x, float y, float width, float height) -
setIcon
-
setText
-
setText
-
setLabel
-
setBackgroundColors
public ComplexButton setBackgroundColors(com.badlogic.gdx.graphics.Color normal, com.badlogic.gdx.graphics.Color active, com.badlogic.gdx.graphics.Color hover, com.badlogic.gdx.graphics.Color disabled) Любой цвет может быть null -
setIconLabelColors
public ComplexButton setIconLabelColors(com.badlogic.gdx.graphics.Color normal, com.badlogic.gdx.graphics.Color hover, com.badlogic.gdx.graphics.Color active, com.badlogic.gdx.graphics.Color disabled) Любой цвет может быть null -
setIconColors
public ComplexButton setIconColors(com.badlogic.gdx.graphics.Color normal, com.badlogic.gdx.graphics.Color hover, com.badlogic.gdx.graphics.Color active, com.badlogic.gdx.graphics.Color disabled) -
setIconLabelShadowEnabled
public void setIconLabelShadowEnabled(boolean enabled) -
setLabelColors
public ComplexButton setLabelColors(com.badlogic.gdx.graphics.Color normal, com.badlogic.gdx.graphics.Color hover, com.badlogic.gdx.graphics.Color active, com.badlogic.gdx.graphics.Color disabled) -
setEnabled
-