Skip to content
ExamplesOpen editor ↗

pebaEKonyilweGabedi

→ doubleClicked()

Runs once when a mouse button is clicked twice in quick succession.

tiro pebaEKonyilweGabedi() { ... }

Declare pebaEKonyilweGabedi as a function with tiro. It runs when the reader clicks twice quickly in the same place.

gabedi is the ordinary Setswana for twice: two clicks, one after the other.

On a phone, a finger does the mouse’s job. pebaEKonyilweGabedi runs after two touches that follow each other quickly.

Double-click to wipe the canvas
tiro setaLoeto() {
  thalaKanefase(400, 260);
  bokamorago(240);
  tlogelaMothalo();
  tlhalosa('Didiko tse di tsenngwang ka go tobetsa; go konya gabedi go di phimola tsotlhe.');
}

tiro pebaETobeditswe() {
  tlatsaMmala(230, 140, 70, 190);
  thalaSediko(pebaX, pebaY, 40);
}

tiro pebaEKonyilweGabedi() {
  bokamorago(240);
}

pebaEKonyilwe, pebaETobeditswe