Class GUIPane
- java.lang.Object
-
- de.coreengine.rendering.renderable.gui.GUIPane
-
public class GUIPane extends Object
Class that represent a pane for a gui- Author:
- Darius Dinger
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
disableText()
Disable text of the panevoid
enableText()
Enable text of the paneColor
getColor()
Color
getPickColor()
float
getPosX()
Getting x pos of the pane relative to the parent pane.float
getPosY()
Getting y pos of the pane relative to the parent pane.float
getPosZ()
Getting z pos of the pane relative to the parent pane.float
getRotX()
Getting x rotation of the pane relative to the parent pane.float
getRotY()
Getting y rotation of the pane relative to the parent pane.float
getRotZ()
Getting z rotation of the pane relative to the parent pane.float
getScaleX()
Getting vertical scale of the pane relative to the parent pane.float
getScaleY()
Getting horizontal scale of the pane relative to the parent pane.float
getScaleZ()
Getting Z scale of the pane relative to the parent pane.GUIText
getText()
String
getTexture()
float[]
getTransMat()
float[]
getTransMatFacing(Camera cam)
boolean
isFacingCamera()
boolean
isMouseOver()
Returns true if mouse is over gui pane.boolean
renderText()
void
setFacingCamera(boolean facingCamera)
When facing is enabled, the gui pane is always facing the camera.void
setPosX(float posX)
Setting x pos of the pane relative to the parent pane.
posX = posX + parent.posXvoid
setPosY(float posY)
Setting y pos of the pane relative to the parent pane.
posY = posY + parent.posYvoid
setPosZ(float posZ)
Setting z pos of the pane relative to the parent pane.
posZ = posZ + parent.posZvoid
setRotX(float rotX)
Setting x rotation of the pane relative to the parent pane.
rotX = rotX + parent.rotXvoid
setRotY(float rotY)
Setting y rotation of the pane relative to the parent pane.
rotY = rotY + parent.rotYvoid
setRotZ(float rotZ)
Setting z rotation of the pane relative to the parent pane.
rotZ = rotZ + parent.rotZvoid
setScaleX(float scaleX)
Setting vertical scale of the pane relative to the parent pane.
scaleX = scaleX * parent.scaleXvoid
setScaleY(float scaleY)
Setting horizontal scale of the pane relative to the parent pane.
scaleY = scaleY * parent.scaleYvoid
setTexture(String texture)
-
-
-
Constructor Detail
-
GUIPane
public GUIPane(GUIPane parent)
Creating new GUI Pane and setting its parent or null, if no parent gui exist- Parameters:
parent
- Parent GUI or null
-
-
Method Detail
-
enableText
public void enableText()
Enable text of the pane
-
disableText
public void disableText()
Disable text of the pane
-
renderText
public boolean renderText()
- Returns:
- Rendering text of the pane?
-
getColor
public Color getColor()
- Returns:
- Read/Writeable color of the pane
-
getTexture
public String getTexture()
- Returns:
- TextureData of the pane
-
setTexture
public void setTexture(String texture)
- Parameters:
texture
- New texture of the pane
-
setScaleX
public void setScaleX(float scaleX)
Setting vertical scale of the pane relative to the parent pane.
scaleX = scaleX * parent.scaleX- Parameters:
scaleX
- Vertical scale
-
setScaleY
public void setScaleY(float scaleY)
Setting horizontal scale of the pane relative to the parent pane.
scaleY = scaleY * parent.scaleY- Parameters:
scaleY
- Horizontal scale
-
getScaleX
public float getScaleX()
Getting vertical scale of the pane relative to the parent pane.- Returns:
- Vertical scale
-
getScaleY
public float getScaleY()
Getting horizontal scale of the pane relative to the parent pane.- Returns:
- Horizontal scale
-
getScaleZ
public float getScaleZ()
Getting Z scale of the pane relative to the parent pane.- Returns:
- Z scale
-
setPosX
public void setPosX(float posX)
Setting x pos of the pane relative to the parent pane.
posX = posX + parent.posX- Parameters:
posX
- X pos
-
setPosY
public void setPosY(float posY)
Setting y pos of the pane relative to the parent pane.
posY = posY + parent.posY- Parameters:
posY
- Y pos
-
setPosZ
public void setPosZ(float posZ)
Setting z pos of the pane relative to the parent pane.
posZ = posZ + parent.posZ- Parameters:
posZ
- Z pos
-
setRotX
public void setRotX(float rotX)
Setting x rotation of the pane relative to the parent pane.
rotX = rotX + parent.rotX- Parameters:
rotX
- X rotation
-
setRotY
public void setRotY(float rotY)
Setting y rotation of the pane relative to the parent pane.
rotY = rotY + parent.rotY- Parameters:
rotY
- Y rotation
-
setRotZ
public void setRotZ(float rotZ)
Setting z rotation of the pane relative to the parent pane.
rotZ = rotZ + parent.rotZ- Parameters:
rotZ
- Z rotation
-
getRotX
public float getRotX()
Getting x rotation of the pane relative to the parent pane.- Returns:
- X rotation
-
getRotY
public float getRotY()
Getting y rotation of the pane relative to the parent pane.- Returns:
- Y rotation
-
getRotZ
public float getRotZ()
Getting z rotation of the pane relative to the parent pane.- Returns:
- Z rotation
-
getPosX
public float getPosX()
Getting x pos of the pane relative to the parent pane.- Returns:
- X pos
-
getPosY
public float getPosY()
Getting y pos of the pane relative to the parent pane.- Returns:
- Y pos
-
getPosZ
public float getPosZ()
Getting z pos of the pane relative to the parent pane.- Returns:
- Z pos
-
isMouseOver
public boolean isMouseOver()
Returns true if mouse is over gui pane.
Only works, if picking is enabled!!!- Returns:
- Is mouse over gui
-
getTransMat
public float[] getTransMat()
- Returns:
- Transformation matrix of the gui
-
getTransMatFacing
public float[] getTransMatFacing(Camera cam)
- Parameters:
cam
- Camera that the transmat should face to- Returns:
- Transformation matrix of the gui, that always facing the camera
-
getPickColor
public Color getPickColor()
- Returns:
- Picking color for this gui
-
getText
public GUIText getText()
- Returns:
- Get the ext for the gui pane
-
setFacingCamera
public void setFacingCamera(boolean facingCamera)
When facing is enabled, the gui pane is always facing the camera. Rotations of the gui element then became redundant!
Currenly this behave a little buggy with parent gui objects, so its not recommended to use this with parent objects.- Parameters:
facingCamera
- Should the gui pane always facing the camera
-
isFacingCamera
public boolean isFacingCamera()
- Returns:
- True if the gui pane always facing the camera, else false
-
-