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

    Fields
    Modifier and Type
    Field
    Description
    final com.badlogic.gdx.scenes.scene2d.ui.Image
     
    final com.badlogic.gdx.scenes.scene2d.ui.Image
     
    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

    Constructors
    Constructor
    Description
    ComplexButton(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 Type
    Method
    Description
    setBackground(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)
    Любой цвет может быть null
    void
     
    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)
    Любой цвет может быть null
    void
    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)
     
     

    Methods inherited from class com.badlogic.gdx.scenes.scene2d.Group

    act, addActor, addActorAfter, addActorAt, addActorBefore, clear, clear, clearChildren, clearChildren, debugAll, draw, 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

    Methods inherited from class java.lang.Object

    equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • 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
  • 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

      public void setClickHandler(Runnable runnable)
    • 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

      public ComplexButton setIcon(com.badlogic.gdx.scenes.scene2d.utils.Drawable drawable)
    • setText

      public ComplexButton setText(CharSequence text)
    • setText

      public ComplexButton setText(int text)
    • setLabel

      public ComplexButton setLabel(float x, float y, float width, float height, int align)
    • 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

      public ComplexButton setEnabled(boolean enabled)