kaplay-ui 0.10.1 → 0.11.0

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/buttons/index.js +0 -8
  2. package/package.json +1 -1
package/buttons/index.js CHANGED
@@ -3,7 +3,6 @@ import "kaplay/global";
3
3
  /**
4
4
  * Adds a clickable button with custom text
5
5
  * @param {string} txt - Button text to display
6
- * @param {Function} [onClick] - Click event handler (default is () => {}))
7
6
  * @param {number} x - The x postion to set (default is center().x).
8
7
  * @param {number} y - The x postion to set (default is center().y)
9
8
  * @param {number} w - Width of button (default is 120)
@@ -14,7 +13,6 @@ import "kaplay/global";
14
13
  */
15
14
  export const addTextButton = (
16
15
  txt,
17
- onClick = () => {},
18
16
  x = center().x,
19
17
  y = center().y,
20
18
  w = 120,
@@ -47,12 +45,6 @@ export const addTextButton = (
47
45
  // Button text
48
46
  btn.add([text(txt, { size: txtSize }), anchor("center"), color(0, 0, 0)]);
49
47
 
50
- // On click handler
51
- btn.onClick(() => {
52
- setCursor("default");
53
- onClick();
54
- });
55
-
56
48
  btn.onHover(() => {
57
49
  setCursor("pointer");
58
50
  if (hoverFx) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "kaplay-ui",
3
- "version": "0.10.1",
3
+ "version": "0.11.0",
4
4
  "description": "UI components for KAPLAY",
5
5
  "main": "index.js",
6
6
  "repository": {