Da bi naš sajt radio bez problema, koristimo neophodne kolačiće. Voleli bismo vašu dozvolu da koristimo opcione analitičke kolačiće kako bismo ga unapredili. Ne koristimo oglasne kolačiće. Možete prihvatiti sve kolačiće ili ostati samo na neophodnim.
Saznajte više.
Podešavanja kolačića
Upravljajte svojim podešavanjima kolačića:
Ovi kolačići su neophodni za ispravan rad sajta.
Pomažu nam da poboljšamo sajt kroz razumevanje načina korišćenja.
Ne koristimo oglase i ne šaljemo informacije za praćenje oglasa trećim stranama.
In the PyGame programs we have seen so far, the user could not affect their execution, aside from ending the program. We can compare this kind of programs to watching movies - the user is essentially a viewer.
In the next section, we will deal with programs in which the user has an active role and can influence the running of the program using a mouse and a keyboard. There are two basic ways for our program to “know” when the user has made an action.
One way is to read the status of the mouse and keyboard. From the code we can ask what is the current position of the mouse, whether any key is being pressed and the like.
Another way is to use system events. Any user action (pressing a mouse button or a keyboard key, releasing a key, moving the mouse, etc.) is an event, and in the programs we can obtain information about such events and respond to them.
In this chapter, we will familiarize with both of these ways that enable our programs to respond to user actions.
Molimo vas da popunite sva polja obeležena kao obavezna.Desila se greška prilikom slanja vašeg odgovora.Vaš odgovor je zabeležen. Hvala!Vaši odgovori su zabeleženi. Hvala!