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
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 Summary
Modifier and TypeMethodDescriptioncreateClickGui(GuiSession session) Creates the module GUI.default EditorViewcreateEditorView(GuiEditor editor) Creates a view for an editor.createHudEditor(GuiSession session, HudEditor hudEditor) Creates the HUD editor.default voiddeclareOptions(ThemeOptions options) Declares the theme's options.default Stringdefault EditorLayoutdefault doubleid()kit()name()default voidCalled when another theme becomes the active theme.default voidCalled when the theme becomes the active theme.
-
Method Details
-
id
String id()- Returns:
- Unique id,
namespace:name
-
name
String name()- Returns:
- Name shown in the theme selector
-
description
- Returns:
- Short description
-
createClickGui
Creates the module GUI. Called each time the GUI opens.- Parameters:
session- The session the view belongs to- Returns:
- The view
-
createHudEditor
Creates the HUD editor. HUD elements are drawn beneath the view and drag themselves; the view draws what surrounds them and passes clicks tohudEditorwhere it wants them.- Parameters:
session- The session the view belongs tohudEditor- The HUD elements- Returns:
- The view
-
kit
WidgetKit kit()- Returns:
- The widgets built-in editor layouts are drawn with
-
createEditorView
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
- 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 itsGuiView.closed(), and takes no input.
-
declareOptions
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.
-