mirror of
https://github.com/bombsquad-community/plugin-manager.git
synced 2025-10-08 14:54:36 +00:00
Update README.md
api 8 examples
This commit is contained in:
parent
038e47a01c
commit
06763429e4
1 changed files with 6 additions and 6 deletions
12
README.md
12
README.md
|
|
@ -80,19 +80,19 @@ There are two different ways the plugin manager can be installed:
|
||||||
|
|
||||||
Let's say you wanna submit this new utility-type plugin named as `sample_plugin.py`:
|
Let's say you wanna submit this new utility-type plugin named as `sample_plugin.py`:
|
||||||
```python
|
```python
|
||||||
# ba_meta require api 7
|
# ba_meta require api 8
|
||||||
import ba
|
import babase
|
||||||
|
|
||||||
# ba_meta export plugin
|
# ba_meta export babase.Plugin
|
||||||
class Main(ba.Plugin):
|
class Main(babase.Plugin):
|
||||||
def on_app_running(self):
|
def on_app_running(self):
|
||||||
ba.screenmessage("Hi! I am a sample plugin!")
|
babase.screenmessage("Hi! I am a sample plugin!")
|
||||||
|
|
||||||
def has_settings_ui(self):
|
def has_settings_ui(self):
|
||||||
return True
|
return True
|
||||||
|
|
||||||
def show_settings_ui(self, source_widget):
|
def show_settings_ui(self, source_widget):
|
||||||
ba.screenmessage("You tapped my settings!")
|
babase.screenmessage("You tapped my settings!")
|
||||||
```
|
```
|
||||||
|
|
||||||
You'll have to fork this repository and add your `sample_plugin.py` plugin file into the appropriate directory, which for
|
You'll have to fork this repository and add your `sample_plugin.py` plugin file into the appropriate directory, which for
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue