[Tutor] pygame blinking text

Prasad, Ramit ramit.prasad at jpmorgan.com
Mon Dec 12 23:14:23 CET 2011


>This is a common problem when people start GUI/graphics programming; 
>once you enter the GUI mainloop, you're no longer in control of the 
>program flow. Instead the mainloop will process events and callbacks; 
>therefore if you want a blinking text, you had to arrange such that your 
>blinker function will be called every second.

Since you are using livewires, you can subclass games.Timer 
and then create an instance of that subclass at the end and then have 
the tick function check for some Boolean value and either hide or 
show the text. I am not familiar with livewires or pygame, so I hope that helps.

Ramit


Ramit Prasad | JPMorgan Chase Investment Bank | Currencies Technology
712 Main Street | Houston, TX 77002
work phone: 713 - 216 - 5423

--



This email is confidential and subject to important disclaimers and
conditions including on offers for the purchase or sale of
securities, accuracy and completeness of information, viruses,
confidentiality, legal privilege, and legal entity disclaimers,
available at http://www.jpmorgan.com/pages/disclosures/email.  


More information about the Tutor mailing list