Class Keybind
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public classKeybind.Companion
-
Field Summary
Fields Modifier and Type Field Description private final KeybindPropertiespropertiesprivate KeyBinder.Bindbindprivate final Booleanvalidprivate final transient ImageleftImageprivate final transient ImagerightImageprivate final transient Texttextprivate Stringstringprivate final ArrayList<Component>childrenprivate transient PolyColor.Animatedcolorprivate transient Drawableparentprivate transient Layoutlayoutprivate transient BooleanconsumesHoverprivate Booleandisabledprivate Vec2<Unit>sizeprivate final transient HashMap<Event, Function2<Drawable, Event, Boolean>>eventHandlersprivate transient StringsimpleNameprivate transient Rendererrendererprivate transient PolyUIpolyUIprivate BooleanacceptsInputprivate final transient ByteinitStageprivate final transient BooleanmouseOverprivate transient Booleanrendersprivate Floatxprivate Floatyprivate Floatwidthprivate Floatheightprivate Booleanexistsprivate transient FloattrueXprivate transient FloattrueYprivate final Unit.TypeatTypeprivate final Unit.TypesizeTypeprivate final BooleanisDynamicprivate Doublerotationprivate DoubleskewXprivate DoubleskewYprivate FloatscaleXprivate FloatscaleYprivate Floatalphaprivate transient Floatacxprivate transient Floatacyprivate final Vec2<Unit>atprivate final BooleanrawResizepublic final static Keybind.CompanionCompanion
-
Constructor Summary
Constructors Constructor Description Keybind(KeybindProperties properties, Vec2<Unit> at, Vec2<Unit> size, Boolean withIcon, KeyBinder.Bind bind)
-
Method Summary
Modifier and Type Method Description KeybindPropertiesgetProperties()final KeyBinder.BindgetBind()final UnitsetBind(KeyBinder.Bind bind)final BooleangetValid()Unitrender()Render the children of this component. Unitsetup(Renderer renderer, PolyUI polyUI)give this a renderer reference and a PolyUI reference. UnitdrawRecordingIcon(Float x, Float y)Draw the recording icon at the given position. -
Methods inherited from class org.polyfrost.polyui.component.impl.Button
calculateBounds, getLeftImage, getRightImage, getString, getText, recolorRecolorsAll, setString -
Methods inherited from class org.polyfrost.polyui.component.ContainingComponent
addComponents, calculateChildBounds, clipDrawables, debugRender, getChildren, isInside, onColorsChanged, onFontsChanged, onParentInitComplete, preRender, recolor, recolorAll, removeComponents, rescale, reset, trueX, trueY -
Methods inherited from class org.polyfrost.polyui.component.Component
accept, addKeyframes, addOperation, canBeRemoved, draggable, every, getColor, getConsumesHover, getDisabled, getLayout, getParent, getSize, setColor, setConsumesHover, setDisabled, setLayout, setParent, setProperties, setSize, toString, wantRedraw -
Methods inherited from class org.polyfrost.polyui.component.Drawable
addEventHandler, addEventhandler, animateBy, animateTo, calculateSize, clone, debugPrint, doDynamicSize, events, fadeBy, fadeTo, getAcceptsInput, getAcx, getAcy, getAlpha, getAt, getAtType, getContainingLayout, getEventHandlers, getExists, getHeight, getInitStage, getMouseOver, getPolyUI, getRawResize, getRenderer, getRenders, getRotation, getScaleX, getScaleY, getSimpleName, getSizeType, getSkewX, getSkewY, getTrueX, getTrueY, getWidth, getX, getY, intersects, isDynamic, isInside, moveBy, moveTo, onInitComplete, postRender, removeOperation, resize, rotateBy, rotateTo, scaleBy, scaleTo, setAcceptsInput, setAcx, setAcy, setAlpha, setExists, setHeight, setPolyUI, setRenderer, setRenders, setRotation, setScaleX, setScaleY, setSimpleName, setSkewX, setSkewY, setTrueX, setTrueY, setWidth, setX, setY, skewBy, skewTo -
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
Constructor Detail
-
Keybind
Keybind(KeybindProperties properties, Vec2<Unit> at, Vec2<Unit> size, Boolean withIcon, KeyBinder.Bind bind)
-
-
Method Detail
-
getProperties
KeybindProperties getProperties()
-
getBind
final KeyBinder.Bind getBind()
-
setBind
final Unit setBind(KeyBinder.Bind bind)
-
render
Unit render()
Render the children of this component.
you must call super.render()!
-
setup
Unit setup(Renderer renderer, PolyUI polyUI)
give this a renderer reference and a PolyUI reference.
You can also use this method to do some calculations (such as text widths) that are not dependent on other sizes.
If you need a method that has access to component's sizes, see here or here (if you are operating on yourself only).
this method is called once, and only once.
-
drawRecordingIcon
Unit drawRecordingIcon(Float x, Float y)
Draw the recording icon at the given position.
-
-
-
-