Class EngineView
- java.lang.Object
-
- com.bombinggames.wurfelengine.core.EngineView
-
public class EngineView extends java.lang.Object
A 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 void
addInputProcessor(com.badlogic.gdx.InputProcessor processor)
Add an inputProcessor to the views.void
focusInputProcessor(com.badlogic.gdx.InputProcessor processor)
Deactivates every input processor but one.int
getCursor()
returns the current cursorEditorToggler
getEditorToggler()
float
getEqualizationScale()
The equalizationScale is a factor which scales the GUI/HUD to have the same relative size with different resolutions.com.badlogic.gdx.graphics.g2d.BitmapFont
getFont()
static EngineView
getInstance()
com.badlogic.gdx.graphics.glutils.ShapeRenderer
getShapeRenderer()
to render in screen space with view space scaling?com.badlogic.gdx.scenes.scene2d.ui.Skin
getSkin()
com.badlogic.gdx.graphics.g2d.SpriteBatch
getSpriteBatch()
render in screen spacecom.badlogic.gdx.scenes.scene2d.Stage
getStage()
The libGDX scene2d stagevoid
resetInputProcessors()
Resets the input processors.void
setCursor(int id)
void
unfocusInputProcessor()
Reset that every input processor works again.void
update(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:
-
-