plugin defined settings!!!!

This commit is contained in:
SpookyDervish
2025-10-30 17:45:30 +11:00
parent 13862bdad5
commit 94c2a72c41
5 changed files with 156 additions and 39 deletions

14
plugins/test/lua/main.lua Normal file
View File

@@ -0,0 +1,14 @@
local plugin = {}
function test(newValue)
berry.ui.notify(tostring(newValue))
end
function plugin.run()
berry.config.defineSetting("Test Plugin", "test setting", "this is a description", "string", "hi, this is the default value", test)
berry.config.defineSetting("Test Plugin", "another setting!", "woah!", "boolean", "1", test)
berry.config.defineSetting("Test Plugin", "integer setting", "i love integers :O", "integer", "123", test)
berry.config.defineSetting("Test Plugin", "float setting", "i love floating point numbers :O", "float", "123.456", test)
end
return plugin

6
plugins/test/plugin.json Normal file
View File

@@ -0,0 +1,6 @@
{
"name": "Test Plugin",
"version": "1.0.0",
"author": "SpookyDervish",
"dependencies": []
}