Class KScreen

java.lang.Object
fr.formiko.kokcinelo.tools.KScreen
Direct Known Subclasses:
EndGameMenu, GameScreen, Hud, MenuScreen, TraillerImage

public class KScreen extends Object
Screen class with fiew more funtion than the one provide by libGDX.
Since:
1.2
Version:
1.3
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final int
     
    protected int
     
    protected static com.badlogic.gdx.scenes.scene2d.ui.Skin
     
    protected static com.badlogic.gdx.scenes.scene2d.ui.Skin
     
    protected static com.badlogic.gdx.scenes.scene2d.ui.Skin
     
    protected List<Integer>
     
    protected int
     
  • Constructor Summary

    Constructors
    Constructor
    Description
    Initialize collections that need to be initialize.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Display performances stats in log.
    protected com.badlogic.gdx.scenes.scene2d.Actor
    getCloseButton(int w, int h)
    Create a close window button.
    static com.badlogic.gdx.scenes.scene2d.ui.Skin
     
    static com.badlogic.gdx.scenes.scene2d.ui.Skin
    getDefautSkin(float fontSize)
     
    static float
     
    static float
     
    static float
     
    static float
     
    boolean
    needResize(int width, int height)
    Return true if size have change.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • width

      protected int width
    • height

      protected int height
    • times

      protected List<Integer> 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.