PreferenceExtensionsSettingItem
Index
Properties
ButtonText
The label for the extension button. If it's a Function, it will be called once when entering the extension setting menu. Use the return value as button text.
Identifier
The identifier of the extension. This is used to identify the extension and must be unique.
optionalImage
The image path of the extension.
This is passed to DrawButton directly. You can use a data
URL here.
If it's a Function, it will be called once when entering the extension setting menu. Use the return value as image path. If it's undefined, there will be no image for the button
click
Called when a click happens on the extension screen.
Note: your exit button handling must call PreferenceSubscreenExit;
Type declaration
Returns void
exit
Called when the extension screen is about to exit.
Happens either through a click of the exit button, or the ESC key.
Type declaration
Returns boolean | void
optionalload
Called when the extension screen is about to be displayed.
You can create your own HTML elements in here, or load your data.
Note that HTML elements with the HideOnPopup
class will be hidden
automatically when a popup is shown.
Type declaration
Returns void
run
Called every frame while the extension screen is shown.
Type declaration
Returns void
optionalunload
Called when the extension screen is about to be closed.
Handles the unloading of the extension setting, usually when the user clicks the exit button, but it can also be called by the relog screen being triggered because of a disconnect.
If you created any HTML elements in PreferenceExtensionsSettingItem.load, this is a good place to remove them.
Type declaration
Returns void
Preference Menu info for extensions settings