Package fr.formiko.kokcinelo.tools
Class KScreen
java.lang.Object
fr.formiko.kokcinelo.tools.KScreen
- Direct Known Subclasses:
EndGameMenu,GameScreen,Hud,MenuScreen,TraillerImage
Screen class with fiew more funtion than the one provide by libGDX.
- Since:
- 1.2
- Version:
- 1.3
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intprotected intprotected static com.badlogic.gdx.scenes.scene2d.ui.Skinprotected static com.badlogic.gdx.scenes.scene2d.ui.Skinprotected static com.badlogic.gdx.scenes.scene2d.ui.Skinprotected int -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidDisplay performances stats in log.protected com.badlogic.gdx.scenes.scene2d.ActorgetCloseButton(int w, int h) Create a close window button.static com.badlogic.gdx.scenes.scene2d.ui.Skinstatic com.badlogic.gdx.scenes.scene2d.ui.SkingetDefautSkin(float fontSize) static floatstatic floatgetRacio()static floatstatic floatbooleanneedResize(int width, int height) Return true if size have change.
-
Field Details
-
width
protected int width -
height
protected int height -
times
-
FONT_SIZE
public static final int FONT_SIZE- See Also:
-
skin
protected static com.badlogic.gdx.scenes.scene2d.ui.Skin skin -
skinSmall
protected static com.badlogic.gdx.scenes.scene2d.ui.Skin skinSmall -
skinTitle
protected static com.badlogic.gdx.scenes.scene2d.ui.Skin skinTitle
-
-
Constructor Details
-
KScreen
public KScreen()Initialize collections that need to be initialize.
-
-
Method Details
-
getRacioWidth
public static float getRacioWidth() -
getRacioHeight
public static float getRacioHeight() -
getRacio
public static float getRacio() -
getFPSRacio
public static float getFPSRacio() -
needResize
public boolean needResize(int width, int height) Return true if size have change.- Parameters:
width- new width of the screen.height- new height of the screen.- Returns:
- true if the screen need to be resized.
-
displayPerf
public void displayPerf()Display performances stats in log. -
getDefautSkin
public static com.badlogic.gdx.scenes.scene2d.ui.Skin getDefautSkin(float fontSize) - Parameters:
fontSize- size of the font- Returns:
- A simple skin that menus use
-
getDefautSkin
public static com.badlogic.gdx.scenes.scene2d.ui.Skin getDefautSkin()- Returns:
- A simple skin that menus use
-
getCloseButton
protected com.badlogic.gdx.scenes.scene2d.Actor getCloseButton(int w, int h) Create a close window button.- Returns:
- a close window button.
-