Interface GuiTheme


public interface GuiTheme
A complete look and feel for Boze's GUI: the module GUI, the HUD editor, and every editor (popup).
Editors the theme does not draw itself fall back to built-in layouts drawn with kit(), so a theme can restyle every popup through its kit alone.
  • Method Details

    • id

      String id()
      Returns:
      Unique id, namespace:name
    • name

      String name()
      Returns:
      Name shown in the theme selector
    • description

      default String description()
      Returns:
      Short description
    • createClickGui

      GuiView createClickGui(GuiSession session)
      Creates the module GUI. Called each time the GUI opens.
      Parameters:
      session - The session the view belongs to
      Returns:
      The view
    • createHudEditor

      GuiView createHudEditor(GuiSession session, HudEditor hudEditor)
      Creates the HUD editor. HUD elements are drawn beneath the view and drag themselves; the view draws what surrounds them and passes clicks to hudEditor where it wants them.
      Parameters:
      session - The session the view belongs to
      hudEditor - The HUD elements
      Returns:
      The view
    • kit

      WidgetKit kit()
      Returns:
      The widgets built-in editor layouts are drawn with
    • createEditorView

      default EditorView createEditorView(GuiEditor editor)
      Creates a view for an editor.
      Parameters:
      editor - The editor to show
      Returns:
      A view, or null to use the built-in layout drawn with kit()
    • editorLayout

      default EditorLayout editorLayout()
      Returns:
      How open editors are placed on screen
    • editorTransition

      default double editorTransition()
      Returns:
      Seconds an editor takes to fade and grow in as it opens, and to fade out as it closes. Editors take as long to glide to a new place when others open or close beside them, and the built-in layouts animate their own changes, such as list rows coming and going, over the same time. 0 shows, hides and moves everything at once.
      A view fading out is still drawn after its GuiView.closed(), and takes no input.
    • declareOptions

      default void declareOptions(ThemeOptions options)
      Declares the theme's options. Called once, when the theme is registered.
      Parameters:
      options - Where to add options
    • onSelected

      default void onSelected()
      Called when the theme becomes the active theme.
    • onDeselected

      default void onDeselected()
      Called when another theme becomes the active theme.