6e6b66656519dff6449b1aaac54ec616c4349d38
1 package ru
.deadsoftware
.cavedroid
.menu
.submenus
;
3 import com
.badlogic
.gdx
.Gdx
;
4 import ru
.deadsoftware
.cavedroid
.menu
.objects
.ButtonEventListener
;
5 import ru
.deadsoftware
.cavedroid
.menu
.objects
.ButtonRenderer
;
7 import java
.util
.HashMap
;
9 public class MenuNewGame
extends Menu
{
11 public MenuNewGame(float width
, float height
, ButtonRenderer buttonRenderer
) {
12 super(width
, height
, buttonRenderer
);
16 protected HashMap
<String
, ButtonEventListener
> getButtonEventListeners() {
17 HashMap
<String
, ButtonEventListener
> map
= new HashMap
<>();
18 map
.put("survival", MenuInput
::survivalClicked
);
19 map
.put("creative", MenuInput
::creativeClicked
);
20 map
.put("back", MenuInput
::backClicked
);
25 protected void initButtons() {
26 loadButtonsFromJson(Gdx
.files
.internal("json/menu_new_game_buttons.json"));