PDA

View Full Version : Resizing viz.BUTTON to fill image


fabricemarcelin
07-27-2015, 06:10 PM
Hello,

I am using button.uppicture('filename.jpg') to add a texture to a button, however the button does not seem to expand to fit the image size. The button does not contain a setSize() function, does anyone have an idea on how to retain the texture size on the button?

best

Jeff
07-28-2015, 04:00 PM
You can try scaling the button:

button = viz.addButton(pos=[0.5,0.5,0])
button.setScale([3]*3)
texture = viz.addTexture('lake3.jpg')
button.texture(texture)