Interface GuiEditor

All Known Subinterfaces:
BindCaptureEditor, ChoiceEditor, ConfirmEditor, DualListEditor, FormEditor, ListEditor, MacroEditor, NoticeEditor, NumberEditor, PickerEditor, StaticColorEditor, TuneEditor

An editor (popup): what it edits and what its controls do, without any drawing. Views draw an editor and call into it; typing is handled here so every theme types the same way.
There is one sub-interface per kind of editor, so a view picks its layout with a switch: switch (editor) { case ListEditor list -> ...; case FormEditor form -> ...; }. Addons create editors with GuiEditors.
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
     
    void
    Removes this editor and every editor above it.
    id()
     
    boolean
    Handles a key while this editor is on top: typing into its fields, Enter, Tab and paste.
     
  • Method Details

    • id

      String id()
      Returns:
      Stable id naming what is edited, for example boze:block-list or boze:presets, so a theme can give one editor its own view
    • title

      String title()
    • keyPressed

      boolean keyPressed(GuiKeyEvent event)
      Handles a key while this editor is on top: typing into its fields, Enter, Tab and paste.
      Returns:
      Whether the key was used
    • charTyped

      boolean charTyped(GuiCharEvent event)
      Returns:
      Whether the character was used
    • close

      void close()
      Removes this editor and every editor above it.