August'24: Kamaelia is in maintenance mode and will recieve periodic updates, about twice a year, primarily targeted around Python 3 and ecosystem compatibility. PRs are always welcome. Latest Release: 1.14.32 (2024/3/24)

Kamaelia.UI.Pygame.Ticker.Ticker

class Ticker(Axon.Component.component)

Ticker(...) -> new Ticker component.

A pygame based component that displays incoming text as a ticker.

Keyword arguments (all optional): - text_height -- Font size in points (default=39) - line_spacing -- (default=text_height/7) - background_colour -- (r,g,b) background colour of the ticker (default=(128,48,128)) - text_colour -- (r,g,b) colour of text (default=(232,232,48)) - outline_colour -- (r,g,b) colour of the outline border (default=background_colour) - outline_width -- pixels width of the border (default=1) - position -- (x,y) pixels location of the top left corner - render_left -- pixels distance of left of text from left edge (default=1) - render_top -- pixels distance of top of text from top edge (default=1) - render_right -- pixels width of ticker (default=399) - render_bottom -- pixels height of ticker (default=299)

NOTE: render_left and render_top currently behave incorrectly if not set to 1

Inboxes

Outboxes

Methods defined here

Warning!

__init__(self)

x.__init__(...) initializes x; see x.__class__.__doc__ for signature

clearDisplay(self)

Clears the ticker of any existing text.

handleAlpha(self)

main(self)

Main loop.

renderBorder(self, display)

Draws a rectangle to form the 'border' of the ticker

requestDisplay(self)

Generator. Gets a display surface from the PygameDisplay service.

Makes the request, then yields 1 until a display surface is returned.

waitBox(self, boxname)

Generator. yields 1 until data ready on the named inbox.


Feedback

Got a problem with the documentation? Something unclear, could be clearer? Want to help with improving? Constructive criticism, preferably in the form of suggested rewording is very welcome.

Please leave the feedback here, in reply to the documentation thread in the Kamaelia blog.