FAITH2011 0 Light Poster

Hi all,

Could someone help with the position of text on screen in pygame. Basic structure would look something like this below.
now I like the user to input the text position starting at top left and moving 1 space at a time until end of that line then onto next line and so on until it reaches bottom right hand side. any idea on how to this would be great and not Def statement ... Thanks

# Moving Text across screen
import pygame
a=0

class MovingText:
    def __init__(self,mFont,Text,top,left,speed = 3,color = (255,255,255)):
        self.Text = mFont.render(Text,0,color)
        self.pos = [a,left]
        self.speed = speed

    def draw(self,canvas):
        self.pos[0] += self.speed
        if self.pos[0] > 800 - self.Text.get_width():
            self.pos[0] = 0
        canvas.blit(self.Text,self.pos)

#
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.