Package mindustry.ui.fragments
Class MenuFragment.MenuButton
java.lang.Object
mindustry.ui.fragments.MenuFragment.MenuButton
- Enclosing class:
- MenuFragment
Represents a menu button definition.
-
Field Summary
-
Constructor Summary
ConstructorDescriptionMenuButton
(String text, Drawable icon, Runnable runnable) Constructs a simple menu button, which behaves the same way on desktop and mobile.MenuButton
(String text, Drawable icon, Runnable runnable, MenuFragment.MenuButton... submenu) Constructs a button that runs the runnable when clicked on mobile or shows the submenu on desktop. -
Method Summary
-
Field Details
-
icon
-
text
-
runnable
Runnable ran when the button is clicked. Ignored on desktop ifsubmenu
is not null.
-
-
Constructor Details
-
MenuButton
Constructs a simple menu button, which behaves the same way on desktop and mobile. -
MenuButton
public MenuButton(String text, Drawable icon, Runnable runnable, MenuFragment.MenuButton... submenu) Constructs a button that runs the runnable when clicked on mobile or shows the submenu on desktop.
-