Class MenuFragment.MenuButton

java.lang.Object
mindustry.ui.fragments.MenuFragment.MenuButton
Enclosing class:
MenuFragment

public static class MenuFragment.MenuButton extends Object
Represents a menu button definition.
  • Field Details

    • icon

      public final arc.scene.style.Drawable icon
    • text

      public final String text
    • runnable

      public final Runnable runnable
      Runnable ran when the button is clicked. Ignored on desktop if submenu is not null.
  • Constructor Details

    • MenuButton

      public MenuButton(String text, arc.scene.style.Drawable icon, Runnable runnable)
      Constructs a simple menu button, which behaves the same way on desktop and mobile.
    • MenuButton

      public MenuButton(String text, arc.scene.style.Drawable icon, Runnable runnable, MenuFragment.MenuButton... submenu)
      Constructs a button that runs the runnable when clicked on mobile or shows the submenu on desktop.