Class GUI.Viewport
java.lang.Object
com.blackrook.gui.GUI.Viewport
- Enclosing class:
GUI
A viewport "camera" that describes how or what is displayed of the GUI.
This affects what is visible on screen as well as how to render it in the canvas.
REMEMBER: In GUIs, (0,0) is upper left.
- Author:
- Matthew Tropiano
-
Constructor Summary
ConstructorsConstructorDescriptionViewport(float guiX, float guiY, float guiWidth, float guiHeight) Creates a new GUI viewport. -
Method Summary
Modifier and TypeMethodDescriptionfloatfloatfloatgetGUIX()floatgetGUIY()voidsetBounds(float guiX, float guiY, float guiWidth, float guiHeight) voidsetGUIHeight(float guiHeight) voidsetGUIWidth(float guiWidth) voidsetGUIX(float guiX) voidsetGUIY(float guiY)
-
Constructor Details
-
Viewport
public Viewport(float guiX, float guiY, float guiWidth, float guiHeight) Creates a new GUI viewport.- Parameters:
guiX- GUI Origin X-coordinate (in GUI coordinates).guiY- GUI Origin Y-coordinate (in GUI coordinates).guiWidth- GUI Viewport width (in GUI coordinates).guiHeight- GUI Viewport width (in GUI coordinates).
-
-
Method Details
-
setBounds
public void setBounds(float guiX, float guiY, float guiWidth, float guiHeight) -
getGUIX
public float getGUIX() -
setGUIX
public void setGUIX(float guiX) -
getGUIY
public float getGUIY() -
setGUIY
public void setGUIY(float guiY) -
getGUIWidth
public float getGUIWidth() -
setGUIWidth
public void setGUIWidth(float guiWidth) -
getGUIHeight
public float getGUIHeight() -
setGUIHeight
public void setGUIHeight(float guiHeight)
-