Skip to content

Plugin

Inherits: Node

Base class for Plugins

Description

The Plugin class provides an interface and light API for creating plugins. New plugins should inherit from this class and will automatically get added to the scene tree as a child of the PluginLoader when it is loaded.

Properties

Type Name Default
String plugin_base
String cache
CustomLogger logger

Methods

Returns Signature
void unload()
Control get_settings_menu()
void add_library(library: Library)
void add_store(store: Store)
void add_boxart(boxart: BoxArtProvider)
void add_to_qam(qb_item: Control, icon: Texture2D, focus_node: Control = null)
void add_to_quick_bar(qb_item: Control, icon: Texture2D, focus_node: Control = null)
void add_overlay(overlay: OverlayProvider)

Property Descriptions

plugin_base

String plugin_base

The base resource directory for a given plugin. This will be set by the PluginLoader when it is loaded. Useful for loading plugin-specific resources.

cache

String cache

Note

There is currently no description for this property. Please help us by contributing one!

logger

CustomLogger logger

Note

There is currently no description for this property. Please help us by contributing one!


Method Descriptions

unload()

void unload()

To be overridden by plugin implementation. Should unload changes done by the plugin.

get_settings_menu()

Control get_settings_menu()

To be overridden by plugin implementation. Should return a scene with plugin settings. This scene will be included in the plugin settings menu to let users modify plugin-specific settings.

add_library()

void add_library(library: Library)

Adds the given library implementation as a child of the plugin. A Library node will automatically register itself with the LibraryManager when it enters the scene tree.

add_store()

void add_store(store: Store)

Adds the given store implementation as a child of the plugin. A Store node will automatically register itself with the StoreManager when it enters the scene tree.

add_boxart()

void add_boxart(boxart: BoxArtProvider)

Adds the given boxart provider as a child of the plugin. A BoxArtProvider node will automatically register itself with the BoxArtManager when it enters the scene tree.

add_to_qam()

void add_to_qam(qb_item: Control, icon: Texture2D, focus_node: Control = null)

Deprecated method for adding a plugin to the quick bar.

add_to_quick_bar()

void add_to_quick_bar(qb_item: Control, icon: Texture2D, focus_node: Control = null)

Adds the given menu scene to the Quick Bar Menu

add_overlay()

void add_overlay(overlay: OverlayProvider)

Adds the given overlay