GuiButton method

  1. @override
int GuiButton(
  1. RectangleD bounds,
  2. String? text
)
override

Button control, returns true when clicked

Returns int rather than bool to match Raygui's uniform result convention across all controls.

Use GuiButton(...) == 1 to test for a click.

Implementation

@override
int GuiButton(
  RectangleD bounds,
  String? text,
) => run(
  () => RaylibDebugLabels.GuiButton(bounds, text),
  () => rl.Gui.GuiButton.run2(
    rl.Temp.Rectangle$.Ref1(bounds).toJS,
    text?.toJS,
  ).toInt(),
);