MCPcopy Create free account
hub / github.com/melonjs/melonJS / makeButton

Function makeButton

packages/melonjs/tests/ui-interaction.spec.js:70–79  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

68
69 describe("UITextButton", () => {
70 const makeButton = () => {
71 const btn = new UITextButton(50, 50, {
72 font: "xolo12",
73 text: "OK",
74 borderWidth: 100,
75 borderHeight: 40,
76 });
77 btn.anchorPoint.set(0, 0);
78 return btn;
79 };
80
81 it("pointerdown over the button fires onClick", () => {
82 const btn = makeButton();

Callers 1

Calls 1

setMethod · 0.45

Tested by

no test coverage detected