kaplay-ui 0.3.0 → 0.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +4 -2
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -20,16 +20,18 @@ npm install kaplay-ui
|
|
|
20
20
|
|
|
21
21
|
## 🛠️ Usage
|
|
22
22
|
|
|
23
|
-
Here’s a quick example of how to add a simple clickable button using Kaplay UI:
|
|
23
|
+
Here’s a quick example of how to add a simple clickable and hoverable text button using Kaplay UI:
|
|
24
24
|
|
|
25
25
|
```javascript
|
|
26
26
|
import kaplay from "kaplay";
|
|
27
|
+
import "kaplay/global";
|
|
28
|
+
|
|
27
29
|
import { addTextButton } from "kaplay-ui";
|
|
28
30
|
|
|
29
31
|
kaplay();
|
|
30
32
|
|
|
31
33
|
// Add a UI button
|
|
32
|
-
addTextButton(center().x, center().y, "start"
|
|
34
|
+
addTextButton(center().x, center().y, "start");
|
|
33
35
|
```
|
|
34
36
|
|
|
35
37
|
## 📄 License
|