kaplay-ui 0.2.0 β 0.2.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 +43 -2
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,2 +1,43 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+

|
|
2
|
+
<br>_π§ This package is a work in progress! π§_
|
|
3
|
+
_Expect breaking changes and incomplete features._
|
|
4
|
+
|
|
5
|
+
# KAPLAY UI - A UI Component Library for KAPLAY
|
|
6
|
+
|
|
7
|
+
_A simple and customizable UI library for [KAPLAY](https://kaplayjs.com/)._
|
|
8
|
+
|
|
9
|
+
## π Introduction
|
|
10
|
+
|
|
11
|
+
Kaplay UI is a component library designed specifically for KAPLAY. It will provide ready-made UI components to help you build better user interfaces for your KAPLAY games with minimal effort.
|
|
12
|
+
|
|
13
|
+
## π¦ Installation
|
|
14
|
+
|
|
15
|
+
You can install Kaboom UI via npm:
|
|
16
|
+
|
|
17
|
+
```bash
|
|
18
|
+
npm install kaplay-ui
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
## π οΈ Usage
|
|
22
|
+
|
|
23
|
+
Hereβs a quick example of how to add a simple clickable button using Kaplay UI:
|
|
24
|
+
|
|
25
|
+
```javascript
|
|
26
|
+
import kaplay from "kaplay";
|
|
27
|
+
import { addTextButton } from "kaplay-ui";
|
|
28
|
+
|
|
29
|
+
kaplay();
|
|
30
|
+
|
|
31
|
+
// Add a UI button
|
|
32
|
+
addTextButton(center().x, center().y, "start", () => go("game"));
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
## π License
|
|
36
|
+
|
|
37
|
+
This project is licensed under the MIT License - see the LICENSE file for details.
|
|
38
|
+
|
|
39
|
+
## π Contact
|
|
40
|
+
|
|
41
|
+
Have questions or suggestions? Reach out via:
|
|
42
|
+
|
|
43
|
+
- GitHub Issues
|