Skip to content
ExamplesOpen editor ↗

konopoETshwerwe

→ mouseIsPressed

Is `nnete` while any mouse button is held down, and `maaka` otherwise.

konopoETshwerwe

Read it inside tshwantsha to do something for the whole time a button is held — drawing only while pressed, for example.

fa (konopoETshwerwe) { thalaSediko(pebaX, pebaY, 20); }

It is not pebaETobeditswe, which runs once per press. To count presses, use the event; to do something continuously while the button is down, use konopoETshwerwe.

taetsiETshwerwe is its keyboard twin — the same name with the device word swapped.

Draw only while pressed
tiro setaLoeto() {
  thalaKanefase(400, 260);
  bokamorago(244);
  khesara(SEFAPAANO);
  tlhalosa('Kanefase e o thalang dintlha tse dinnye mo go yona fa o tshwere konopo ya peba.');
}

tiro tshwantsha() {
  tlogelaMothalo();
  tlatsaMmala(60, 120, 190, 90);

  fa (konopoETshwerwe) {
    thalaSediko(pebaX, pebaY, 16);
  }
}

konopoYaPeba, taetsiETshwerwe, pebaETobeditswe, pebaX, pebaY