konopoYaPeba
→ mouseButtonAn object that tells you which mouse buttons are down right now.
konopoYaPeba.leftkonopoYaPeba is not a number and not a boolean — it is an object with three fields, each nnete or maaka:
konopoYaPeba.left— the left buttonkonopoYaPeba.right— the right buttonkonopoYaPeba.center— the middle button (the wheel)
So you read it like this:
fa (konopoYaPeba.left) { ... }
The field names stay English (left, right, center) because they are the object’s own property names, not Bopa keywords.
Careful:
fa (konopoYaPeba)is ALWAYS true. It is an object, and every object counts as true — so that branch is taken even when no button is down at all. Read one of its fields (konopoYaPeba.left), or usekonopoETshwerwe, which really is a boolean.
If you only want to know whether any button is down, you do not need
konopoYaPebaat all — usekonopoETshwerwe, which is a plain boolean.
Examples
Section titled “Examples”tiro setaLoeto() {
thalaKanefase(400, 240);
tlhalosa('Sediko se se mo bogareng se se fetolang mmala go ya ka konopo ya peba e e tshwerweng.');
}
tiro tshwantsha() {
bokamorago(238);
tlogelaMothalo();
fa (konopoYaPeba.left) {
tlatsaMmala(220, 90, 80);
} gongwe {
fa (konopoYaPeba.right) {
tlatsaMmala(80, 160, 110);
} gongwe {
tlatsaMmala(180, 185, 195);
}
}
thalaSediko(200, 120, 130);
}