Skip to content
ExamplesOpen editor ↗

pebaEGogilwe

→ mouseDragged()

Runs while the mouse is moved with a button held down.

tiro pebaEGogilwe() { ... }

Declare pebaEGogilwe as a function with tiro. It runs many times over while the reader drags — that is, moves the mouse with a button held down.

It is the function that makes a drawing pad. Combine pebaX/pebaY with pebaXEFetileng/pebaYEFetileng to draw a continuous stroke rather than separate dots.

goga is to move an item on the screen by touching it and sliding the finger.

On a phone, a finger does the mouse’s job. pebaEGogilwe runs while a finger slides across the screen without lifting.

A drawing pad
tiro setaLoeto() {
  thalaKanefase(400, 280);
  bokamorago(245);
  boketeMothalo(6);
  tlhalosa('Kanefase e e bosweu e o thalang mo go yona ka go goga peba.');
}

tiro pebaEGogilwe() {
  mothaloMmala(paloEpe(60, 220), 80, 170);
  thalaMothalo(pebaXEFetileng, pebaYEFetileng, pebaX, pebaY);
}

tiro pebaEKonyilweGabedi() {
  bokamorago(245);
}

pebaESutile, pebaXEFetileng, pebaYEFetileng, konopoETshwerwe