Package mindustry.ui

Class Menus

java.lang.Object
mindustry.ui.Menus

public class Menus extends Object
Class for handling menus and notifications across the network. Unstable API!
  • Constructor Details

    • Menus

      public Menus()
  • Method Details

    • registerMenu

      public static int registerMenu(Menus.MenuListener listener)
      Register a *global* menu listener. If no option is chosen, the option is returned as -1.
    • registerTextInput

      public static int registerTextInput(Menus.TextInputListener listener)
      Register a *global* text input listener. If no text is provided, the text is returned as null.
    • followUpMenu

      public static void followUpMenu(int menuId, String title, String message, String[][] options)
    • hideFollowUpMenu

      public static void hideFollowUpMenu(int menuId)
    • textInput

      public static void textInput(int textInputId, String title, String message, int textLength, String def, boolean numeric)
    • textInputResult

      public static void textInputResult(@Nullable mindustry.gen.Player player, int textInputId, @Nullable String text)
    • setHudText

      public static void setHudText(String message)
    • hideHudText

      public static void hideHudText()
    • setHudTextReliable

      public static void setHudTextReliable(String message)
      TCP version
    • announce

      public static void announce(String message)
    • infoMessage

      public static void infoMessage(String message)
    • infoPopup

      public static void infoPopup(String message, float duration, int align, int top, int left, int bottom, int right)
    • label

      public static void label(String message, float duration, float worldx, float worldy)
    • infoPopupReliable

      public static void infoPopupReliable(String message, float duration, int align, int top, int left, int bottom, int right)
    • labelReliable

      public static void labelReliable(String message, float duration, float worldx, float worldy)
    • infoToast

      public static void infoToast(String message, float duration)
    • warningToast

      public static void warningToast(int unicode, String text)
    • openURI

      public static void openURI(String uri)
    • removeWorldLabel

      public static void removeWorldLabel(int id)