🔧 Implicitely load effect preferences
This commit is contained in:
+3
-11
@@ -90,21 +90,13 @@ var Doom = class {
|
||||
|
||||
// -------------------------------------------------------------------- API for prefs.js
|
||||
|
||||
// This is called by the preferences dialog. It loads the settings page for this effect,
|
||||
// and binds all properties to the settings.
|
||||
getPreferences(dialog) {
|
||||
|
||||
// Add the settings page to the builder.
|
||||
dialog.getBuilder().add_from_resource(`/ui/${utils.getUIDir()}/Doom.ui`);
|
||||
|
||||
// Bind all properties.
|
||||
// This is called by the preferences dialog whenever a new effect profile is loaded. It
|
||||
// binds all user interface elements to the respective settings keys of the profile.
|
||||
bindPreferences(dialog) {
|
||||
dialog.bindAdjustment('doom-animation-time');
|
||||
dialog.bindAdjustment('doom-horizontal-scale');
|
||||
dialog.bindAdjustment('doom-vertical-scale');
|
||||
dialog.bindAdjustment('doom-pixel-size');
|
||||
|
||||
// Finally, return the new settings page.
|
||||
return dialog.getBuilder().get_object('doom-prefs');
|
||||
}
|
||||
|
||||
// ---------------------------------------------------------------- API for extension.js
|
||||
|
||||
Reference in New Issue
Block a user