Package com.t3_tp3d.game.screen
Class Screen
- java.lang.Object
-
- com.t3_tp3d.game.screen.Screen
-
- All Implemented Interfaces:
KeyListener
- Direct Known Subclasses:
CreditScreen
,EndScreen
,InGameScreen
,MainScreen
,ModalScreen
,SplashScreen
public abstract class Screen extends java.lang.Object implements KeyListener
-
-
Field Summary
Fields Modifier and Type Field Description static org.joml.Vector3f
CLICKED_COLOR_FILTER
static org.joml.Vector3f
CLICKED_TEXTURE_FILTER
static org.joml.Vector3f
HOVER_COLOR_FILTER
static org.joml.Vector3f
HOVER_TEXTURE_FILTER
static org.joml.Vector3f
NO_COLOR_FILTER
static org.joml.Vector3f
NO_TEXTURE_FILTER
static float
z
-
Constructor Summary
Constructors Constructor Description Screen()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addButton(Button button)
void
addText(Text text)
void
cleanupScreen()
void
desactivate()
void
drawBackground(Texture texture)
void
drawColoredRect(int x, int y, int width, int height, org.joml.Vector4f color)
void
drawTexturedRect(int x, int y, int width, int height, Texture texture)
void
hideModal()
boolean
isHideModal()
void
keyPressed(int key)
void
keyReleased(int key)
void
removeButton(Button button)
void
removeText(Text text)
void
renderScreen()
static void
setBounds(Shader shader, float x, float y, float width, float height)
void
showModal(ModalScreen modal)
void
updateCamera(int width, int height)
void
updateScreen()
-
-
-
Field Detail
-
NO_COLOR_FILTER
public static final org.joml.Vector3f NO_COLOR_FILTER
-
NO_TEXTURE_FILTER
public static final org.joml.Vector3f NO_TEXTURE_FILTER
-
HOVER_COLOR_FILTER
public static final org.joml.Vector3f HOVER_COLOR_FILTER
-
HOVER_TEXTURE_FILTER
public static final org.joml.Vector3f HOVER_TEXTURE_FILTER
-
CLICKED_COLOR_FILTER
public static final org.joml.Vector3f CLICKED_COLOR_FILTER
-
CLICKED_TEXTURE_FILTER
public static final org.joml.Vector3f CLICKED_TEXTURE_FILTER
-
z
public static float z
-
-
Method Detail
-
updateScreen
public void updateScreen()
-
renderScreen
public void renderScreen()
-
cleanupScreen
public void cleanupScreen()
-
updateCamera
public void updateCamera(int width, int height)
-
addButton
public void addButton(Button button)
-
removeButton
public void removeButton(Button button)
-
addText
public void addText(Text text)
-
removeText
public void removeText(Text text)
-
showModal
public void showModal(ModalScreen modal)
-
hideModal
public void hideModal()
-
isHideModal
public boolean isHideModal()
- Returns:
- Boolean retourne si le modal est affiché ou non
-
desactivate
public void desactivate()
-
drawTexturedRect
public void drawTexturedRect(int x, int y, int width, int height, Texture texture)
-
drawColoredRect
public void drawColoredRect(int x, int y, int width, int height, org.joml.Vector4f color)
-
drawBackground
public void drawBackground(Texture texture)
-
setBounds
public static void setBounds(Shader shader, float x, float y, float width, float height)
-
keyPressed
public void keyPressed(int key)
- Specified by:
keyPressed
in interfaceKeyListener
-
keyReleased
public void keyReleased(int key)
- Specified by:
keyReleased
in interfaceKeyListener
-
-