1 package ru.deadsoftware.cavedroid.menu.submenus
3 import ru.deadsoftware.cavedroid.MainConfig
4 import ru.deadsoftware.cavedroid.menu.MenuProc
5 import ru.deadsoftware.cavedroid.menu.objects.ButtonEventListener
6 import ru.deadsoftware.cavedroid.menu.objects.ButtonRenderer
7 import ru.deadsoftware.cavedroid.misc.utils.AssetLoader
9 class MenuOptions(
10 width: Float,
11 height: Float,
12 buttonRenderer: ButtonRenderer,
13 mainConfig: MainConfig,
14 menuInput: MenuProc.Input,
15 assetLoader: AssetLoader,
16 ) : Menu(width, height, buttonRenderer, mainConfig, menuInput, assetLoader) {
18 override fun getButtonEventListeners(): HashMap<String, ButtonEventListener> {
19 val map = HashMap<String, ButtonEventListener>()
20 map["back"] = ButtonEventListener { mMenuInput.backClicked() }
21 return map
22 }
24 override fun initButtons() {
25 loadButtonsFromJson(mAssetLoader.getAssetHandle("json/menu_options_buttons.json"))
26 }
27 }