Skip to content
ExamplesOpen editor ↗

pebaESutile

→ mouseMoved()

Runs while the mouse moves with no button held down.

tiro pebaESutile() { ... }

Declare pebaESutile as a function with tiro. It runs while the mouse moves with no button pressed — while a button is pressed, pebaEGogilwe runs instead.

It is what makes things that respond to the mouse without a click: a button that changes colour under the pointer, or a shadow that trails the cursor.

suta, not tshikinyega. In ordinary Setswana tshikinyega means to shake. Bopa takes suta — the plain word for moving over — which the language already uses as SUTA, the “this can be moved” cursor.

There is no touchscreen equivalent. A finger does not travel across a screen without touching it, so pebaESutile belongs to a computer with a mouse.

A circle that grows as the mouse nears
diri bogolo = 40;

tiro setaLoeto() {
  thalaKanefase(400, 260);
  tlhalosa('Sediko se se mo bogareng se se golang fa peba e le gaufi le sona.');
}

tiro tshwantsha() {
  bokamorago(236);
  tlogelaMothalo();
  tlatsaMmala(90, 160, 210);
  thalaSediko(200, 130, bogolo);
}

tiro pebaESutile() {
  metlha kgakala = sekgala(pebaX, pebaY, 200, 130);
  bogolo = lekanyetsa(thibela(kgakala, 0, 200), 0, 200, 150, 30);
}

pebaEGogilwe, pebaX, pebaY, phetogoYaPebaX