2a89e04608f3064a170bdb69c363a99deb84d23d
25 /**
26 * {@link ArrayMap} of {@link Button Buttons} of this menu screen
27 */
30 /**
31 * @param width Viewport width
32 * @param height Viewport height
33 * @param buttonRenderer {@link ButtonRenderer} that will draw the buttons of this menu
34 */
40 }
42 /**
43 * If you are loading buttons from json,
44 * override this method and create a HashMap with buttons' keys from json as keys
45 * and {@link ButtonEventListener ButtonEventListeners} as values.
46 *
47 * @return empty HashMap if not overridden
48 */
51 }
53 /**
54 * You can call this from {@link #initButtons()} to load buttons from json
55 *
56 * @param jsonFile A {@link FileHandle} to json file
57 */
61 }
72 }));
73 }
74 }
76 /**
77 * Draws the menu with background, logo and it's buttons
78 *
79 * @param spriter {@link SpriteBatch} that will draw it. Should be already started.
80 */
88 }
89 }
96 if (button.getRect().contains(inputX, inputY) && (/*!CaveGame.TOUCH || */Gdx.input.isTouched())) {
100 }
101 }
103 }
104 }
108 }
110 /**
111 * This method is called from constructor and should initialize {@link #buttons} <br>
112 * You can run {@link #loadButtonsFromJson(FileHandle)} from it
113 */
115 }