Update README.md

api 8 examples
This commit is contained in:
Roman Trapeznikov 2023-07-15 01:24:44 +03:00 committed by GitHub
parent 038e47a01c
commit 06763429e4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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`:
```python
# ba_meta require api 7
import ba
# ba_meta require api 8
import babase
# ba_meta export plugin
class Main(ba.Plugin):
# ba_meta export babase.Plugin
class Main(babase.Plugin):
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):
return True
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