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.
letshwaois not the word. Setswana ordinarily speaks of a letshwao la peba for the mouse pointer, but in Bopaletshwaois the name ofchar— a single letter or mark. So Bopa takes the attested computing word,khesara, and leavesletshwaowhere it was.
Parameters
Section titled “Parameters”| Name | Type | Description |
|---|---|---|
mofuta | seelo | MOTSWI, SEFAPAANO, SEATLA, SUTA, MOKWALO, LETA, a CSS name, or a path to an image. |
x (optional) | palo | The x point inside the image that does the pointing. |
y (optional) | palo | The y point inside the image that does the pointing. |
Examples
Section titled “Examples”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);
}See also
Section titled “See also”tlogelaKhesara, MOTSWI, SEFAPAANO, SEATLA, SUTA, MOKWALO, LETA