Class Image
-
-
Field Summary
-
Method Summary
Modifier and Type Method Description final PolyImagegetImage()final UnitsetImage(PolyImage image)final PolyColorgetBackgroundColor()final UnitsetBackgroundColor(PolyColor backgroundColor)Booleansetup(PolyUI polyUI)give this a PolyUI reference. Vec2calculateSize()Use this function to calculate the size of this component. StringdebugString()Override this function to add things to the debug display of this component. -
Methods inherited from class org.polyfrost.polyui.component.impl.Block
getBorderColor, getBorderWidth, getRadii, rescale0, setBorderColor, setBorderWidth, setRadii -
Methods inherited from class org.polyfrost.polyui.component.Drawable
clone, debugDraw, draw, get, getAlpha, getColor, getColorOrNull, getFramebuffer, getPalette, getRenderer, getRotation, getScaleX, getScaleY, getSkewX, getSkewY, needsRedraw, setAlpha, setColor, setColorInternal, setNeedsRedraw, setPalette, setRotation, setScaleX, setScaleY, setSkewX, setSkewY, toString -
Methods inherited from class org.polyfrost.polyui.component.Scrollable
accept, fixVisibleSize, getHasVisibleSize, getShouldScroll, getVisibleSize, isScrolling, isScrollingX, isScrollingY, popScroll, pushScroll, recalculate, resetScroll, screenAt, setHasVisibleSize, setShouldScroll, setVisibleSize, tryMakeScrolling -
Methods inherited from class org.polyfrost.polyui.component.Inputtable
acceptsInput, addEventhandler, clearHandlers, getInputState, hasListenersFor, hasListenersFor, isEnabled, isFocusable, isFocused, on, setAcceptsInput, setEnabled, setInputState -
Methods inherited from class org.polyfrost.polyui.component.Component
addChild, addChild, addOperation, addOperation, at, clipChildren, contains, contains, createdWithSetPosition, createdWithSetSize, get, get, getAlignment, getAt, getChildren, getHeight, getInitialized, getLayoutFlags, getName, getOperations, getPadding, getParent, getParentOrNull, getPolyUI, getRenders, getSize, getWidth, getX, getY, intersects, isInside, isLayoutIgnored, isOperating, isPositioned, isRawResize, isSizeValid, position, remove, removeChild, removeChild, removeOperation, rescale, set, set, setAt, setHeight, setLayoutFlags, setLayoutIgnored, setName, setPadding, setParent, setRawResize, setRenders, setSize, setWidth, setX, setY, set_parent, size -
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
Method Detail
-
getBackgroundColor
final PolyColor getBackgroundColor()
-
setBackgroundColor
final Unit setBackgroundColor(PolyColor backgroundColor)
-
setup
Boolean setup(PolyUI polyUI)
give this a PolyUI reference.
You can also use this method to do some calculations (such as text widths) that are not dependent on other sizes, or operations that require access to PolyUI things, like PolyUI.settings or PolyUI.translator
this method is called once, and only once.
-
calculateSize
Vec2 calculateSize()
Use this function to calculate the size of this component. DO NOT include children in this calculation!
This function is only called if no size is supplied to this component at initialization. A return value of
nullindicates this component is not able to infer its own size, as it is for example, a Block with no reference. A component such as Text on the other hand, is able to infer its own size.This function is only ever called if sizeValid is false.
-
debugString
String debugString()
Override this function to add things to the debug display of this component.
- Since:
1.1.1
-
-
-
-