T3D 1.1 Final - guiArrayCtrl Clip Rectangle Fix - LOGGED (THREED-3161)
by Nathan Martin · in Torque 3D Professional · 09/12/2011 (10:25 am) · 1 replies
Build: 1.1 Final
Platform: Any
Target: GUI Controls
Issues:
The GuiArrayCtrl incorrectly adjusts the clip rectangle after rendering column headers that causes controls that inherit GuiArrayCtrl to leak drawing contents below the vertical bounds of the control upto mHeaderDim.y in size.
Suggested Fix:
In GuiArrayCtrl method
replace (found on line 270)
with
* Note: I added the // ignore this comment bit to prevent the code tags from removing the indentation.
Other Thoughts:
This bug does effect the GuiModernTextListCtrl resource and any other GUI controls that make use of column headers assisted by GuiArrayCtrl.
Diff if it makes it any easier:
Platform: Any
Target: GUI Controls
Issues:
The GuiArrayCtrl incorrectly adjusts the clip rectangle after rendering column headers that causes controls that inherit GuiArrayCtrl to leak drawing contents below the vertical bounds of the control upto mHeaderDim.y in size.
Suggested Fix:
In GuiArrayCtrl method
void GuiArrayCtrl::onRender(Point2I offset, const RectI &updateRect)
replace (found on line 270)
// * ignore this comment
clipRect.point.y = headerClip.point.y + headerClip.extent.y - 1;with
// * ignore this comment
clipRect.point.y += headerClip.extent.y;
clipRect.extent.y -= headerClip.extent.y;* Note: I added the // ignore this comment bit to prevent the code tags from removing the indentation.
Other Thoughts:
This bug does effect the GuiModernTextListCtrl resource and any other GUI controls that make use of column headers assisted by GuiArrayCtrl.
Diff if it makes it any easier:
--- C:/Torque/Torque 3D Pro 1.1/Engine/source/gui/core/guiArrayCtrl.cpp Wed Jun 01 12:04:40 2011
+++ C:/Torque/Modded_Torque 3D Pro 1.1/Engine/source/gui/core/guiArrayCtrl.cpp Mon Sep 12 12:30:36 2011
@@ -267,7 +267,8 @@
//now render the header
onRenderColumnHeaders(offset, parentOffset, mHeaderDim);
- clipRect.point.y = headerClip.point.y + headerClip.extent.y - 1;
+ clipRect.point.y += headerClip.extent.y;
+ clipRect.extent.y -= headerClip.extent.y;
}
offset.y += mHeaderDim.y;
}About the author
By day I work as an embedded microcontroller programmer for mainly Blackfin MCU/DSPs, and by night, and free time too, I'm a hobbyist game developer.
Torque 3D Owner Christopher Tauscher
Default Studio