Game Development Community

[Bug T3D 1.0.1] GuiBitmapCtrl resize

by Nicolas Buquet · in Torque 3D Professional · 04/14/2010 (4:09 am) · 2 replies

When inserting "0 0" in the "extent" property of a GuiBitmapCtrl in the gui editor, it should resize the bitmap control to the size of the bitmap. But it resizes it to the size of the allocated texture containing the bitmap.

I have a bitmap of size (376,275) that is so screen displayed at (512,512).

To correct this, in guiBitmapCtrl.cpp, in function "inspectPostApply()", the line:
setExtent( mTextureObject->getWidth(), mTextureObject->getHeight());
should be replaced with:
setExtent( mTextureObject->getBitmapWidth(), mTextureObject->getBitmapHeight());

Tested on Mac version, T3D 1.0.1 only.

Nicolas Buquet
www.buquet-net.com/cv/

#1
06/05/2010 (2:53 pm)
logged: TQA-244
#2
06/10/2010 (12:49 pm)
Confirmed as fixed for 1.1 Beta2.