How to get the timer to change position in pygame?

Hello everbody! Does anyone know how to move the timer above to the corner like in a real game?
I have it now only displayed in the middle of the screen after hit run.

which corner? change line 13

Like where you see the x above at the right corner

textRect.center = 500, 0

It indeed appear at the corner but you couldt read it that good, I actually meant like in the whole screen. I added the x where I was talking about before where i did want the timer.

image

…what are you talking about? sorry but I can’t magically understand what happened, what the expected and actual behavior is. you need to show me what happened and what you want to happen.

Okay, I will do my best to be clear. It did indeed appear in the corner like u said, but it wasn’t that visible, how can i then move it to the left more, not in the left corner but just a little move to the left so the timer will be visible?

As you can see here under it is not that visible… sorry i was wrong first about it…

thank you, I can see it much more clearly now. try this:

textRect.center = 500 - text.get_bitsize(), text.get_height()

Thank you, it worked now. You only made a little mistake in the code. It is bitsize instead of linesize because it didnt recognised linesize.
See here what i got:

1 Like

Sorry, i think it went a little back on the right. I didnt changed anything now only that i wanted to begin from 200 about the seconds in the timer. How can I let the 200 appear at the right fully so the whole seconds? because you cant see the whole timer.

try textRect.center = 500 - text.get_width(), text.get_height()

1 Like

Thank you, it worked now :slight_smile:

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.