Package com.simsilica.lemur.component
Class QuadBackgroundComponent
java.lang.Object
com.simsilica.lemur.component.AbstractGuiComponent
com.simsilica.lemur.component.QuadBackgroundComponent
- All Implemented Interfaces:
ColoredComponent,GuiComponent,Cloneable
- Direct Known Subclasses:
NAspectPreservingQuadBackground
public class QuadBackgroundComponent
extends AbstractGuiComponent
implements Cloneable, ColoredComponent
-
Constructor Summary
ConstructorsConstructorDescriptionQuadBackgroundComponent(ColorRGBA color) QuadBackgroundComponent(ColorRGBA color, float xMargin, float yMargin) QuadBackgroundComponent(ColorRGBA color, float xMargin, float yMargin, float zOffset, boolean lit) QuadBackgroundComponent(Texture texture) QuadBackgroundComponent(Texture texture, float xMargin, float yMargin) QuadBackgroundComponent(Texture texture, float xMargin, float yMargin, float zOffset, boolean lit) -
Method Summary
Modifier and TypeMethodDescriptionvoidattach(GuiControl parent) voidclone()protected voidvoiddetach(GuiControl parent) floatgetAlpha()Returns the current alpha multiplier that is applied to the color when set to the actual visuals.floatgetColor()Returns the current color of this component.floatprotected voidrefreshBackground(Vector3f size) protected voidvoidvoidsetAlpha(float f) Sets an alpha multiplier that will be applied to the color when set to the actual visuals.voidsetAlphaDiscard(float alphaDiscard) Sets the alphaDiscardThreshold for the image material.voidSets the color for this component.voidsetMargin(float x, float y) voidvoidvoidvoidsetZOffset(float z) Methods inherited from class com.simsilica.lemur.component.AbstractGuiComponent
getGuiControl, getNode, invalidate, isAttached
-
Constructor Details
-
QuadBackgroundComponent
public QuadBackgroundComponent() -
QuadBackgroundComponent
-
QuadBackgroundComponent
-
QuadBackgroundComponent
public QuadBackgroundComponent(ColorRGBA color, float xMargin, float yMargin, float zOffset, boolean lit) -
QuadBackgroundComponent
-
QuadBackgroundComponent
-
QuadBackgroundComponent
public QuadBackgroundComponent(Texture texture, float xMargin, float yMargin, float zOffset, boolean lit)
-
-
Method Details
-
clone
- Specified by:
clonein interfaceGuiComponent- Overrides:
clonein classAbstractGuiComponent
-
attach
- Specified by:
attachin interfaceGuiComponent- Overrides:
attachin classAbstractGuiComponent
-
detach
- Specified by:
detachin interfaceGuiComponent- Overrides:
detachin classAbstractGuiComponent
-
setColor
Description copied from interface:ColoredComponentSets the color for this component.- Specified by:
setColorin interfaceColoredComponent
-
resetColor
protected void resetColor() -
getColor
Description copied from interface:ColoredComponentReturns the current color of this component.- Specified by:
getColorin interfaceColoredComponent
-
setAlpha
public void setAlpha(float f) Description copied from interface:ColoredComponentSets an alpha multiplier that will be applied to the color when set to the actual visuals.- Specified by:
setAlphain interfaceColoredComponent
-
getAlpha
public float getAlpha()Description copied from interface:ColoredComponentReturns the current alpha multiplier that is applied to the color when set to the actual visuals.- Specified by:
getAlphain interfaceColoredComponent
-
setTexture
-
getTexture
-
setTextureCoordinateScale
-
getTextureCoordinateScale
-
setMargin
public void setMargin(float x, float y) -
setMargin
-
getMargin
-
setZOffset
public void setZOffset(float z) -
getZOffset
public float getZOffset() -
setAlphaDiscard
public void setAlphaDiscard(float alphaDiscard) Sets the alphaDiscardThreshold for the image material. If an alpha value is below this threshold then it will be discarded rather than being written to the color and zbuffers. Set to 0 to disable. Defaults to 0.Note: for 2D UIs this threshold is not necessary as 2D GUIs will always sort purely back-to-front on Z. For 3D UIs, this setting may prevent visual artifacts from certain directions for very transparent pixels (background showing through, etc.))
-
getAlphaDiscard
public float getAlphaDiscard() -
getMaterial
-
calculatePreferredSize
- Specified by:
calculatePreferredSizein interfaceGuiComponent
-
reshape
- Specified by:
reshapein interfaceGuiComponent
-
createMaterial
protected void createMaterial() -
refreshBackground
-