diff --git a/core/src/ru/deadsoftware/cavedroid/menu/submenus/Menu.java b/core/src/ru/deadsoftware/cavedroid/menu/submenus/Menu.java
index f9d648a37c6996fbc295d8026baf268ebd020f19..21bf02b083050bb90be78135fb078a0fc1aadcb3 100644 (file)
public abstract class Menu {
+ private ButtonDrawer buttonDrawer;
+
private float width;
private float height;
/**
* @param width Viewport width
* @param height Viewport height
+ * @param buttonDrawer {@link ButtonDrawer} that will draw the buttons of this menu
*/
- Menu(float width, float height) {
+ Menu(float width, float height, ButtonDrawer buttonDrawer) {
this.width = width;
this.height = height;
+ this.buttonDrawer = buttonDrawer;
initButtons();
}
*
* @param spriter {@link SpriteBatch} that will draw it. Should be already started.
*/
- public void draw(SpriteBatch spriter, ButtonDrawer buttonDrawer, float width, float height) {
+ public void draw(SpriteBatch spriter) {
TextureRegion background = Assets.textureRegions.get("background");
TextureRegion gamelogo = Assets.textureRegions.get("gamelogo");