kaplay-ui 0.9.2 β†’ 0.9.4

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 +26 -7
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -22,27 +22,46 @@ You can install Kaplay UI via npm:
22
22
  npm install kaplay-ui
23
23
  ```
24
24
 
25
- ## πŸ› οΈ Usage
25
+ ## Usage
26
26
 
27
- Here’s a quick example of how to add a simple clickable and hoverable text button using Kaplay UI:
27
+ ### Buttons
28
+
29
+ ### Text Button
30
+
31
+ Here's some quick examples of how to add text buttons using Kaplay UI:
28
32
 
29
33
  ```javascript
30
34
  import kaplay from "kaplay";
31
35
  import "kaplay/global";
32
36
 
33
- import { addTextButton } from "kaplay-ui";
37
+ import { addTextButton } from "kaplay-ui/buttons";
34
38
 
35
39
  kaplay();
36
40
 
37
- // Add a UI button
38
- addTextButton("Start", () => go("main"));
41
+ // Add a text button
42
+ addTextButton("Start");
43
+
44
+ // Add a text button with an onClick handler
45
+ addTextButton("Start", () => go("game"));
46
+
47
+ // Add a text button with x and y position
48
+ addTextButton("Start", () => go("game"), 200, 200);
49
+
50
+ // Add a text button with width and height
51
+ addTextButton("Start", () => go("game"), 200, 200, 200, 70);
52
+
53
+ // Add a text button with text size
54
+ addTextButton("Start", () => go("game"), 200, 200, 200, 70, 20);
55
+
56
+ // Add a text button with disabled hover effect
57
+ addTextButton("Start", () => go("game"), 200, 200, 200, 70, 20, false);
39
58
  ```
40
59
 
41
- ## πŸ“„ License
60
+ ## License
42
61
 
43
62
  This project is licensed under the MIT License - see the LICENSE file for details.
44
63
 
45
- ## πŸ“ž Contact
64
+ ## Contact
46
65
 
47
66
  Have questions or suggestions? Reach out via:
48
67
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "kaplay-ui",
3
- "version": "0.9.2",
3
+ "version": "0.9.4",
4
4
  "description": "UI components for KAPLAY",
5
5
  "main": "index.js",
6
6
  "repository": {