mansrz / pymt

Automatically exported from code.google.com/p/pymt
0 stars 0 forks source link

Label refresh() doesn't refresh font_size #248

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1.create a label
2.refresh() 
3.

What is the expected output? What do you see instead?
label keeps its size

What version of the product are you using? On what operating system?
pymt 0.4
ubuntu 10.04

lease provide any additional information below.
the test file talks by itself 

Original issue reported on code.google.com by awa...@gmail.com on 13 May 2010 at 5:17

Attachments:

GoogleCodeExporter commented 9 years ago
As it's written in the documentation:

    ..warning ::
        The core text label can't be changed at runtime, you must recreate one.

So, you can't :)

Also, just a tips in your code, this notation:
print str(self.txt.font_size)+' '+str(self.txt.bold)+' '+str(self.txt.size)+'
'+str(self.txt.color)
Can be changed to:
print self.txt.font_size, self.txt.bold, self.txt.size, self.txt.color

Also, you can play with label texture (if it's something you want):
txt = Label('bleh')
...
drawTexturedRectangle(texture=txt.texture, pos=..., size=...)

Original comment by txprog on 15 May 2010 at 8:51