Open
Description
Describe the bug
I'm trying to draw a image on a button with .image or .set_image attributes but they neither works, with .image i have TypeError:
TypeError: 'pygame.Surface' object is not callable
To Reproduce
Steps to reproduce the behaviour:
- Create a button
- Draw a button on a screen
- Set a Image
Platform and software (please complete the following information):
- OS: Windows 10
- Pygame GUI version Newest One
- Pygame version Newest One
Additional context
Code:
self.draw = pygame_gui.elements.UIButton(pygame.Rect((self.x, self.y), (150, 40)), self.text, self.manager,
None, self.text_tip)
self.draw.set_image(screen,'LVLUP.bmp')
or:
self.draw = pygame_gui.elements.UIButton(pygame.Rect((self.x, self.y), (150, 40)), self.text, self.manager,
None, self.text_tip)
self.draw.image(screen,'LVLUP.bmp')