Game Development Community

GuiWindowCtrl winRect extent is incorrect + Fix - LOGGED

by Vincent BILLET · in Torque 3D Professional · 08/14/2010 (7:35 am) · 2 replies

When I use transparent fillcolor with transparent bitmap borders, WinRect and bitmap overlap each others by 1 pixel on the right.

new GuiControlProfile (GuiWindowProfile)
   {
   		opaque = false;
   		border = 10;
   		fillColor = "0 0 0 127";
   		fillColorHL = "0 0 0 127";
   		fillColorNA = "0 0 0 127";
   		fontColor = "255 255 255";
   		fontColorHL = "255 255 255";
                bevelColorHL = "255 255 255";
                bevelColorLL = "0 0 0";
   		text = "untitled";
   		bitmap = "./images/windowred";
   		textOffset = "50 4";
   		hasBitmapArray = false;
   		justify = "left";
   		yPositionOffset = "21";
         category = "Core";
	};
You can try with this image :
www.dragonheadstudio.com/img/windowred.png
Suggested fix
In guiWindowCtrl.cpp, line 1249 : comment this line
//   winRect.extent.x += 1;