Jump to content

Button dimesions and background image


photo

Recommended Posts

Posted

If the texture of a WidgetButton is set, will the button's dimensions always be fixed to the texture's dimensions?

 

For example, if I set a texture of 128x128 resolution as the image using WidgetButton.setTexture() then the button's size is fixed to 128x128.

widgetButton1.setHeight(height);
widgetButton1.setWidth(width);

 

has no effect on the button's dimensions.
Posted

When you assign a texture to WidgetButton, it cannot indeed be any smaller than the texture. It is more convenient this way when you create GUI layout. But though you cannot make it smaller, you can make the widget bigger than the texture size by using setHeight() andsetWidth().

×
×
  • Create New...