Class OwnSliderReset
java.lang.Object
com.badlogic.gdx.scenes.scene2d.Actor
com.badlogic.gdx.scenes.scene2d.Group
com.badlogic.gdx.scenes.scene2d.ui.WidgetGroup
com.badlogic.gdx.scenes.scene2d.ui.Table
gaiasky.util.scene2d.OwnSliderReset
- All Implemented Interfaces:
com.badlogic.gdx.scenes.scene2d.utils.Cullable, com.badlogic.gdx.scenes.scene2d.utils.Disableable, com.badlogic.gdx.scenes.scene2d.utils.Layout
public class OwnSliderReset
extends com.badlogic.gdx.scenes.scene2d.ui.Table
implements com.badlogic.gdx.scenes.scene2d.utils.Disableable
Wrapper around
OwnSliderPlus that adds a "Reset value" button to the right of the slider.-
Nested Class Summary
Nested classes/interfaces inherited from class com.badlogic.gdx.scenes.scene2d.ui.Table
com.badlogic.gdx.scenes.scene2d.ui.Table.Debug, com.badlogic.gdx.scenes.scene2d.ui.Table.DebugRect -
Field Summary
Fields inherited from class com.badlogic.gdx.scenes.scene2d.ui.Table
backgroundBottom, backgroundLeft, backgroundRight, backgroundTop, debugActorColor, debugCellColor, debugTableColorFields inherited from class com.badlogic.gdx.scenes.scene2d.Actor
POOLS -
Constructor Summary
ConstructorsConstructorDescriptionOwnSliderReset(String title, float min, float max, boolean logarithmic, float resetValue, com.badlogic.gdx.scenes.scene2d.ui.Skin skin) OwnSliderReset(String title, float min, float max, boolean logarithmic, float resetValue, com.badlogic.gdx.scenes.scene2d.ui.Skin skin, String labelStyle) OwnSliderReset(String title, float min, float max, float stepSize, boolean vertical, float resetValue, com.badlogic.gdx.scenes.scene2d.ui.Skin skin, String labelStyleName) OwnSliderReset(String title, float min, float max, float stepSize, float mapMin, float mapMax, float resetValue, com.badlogic.gdx.scenes.scene2d.ui.Skin skin) OwnSliderReset(String title, float min, float max, float stepSize, float mapMin, float mapMax, float resetValue, com.badlogic.gdx.scenes.scene2d.ui.Skin skin, String labelStyle) OwnSliderReset(String title, float min, float max, float stepSize, float resetValue, com.badlogic.gdx.scenes.scene2d.ui.Skin skin) OwnSliderReset(String title, float min, float max, float stepSize, float resetValue, com.badlogic.gdx.scenes.scene2d.ui.Skin skin, String sliderStyle) -
Method Summary
Modifier and TypeMethodDescriptionbooleanaddListener(com.badlogic.gdx.scenes.scene2d.EventListener listener) voidvoidvoidconnectUnmapped(Event event) floatfloatfloatfloatfloatcom.badlogic.gdx.scenes.scene2d.ui.ButtonfloatfloatgetValue()booleanbooleanvoidvoidvoidsetColor(float r, float g, float b, float a) voidsetColor(com.badlogic.gdx.graphics.Color color) voidsetDisabled(boolean disabled) voidsetDisplayValueMapped(boolean displayValueMapped) voidsetHeight(float height) voidsetLabelColor(float r, float g, float b, float a) voidsetLabelColor(com.badlogic.gdx.graphics.Color c) voidsetLogarithmicExponent(double exp) Controls the strength of the non-linear value mapping when logarithmic mode is enabled.voidsetMappedValue(double mappedValue) voidsetMappedValue(float mappedValue) voidsetMapValues(float mapMin, float mapMax, boolean logarithmic) voidvoidsetProgrammaticChangeEvents(boolean programmaticChangeEvents) voidsetSize(float width, float height) voidsetStepSize(float stepSize) voidsetTooltip(String tooltip) voidvoidsetUp(String title, float mapMin, float mapMax, boolean logarithmic, DecimalFormat nf, String labelStyleName) booleansetValue(float value) voidsetValueLabelTransform(Function<Float, String> transform) voidsetValuePrefix(String valuePrefix) voidsetValueSuffix(String valueSuffix) voidsetWidth(float width) Methods inherited from class com.badlogic.gdx.scenes.scene2d.ui.Table
add, add, add, add, add, add, add, align, background, background, bottom, center, clearChildren, clip, clip, columnDefaults, debug, debug, debugActor, debugAll, debugCell, debugTable, defaults, draw, drawBackground, drawDebug, drawDebugBounds, getAlign, getBackground, getCell, getCells, getClip, getColumnMinWidth, getColumnPrefWidth, getColumns, getColumnWidth, getMinHeight, getMinWidth, getPadBottom, getPadBottomValue, getPadLeft, getPadLeftValue, getPadRight, getPadRightValue, getPadTop, getPadTopValue, getPadX, getPadY, getRow, getRowHeight, getRowMinHeight, getRowPrefHeight, getRows, getSkin, getTableDebug, hit, invalidate, layout, left, pad, pad, pad, pad, padBottom, padBottom, padLeft, padLeft, padRight, padRight, padTop, padTop, removeActor, removeActor, removeActorAt, reset, right, row, setBackground, setBackground, setClip, setDebug, setRound, setSkin, stack, topMethods inherited from class com.badlogic.gdx.scenes.scene2d.ui.WidgetGroup
childrenChanged, getMaxHeight, getMaxWidth, invalidateHierarchy, needsLayout, pack, setFillParent, setLayoutEnabled, sizeChanged, validateMethods inherited from class com.badlogic.gdx.scenes.scene2d.Group
act, addActor, addActorAfter, addActorAt, addActorBefore, applyTransform, applyTransform, clear, clear, clearChildren, computeTransform, drawChildren, drawDebugChildren, findActor, getChild, getChildren, getCullingArea, hasChildren, isTransform, localToDescendantCoordinates, resetTransform, resetTransform, setCullingArea, setDebug, setStage, setTransform, swapActor, swapActor, toStringMethods inherited from class com.badlogic.gdx.scenes.scene2d.Actor
addAction, addCaptureListener, ancestorsVisible, ascendantsVisible, clearActions, clearListeners, clipBegin, clipBegin, clipEnd, 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, setName, setOrigin, setOrigin, setOriginX, setOriginY, setParent, setPosition, setPosition, setRotation, setScale, setScale, setScaleX, setScaleY, setTouchable, setUserObject, setVisible, setX, setX, setY, setY, setZIndex, sizeBy, sizeBy, stageToLocalCoordinates, toBack, toFront
-
Constructor Details
-
OwnSliderReset
-
OwnSliderReset
-
OwnSliderReset
public OwnSliderReset(String title, float min, float max, float stepSize, float mapMin, float mapMax, float resetValue, com.badlogic.gdx.scenes.scene2d.ui.Skin skin) -
OwnSliderReset
-
OwnSliderReset
public OwnSliderReset(String title, float min, float max, boolean logarithmic, float resetValue, com.badlogic.gdx.scenes.scene2d.ui.Skin skin) -
OwnSliderReset
public OwnSliderReset(String title, float min, float max, float stepSize, float resetValue, com.badlogic.gdx.scenes.scene2d.ui.Skin skin) -
OwnSliderReset
-
-
Method Details
-
setLogarithmicExponent
public void setLogarithmicExponent(double exp) Controls the strength of the non-linear value mapping when logarithmic mode is enabled.The slider applies a power-curve transform of the form
t^expto its normalized positiont ∈ [0,1]. This produces a customizable alternative to a true logarithmic scale:exp = 1.0→ linear mapping (no non-linearity)exp < 1.0→ expanded high-end resolution (e.g., 0.5 = square-root)exp > 1.0→ expanded low-end resolution
The parameter must be strictly positive.
-
addListener
public boolean addListener(com.badlogic.gdx.scenes.scene2d.EventListener listener) - Overrides:
addListenerin classcom.badlogic.gdx.scenes.scene2d.Actor
-
setUp
-
setUp
public void setUp(String title, float mapMin, float mapMax, boolean logarithmic, DecimalFormat nf, String labelStyleName) -
setValueLabelTransform
-
setNumberFormatter
-
setDisplayValueMapped
public void setDisplayValueMapped(boolean displayValueMapped) -
setMapValues
public void setMapValues(float mapMin, float mapMax, boolean logarithmic) -
removeMapValues
public void removeMapValues() -
getValueString
-
setValue
public boolean setValue(float value) -
getMappedValue
public float getMappedValue() -
setMappedValue
public void setMappedValue(double mappedValue) -
setMappedValue
public void setMappedValue(float mappedValue) -
setValuePrefix
-
setValueSuffix
-
setWidth
public void setWidth(float width) - Overrides:
setWidthin classcom.badlogic.gdx.scenes.scene2d.Actor
-
setHeight
public void setHeight(float height) - Overrides:
setHeightin classcom.badlogic.gdx.scenes.scene2d.Actor
-
setSize
public void setSize(float width, float height) - Overrides:
setSizein classcom.badlogic.gdx.scenes.scene2d.Actor
-
getPrefWidth
public float getPrefWidth()- Specified by:
getPrefWidthin interfacecom.badlogic.gdx.scenes.scene2d.utils.Layout- Overrides:
getPrefWidthin classcom.badlogic.gdx.scenes.scene2d.ui.Table
-
getPrefHeight
public float getPrefHeight()- Specified by:
getPrefHeightin interfacecom.badlogic.gdx.scenes.scene2d.utils.Layout- Overrides:
getPrefHeightin classcom.badlogic.gdx.scenes.scene2d.ui.Table
-
isDisabled
public boolean isDisabled()- Specified by:
isDisabledin interfacecom.badlogic.gdx.scenes.scene2d.utils.Disableable
-
setDisabled
public void setDisabled(boolean disabled) - Specified by:
setDisabledin interfacecom.badlogic.gdx.scenes.scene2d.utils.Disableable
-
setLabelColor
public void setLabelColor(com.badlogic.gdx.graphics.Color c) -
setLabelColor
public void setLabelColor(float r, float g, float b, float a) -
restoreLabelColor
public void restoreLabelColor() -
getValue
public float getValue() -
getMinValue
public float getMinValue() -
getMaxValue
public float getMaxValue() -
getStepSize
public float getStepSize() -
setStepSize
public void setStepSize(float stepSize) -
isDragging
public boolean isDragging() -
setColor
public void setColor(com.badlogic.gdx.graphics.Color color) - Overrides:
setColorin classcom.badlogic.gdx.scenes.scene2d.Actor
-
setColor
public void setColor(float r, float g, float b, float a) - Overrides:
setColorin classcom.badlogic.gdx.scenes.scene2d.Actor
-
getSlider
-
getResetButton
public com.badlogic.gdx.scenes.scene2d.ui.Button getResetButton() -
getResetValue
-
setProgrammaticChangeEvents
public void setProgrammaticChangeEvents(boolean programmaticChangeEvents) -
setTooltip
-
connect
-
connect
-
connectUnmapped
-