kaplay-ui 0.18.1 → 0.18.3
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 +11 -0
- package/inputs/index.js +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -26,6 +26,17 @@ npm install kaplay-ui
|
|
|
26
26
|
|
|
27
27
|
### Inputs
|
|
28
28
|
|
|
29
|
+
#### Checkbox
|
|
30
|
+
|
|
31
|
+
Makes a checkbow that takes the following parameters:
|
|
32
|
+
|
|
33
|
+
| Parameter | Type | Default | Required | Description |
|
|
34
|
+
| --------- | -------- | ------- | -------- | ------------------- |
|
|
35
|
+
| `x` | `number` | 0 | ❌ No | Checkbox x position |
|
|
36
|
+
| `y` | `number` | 0 | ❌ No | Checkbox x position |
|
|
37
|
+
| `width` | `number` | 25 | ❌ No | Checkbox width |
|
|
38
|
+
| `height` | `number` | 25 | ❌ No | Checkbox height |
|
|
39
|
+
|
|
29
40
|
#### Text Button
|
|
30
41
|
|
|
31
42
|
Makes a button with centered text that takes the following parameters:
|
package/inputs/index.js
CHANGED
|
@@ -84,7 +84,7 @@ export const makeToggle = (x = 0, y = 0, width = 50, height = 25) => {
|
|
|
84
84
|
toggleBtn.use(pos(height / 2, height / 2));
|
|
85
85
|
toggle.toggled = false;
|
|
86
86
|
} else {
|
|
87
|
-
toggle.use(color(
|
|
87
|
+
toggle.use(color(148, 188, 236));
|
|
88
88
|
toggleBtn.use(pos(width - height / 2, height / 2));
|
|
89
89
|
toggle.toggled = true;
|
|
90
90
|
}
|