Class EngineView
- java.lang.Object
-
- com.bombinggames.wurfelengine.core.EngineView
-
public class EngineView extends java.lang.ObjectA view which is not dependend on the currently active game. It can therefore be used to render in screen space and in the menus. Only one instance should be used.- Since:
- 1.2.26
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddInputProcessor(com.badlogic.gdx.InputProcessor processor)Add an inputProcessor to the views.voidfocusInputProcessor(com.badlogic.gdx.InputProcessor processor)Deactivates every input processor but one.intgetCursor()returns the current cursorEditorTogglergetEditorToggler()floatgetEqualizationScale()The equalizationScale is a factor which scales the GUI/HUD to have the same relative size with different resolutions.com.badlogic.gdx.graphics.g2d.BitmapFontgetFont()static EngineViewgetInstance()com.badlogic.gdx.graphics.glutils.ShapeRenderergetShapeRenderer()to render in screen space with view space scaling?com.badlogic.gdx.scenes.scene2d.ui.SkingetSkin()com.badlogic.gdx.graphics.g2d.SpriteBatchgetSpriteBatch()render in screen spacecom.badlogic.gdx.scenes.scene2d.StagegetStage()The libGDX scene2d stagevoidresetInputProcessors()Resets the input processors.voidsetCursor(int id)voidunfocusInputProcessor()Reset that every input processor works again.voidupdate(float dt)
-
-
-
Method Detail
-
getInstance
public static EngineView getInstance()
-
getStage
public com.badlogic.gdx.scenes.scene2d.Stage getStage()
The libGDX scene2d stage- Returns:
-
update
public void update(float dt)
- Parameters:
dt-
-
getSpriteBatch
public com.badlogic.gdx.graphics.g2d.SpriteBatch getSpriteBatch()
render in screen space- Returns:
-
getShapeRenderer
public com.badlogic.gdx.graphics.glutils.ShapeRenderer getShapeRenderer()
to render in screen space with view space scaling?- Returns:
-
getEqualizationScale
public float getEqualizationScale()
The equalizationScale is a factor which scales the GUI/HUD to have the same relative size with different resolutions.- Returns:
- the scale factor
-
resetInputProcessors
public void resetInputProcessors()
Resets the input processors.
-
addInputProcessor
public void addInputProcessor(com.badlogic.gdx.InputProcessor processor)
Add an inputProcessor to the views.- Parameters:
processor-
-
focusInputProcessor
public void focusInputProcessor(com.badlogic.gdx.InputProcessor processor)
Deactivates every input processor but one.- Parameters:
processor- the processor you want to "filter"- Since:
- V1.2.21
- See Also:
unfocusInputProcessor()
-
unfocusInputProcessor
public void unfocusInputProcessor()
Reset that every input processor works again.- Since:
- V1.2.21
- See Also:
focusInputProcessor(com.badlogic.gdx.InputProcessor)
-
getFont
public com.badlogic.gdx.graphics.g2d.BitmapFont getFont()
- Returns:
-
getSkin
public com.badlogic.gdx.scenes.scene2d.ui.Skin getSkin()
- Returns:
-
setCursor
public void setCursor(int id)
- Parameters:
id- 0 default, 1 pointer, 2 drag
-
getCursor
public int getCursor()
returns the current cursor- Returns:
- 0 default, 1 pointer, 2 drag
-
getEditorToggler
public EditorToggler getEditorToggler()
- Returns:
-
-