Class ButtonProperties
-
- All Implemented Interfaces:
-
kotlin.Cloneable
public class ButtonProperties extends BlockProperties
Button properties.
- Since:
0.17.3
-
-
Field Summary
Fields Modifier and Type Field Description private final FloatArraycornerRadiiprivate final FloatverticalPaddingprivate final FloaticonTextSpacingprivate final FloatlateralPaddingprivate final Booleancenterprivate final BooleanrecolorsAllprivate final BooleanhasBackgroundprivate final ColoroutlineColorprivate final Colors.Palettepaletteprivate final Animation.TypepressedAnimationprivate final Animation.TypehoverAnimationprivate final LongpressedAnimationDurationprivate final LonghoverAnimationDurationprivate final FloatoutlineThicknessprivate transient Function1<Properties, Colors.Palette>paletteGetprivate transient Colorscolorsprivate transient FontFamilyfontsprivate final Vec2<Unit>sizeprivate final transient HashMap<Event, Function2<Component, Event, Boolean>>eventHandlersprivate final Booleaninitialized
-
Constructor Summary
Constructors Constructor Description ButtonProperties()
-
Method Summary
Modifier and Type Method Description FloatArraygetCornerRadii()FloatgetVerticalPadding()This is the padding from the top to the items. FloatgetIconTextSpacing()padding between the icons and the text. FloatgetLateralPadding()padding from the left/right edges. BooleangetCenter()Enable centering of the items on the button. BooleangetRecolorsAll()If true, the entire button will be recolored of hover/pressed. BooleangetHasBackground()If true, the button will have a background. -
Methods inherited from class org.polyfrost.polyui.property.impl.BlockProperties
getHoverAnimation, getHoverAnimationDuration, getOutlineColor, getOutlineThickness, getPalette, getPaletteGet, getPressedAnimation, getPressedAnimationDuration, setPaletteGet -
Methods inherited from class org.polyfrost.polyui.property.Properties
addEventHandler, getColors, getEventHandlers, getFonts, getInitialized, getSize, init, setColors, setFonts -
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
Method Detail
-
getCornerRadii
FloatArray getCornerRadii()
-
getVerticalPadding
Float getVerticalPadding()
This is the padding from the top to the items.
-
getIconTextSpacing
Float getIconTextSpacing()
padding between the icons and the text.
-
getLateralPadding
Float getLateralPadding()
padding from the left/right edges.
-
getRecolorsAll
Boolean getRecolorsAll()
If true, the entire button will be recolored of hover/pressed.
- Since:
0.21.4
-
getHasBackground
Boolean getHasBackground()
If true, the button will have a background.
-
-
-
-