public class BasicMenuItem
extends java.lang.Object
Constructor and Description |
---|
BasicMenuItem(int index,
java.lang.String label)
Create a new menu Item which does something specific like exiting or showing the option screen.
|
BasicMenuItem(int index,
java.lang.String label,
java.lang.Class<? extends Controller> gameController,
java.lang.Class<? extends View> gameView,
Configuration config)
Create a new menu Item and say which texture it should have.
|
Modifier and Type | Method and Description |
---|---|
void |
action() |
java.lang.Class<? extends Controller> |
getGameController() |
java.lang.Class<? extends View> |
getGameView() |
static int |
getHighlight() |
boolean |
isClicked()
Check if ithe mouse clicked the menuItem.
|
void |
render(com.badlogic.gdx.graphics.Camera camera,
com.badlogic.gdx.graphics.g2d.BitmapFont font,
com.badlogic.gdx.graphics.g2d.SpriteBatch batch,
com.badlogic.gdx.graphics.glutils.ShapeRenderer sr)
Renders the menu item.
|
static void |
setHighlight(int highlight) |
static void |
setSound(com.badlogic.gdx.audio.Sound sound) |
public BasicMenuItem(int index, java.lang.String label, java.lang.Class<? extends Controller> gameController, java.lang.Class<? extends View> gameView, Configuration config)
index
- label
- gameController
- Your game controller class for this menu itemgameView
- Your game view class for this menu itemconfig
- public BasicMenuItem(int index, java.lang.String label)
index
- label
- public void render(com.badlogic.gdx.graphics.Camera camera, com.badlogic.gdx.graphics.g2d.BitmapFont font, com.badlogic.gdx.graphics.g2d.SpriteBatch batch, com.badlogic.gdx.graphics.glutils.ShapeRenderer sr)
camera
- The camera rendering the MenuItemfont
- batch
- sr
- public boolean isClicked()
public java.lang.Class<? extends Controller> getGameController()
public java.lang.Class<? extends View> getGameView()
public void action()
public static void setSound(com.badlogic.gdx.audio.Sound sound)
sound
- public static int getHighlight()
public static void setHighlight(int highlight)
highlight
-