Skip to content
ExamplesOpen editor ↗

khesara

→ cursor()

Changes the shape of the cursor while it is over the canvas.

khesara(type) | khesara(type, x, y)

khesara is the Setswana word for cursor — the thing that shows where you are on the screen. You give it one of MOTSWI, SEFAPAANO, SEATLA, SUTA, MOKWALO or LETA.

You may also give it a CSS name such as 'grab' or 'zoom-in', or a path to an image: khesara('target.png', 8, 8). The two numbers that follow mark the point inside the image that does the pointing. The image must be small — 32×32 pixels or less.

letshwao is not the word. Setswana ordinarily speaks of a letshwao la peba for the mouse pointer, but in Bopa letshwao is the name of char — a single letter or mark. So Bopa takes the attested computing word, khesara, and leaves letshwao where it was.

NameTypeDescription
mofutaseeloMOTSWI, SEFAPAANO, SEATLA, SUTA, MOKWALO, LETA, a CSS name, or a path to an image.
x (optional)paloThe x point inside the image that does the pointing.
y (optional)paloThe y point inside the image that does the pointing.
A cursor that changes inside the circle
tiro setaLoeto() {
  thalaKanefase(400, 300);
  tlhalosa('Sediko se se mo bogareng; khesara e fetoga fa e le mo teng ga sona.');
}
tiro tshwantsha() {
  bokamorago(238);
  tlogelaMothalo();

  fa (sekgala(pebaX, pebaY, 200, 150) < 90) {
    tlatsaMmala(220, 90, 70);
    khesara(SEATLA);
  } gongwe {
    tlatsaMmala(150, 170, 190);
    khesara(SEFAPAANO);
  }

  thalaSediko(200, 150, 180);
}

tlogelaKhesara, MOTSWI, SEFAPAANO, SEATLA, SUTA, MOKWALO, LETA