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.
Files changed (2) hide show
  1. package/README.md +4 -2
  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", () => go("game"));
34
+ addTextButton(center().x, center().y, "start");
33
35
  ```
34
36
 
35
37
  ## 📄 License
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "kaplay-ui",
3
- "version": "0.3.0",
3
+ "version": "0.3.1",
4
4
  "description": "UI components for KAPLAY",
5
5
  "main": "index.js",
6
6
  "repository": {