Forum Archive

Implementing UI in High Scores Module

techteej

Hey all. I'm working on implementing the UI module into my high scores module and I'm having some trouble with button images. The image draws underneath the button, and when I gave it the button.image attribute, the image didn't display at all.

ccc

Buttons have an .image variable that can be set to a ui.Image.

button = ui.Button(background_color='white',
                   frame=(360, 175, 75, 32),
                   image=ui.Image.named('ionicons-arrow-right-a-24'))

And comment out your .draw() method.

techteej

Lesson learned. Need to use Image.named

Thanks.