WorldViz User Forum

WorldViz User Forum (https://forum.worldviz.com/index.php)
-   Vizard (https://forum.worldviz.com/forumdisplay.php?f=17)
-   -   Resizing viz.BUTTON to fill image (https://forum.worldviz.com/showthread.php?t=5414)

fabricemarcelin 07-27-2015 06:10 PM

Resizing viz.BUTTON to fill image
 
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:

Code:

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



All times are GMT -7. The time now is 03:02 PM.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Copyright 2002-2023 WorldViz LLC