Skip to content
ExamplesOpen editor ↗

MOKWALO

→ TEXT

The cursor shown over text that can be selected.

MOKWALO

You hand it to khesara. It is the thin upright I-beam — on the web it means you can type here, or this text can be selected.

One word, two jobs. Lower-case mokwalo is the name of str, and it is also the type label “text” in every parameter table. Upper-case MOKWALO is a cursor shape. That is deliberate: where a function and a value stand for the same idea, Bopa gives them the same Setswana word, told apart by capitals. It is not the first time: degrees/DEGREES and radians/RADIANS do exactly this.

The text cursor over words
tiro setaLoeto() {
  thalaKanefase(400, 200);
  tlhalosa('Mokwalo o o mo bogareng jwa kanefase; khesara e fetoga fa e le fa godimo ga one.');
}
tiro tshwantsha() {
  bokamorago(244);
  tlogelaMothalo();
  tlatsaMmala(40, 50, 70);
  bogoloJwaMokwalo(28);

  metlha mafoko = 'Tlhopha mafoko a';
  metlha b = bopharaMokwalo(mafoko);

  fa (pebaX > 40 && pebaX < 40 + b && pebaY > 75 && pebaY < 110) {
    khesara(MOKWALO);
  } gongwe {
    khesara(MOTSWI);
  }

  thalaMokwalo(mafoko, 40, 105);
}

khesara, thalaMokwalo, mokwalo, MOTSWI