kaplay-ui 0.2.1-alpha → 0.2.2

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/index.js +8 -0
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -1,5 +1,13 @@
1
1
  import "kaplay/global";
2
2
 
3
+ /**
4
+ * Adds a clickable button with custom text
5
+ * @param {number} x - The x postion to set.
6
+ * @param {y} y - The y position to set.
7
+ * @param {string} txt - Button text to display
8
+ * @param {Function} [f] - Click event handler (default is () => {}))
9
+ * @returns {GameObj}
10
+ */
3
11
  export const addTextButton = (x, y, txt, f = () => {}) => {
4
12
  const btn = add([
5
13
  rect(240, 80, { radius: 8 }),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "kaplay-ui",
3
- "version": "0.2.1-alpha",
3
+ "version": "0.2.2",
4
4
  "description": "UI components for KAPLAY",
5
5
  "main": "index.js",
6
6
  "repository": {