[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

RE:[pygame] Re: GUI for pygame : ThorPy



Hello,

Yes you can set image and size of the buttons for each state (normal, pressed, etc...).
You can set the image of the element with "my_element.set_image(path_to_image)". (second optionnal argument: state of the button. Typically you would use thorpy.constants.STATE_NORMAL and thorpy.constants.STATE_PRESSED)

If the image doesn't change, you can also instanciate an element of type thorpy.Image and directly use the right image. Anyway I will add a small example/tutorial for using images as button, since many people want to do that.

Note that if you want a clean, customized style, you can also make a "design" template. A tutorial has already been written for this : http://www.thorpy.org/tutorials/painters.html .
________________________________________
De : owner-pygame-users@xxxxxxxx [owner-pygame-users@xxxxxxxx] de la part de Michael [mjrearden714@xxxxxxxxx]
Envoyé : jeudi 2 juillet 2015 18:05
À : pygame-users@xxxxxxxx
Objet : [pygame] Re: GUI for pygame : ThorPy

Just a small question, could you import custom pictures for the buttons, so
it looks more customized?



--
View this message in context: http://pygame-users.25799.x6.nabble.com/GUI-for-pygame-ThorPy-tp1944p1984.html
Sent from the pygame-users mailing list archive at Nabble.com.